i have the code on a first dot first frame on timeline and goes all the way to frame 17 i want that code to now change when i click the image of a shotgun but how to i get it to change

for example

if i click the image of handgun i shoot hand gun now same with shot gun

if i use the code twice i get both shot gun and hand gun bullets at the same time