Sway and accessories style cod mw

hello I want to do a cod mw style weapon sway but I have no idea how to do it I also want to know if an accessory system could be made that influences the behavior of the weapon someone knows how to do it