Sorry then...so is your code as you are showing it....is it actually how you are writing it in your script?

e.g
if key 1 gun = 1 should be
if(key_1 = 1)
{
gun = 1;
}
or so........

Do check with the Debug panel to see where the greatest amount of numbers are...
It could be a repeating loop increasing itself as time goes on....
e.g. under 'Count Of', check 'fnc' to see if it is climbing, if it is then you have the cause of your bottleneck so recheck your code......

It could be something else but you wont really get a clue on it if you dont use the Debug process.....