NEED SOME HELP BY SCRIPTING AN ON OFF

HELLO
I’m Julian and im not teh best in Lua…
I had make a script for me and a frind for tdm what disable the wapon recoil but now i want to make a toggle- vgui witch can turn on and off the function please help me :smiley:
–sry my english isn’t the best


--------------------------------------------mycode---------------------------------

	hook.Add 	("Think", "NoRecoil", function()
		if LocalPlayer() and LocalPlayer():GetActiveWeapon() and LocalPlayer():GetActiveWeapon().Primary then
			LocalPlayer():GetActiveWeapon().Primary.Recoil = 0
		end

end )


I want that i can turn it on and off :S please help me soon :slight_smile: thanks

[editline]31st May 2014[/editline]

*sry my misstake i mean the script that i used


(User was banned for this post ("Use the Developer Discussion section for threads like these" - Megafan))

-snip-

Use code tags