gun action (full auto) script?

hey! i was wondering if there was a script, or someway to alow the action on a gun to fly open when shot. and when you reload, the characters hands close the action to “load” the amo into the “champer”. im thinking along the lines on how in call of duty when you reload you see the character close the action. my gun model will be a Thompson m1a1 and i am trying to find out how to do this for this gun. any ideas?

Trigger an animation on the gun object when you reload.