like this
(keep)leftclick - loop while hold [delay 5ms - rs left (-3,0) - delay 5ms - rs left (3,5) - delay 5ms-  rs left (-3,0) - delay 5ms-  rs left (3,-4)]
It's much more effective than making anti recoil script of each guns. It works with almost every gun, optics