Ending a script?

Ok I put a script on a frame

“_root.background.gotoAndStop(4);
_root.weapon.gotoAndPlay(“shotgun”);”

Well Now when I try to change the weapons it goes BACK to settings on the frame :P. So I was wondering if anyone could tell me a way to EndScript?