Where can I find the code for the physgun in sandbox mode?

I hunted through the thing for about twenty minutes and I could not find it. Anyone know where it is?

You won’t find it, it is not written in Lua.

Open up garrysmod_dir.vpk, go to the /scripts folder and you’ll find weapon_physgun, which may be what you’re looking at