Help with a script

Bassicly iam making a swep in garrys mod and iam trying to make it so you keep it if you quit and rejoin if you quit while its equipped.

So i was wondering how could someone do something like this?

(User was banned for this post ("Not a release, see Developer Discussion" - NiandraLades))

That’s where this post should be.