How would I go about making a script where when you enter a area

How would I go about making a script where when you enter a area you are given a sword, and pvp is turned on, and when you leave that area, the sword is removed and pvp gets turned off?

You could have a RunService.RenderStepped on the client-side which checks position, then use FireServer to give them the sword.

There are many ways to make this.

You can use Region3 to do this. I suggest reading some tutorials if you’re looking to use it.