Need help with some script ^_^
So, I've been learning to make clients lately and have already developed a few client hacks that aren't even out yet

but i cant seem to figure out anywhere how to make a toggle, such in a script i can press a button and turn my hack on/off
(totally guessing here) something like:
Code:
if keydown L3
~~~some code here~~~
L3:
~~~~some code here~~~
I need to know how to make it work only when pressed and would also like to know how to make it a toggle and if possible be able to use mouse click as the toggle