SWEPs that slow players down when fired

I’ve been playing TF2 as a heavy lately and got an idea from how he walks when he fires his minigun, does anyone know if this is possible in Gmod? If so then I’d like to know what the code is.
Thanks in advance. :smiley: