Forge scripting weapon boundaries and despawn's

I need help with a a script I don’t know how to make.
The idea is to have a weapon inside a boundary and is to be use only in side that boundary(or enclosed by boundaries), and if some one had that weapon and left the boundary it would despawn. But other players cant trigger the boundary and despawn the weapon.

Anyone got any ideas?

I had an idea where you could make it so that when you pick up the weapon, it would spawn blockers around the area, like a boundary. And when the weapon spawns again (after being dropped), it would despawn the blockers. The problem is just that you would need some way to trigger a script when the weapon have been picked up. I have tried triggering a script when the weapon despawn, but that doesn’t get triggered when someone picks up the weapon. And I just tried adding a boundary around the weapon that checks when an objects exits the boundary, but that doesn’t work either.

So if you could figure out how to make it trigger a script when you pick up a weapon, my idea might work.

> 2535449348170214;2:
> I had an idea where you could make it so that when you pick up the weapon, it would spawn blockers around the area, like a boundary. And when the weapon spawns again (after being dropped), it would despawn the blockers. The problem is just that you would need some way to trigger a script when the weapon have been picked up. I have tried triggering a script when the weapon despawn, but that doesn’t get triggered when someone picks up the weapon. And I just tried adding a boundary around the weapon that checks when an objects exits the boundary, but that doesn’t work either.
>
> So if you could figure out how to make it trigger a script when you pick up a weapon, my idea might work.

Cool idea.