Animation override

Hey im trying to override animations of just 1 weapon, im trying to make it that if holding weapon then the function overrides the current playermodels animations, i cant figure out how to make a lua file that does that please help