Made an account just to help clear up how to set it up since it still seems like a lot of people are having trouble.
Copy and paste the code as usual into a AHK script, after you fiddle with the Sense , delz etc. Options scroll down until you find 2 lines of code that look like
if !GetKeyState("Xbutton1") && trigger==true
By default it's set to Xbutton1 which is the 4th key on your mouse. If your mouse doesn't have a 4th key or if you want to change it just google "AHK Keys" and choose a key off of their keys list and replace Xbutton1 with your choice.
In order to actually use the script in game You right click the script and select "run script", once you are in game press Insert to start the script in game , and then hold down what ever key you set in place of the Xbutton1 if something walks into your cross hairs while holding the key down it will automatically fire. You still have to aim everything yourself.
Do note that if you are not using thermal optics or did not set up the sensitivity very well holding down the key will just spam shoot and your pretty much just better off not using it. It decides whether or not to fire based on changing color , so in thermal the change from blue to red makes it much easier for the script. This mainly just for camping and taking a quick shot at hot spots (windows on infection etc.) It's not really great for running and gunning and will most likely result in you shooting at nothing/team mates/Differently colored walls / anything that moves.