Step 1) Open notepad.
Step 2) Paste this:
alias "MuteToggle" "mute1"
alias "mute1" "sm_mute @!me; alias MuteToggle mute2"
alias "mute2" "sm_unmute @all; alias MuteToggle mute1"
bind kp_ins MuteToggle
Step 3) Save it as "autoexec.cfg" in your cfg folder in Garry's Mod.
Congratulations, now you'll be able to mute everyone except yourself by pressing the numpad 0 key, then unmute everybody when you're done with business by pressing the same key.
Change "kp_ins" to whatever key you prefer if you don't want it to be numpad 0. This unbinds whatever was previously bound to the key (For example, I don't think you'll be able to place a camera in sandbox mode that uses the 0 key.)