GMod Weapons Restrict Question

I am attempting to build a small script which I am still figuring out what the best way to go about it would be.

I want it to toggle when someone enters !build
it doesn’t allow SWEP spawning, but allows them to have their toolgun, physics gun, and the camera. I read about PlayerSpawnSWEP but no idea how to use this hook.
But when they type !dm it allows them to get weapons again.

My issues are, where would I code these statements, as I have been testing the !build part itself in addons/ulx/lua/ulx/modules/sh (with ulx addon) which I’m sure is probably wrong.
Second, what is the best way to do this, and if anyone could provide a route to go on. Again, I am not exactly up to par yet on hooks. I’ve been dipping my hand in Lua for about 2 weeks now and understand the beginners stuff mostly. So any help would be appreciated.

Thanks!

Oh. I failed to mention. The other route I thought of taking was with the restriction system (URS) in ULX, restricting weapons and then a command to add them to that group upon toggle, but I think that is an extremely sloppy way of doing it if theirs a hook I can use, or some other way, which I’m pretty sure their is.