You can't get banned from AHK scripts or any scripts that don't modify game data, vac is automated by detection of changed or non-official strings.
For those saying it wont work, change to windowed, and edit the codes res to the center of your screens res.
e.g; my res is 1280 x 1024 so the mid is 640 x 512, now since the screen has moved down a little bit (at least for me) because of windowed, I'll change it to 632, 526,
~F6::
PixelGetColor, initialcolour, 632, 526, RGB ; Finds Colour
status := "waiting"
while status = "waiting" {
PixelGetColor, currentcolour, 632, 526, RGB ; Checks Colour
if (initialcolour = currentcolour and status = "waiting")
Sleep, 10
else {
send {LButton}
status := "clicked"
}
}
return
Of course depending on your crosshair you'll need to edit your res a teeny bit higher or lower and sideways so it doesn't continuously look for a change in your crosshairs color (oh the joys of ahk).
Anyway, this isn't perfect yet, it still picks up particles and shoots, so maybe add variation. I tried myself, but my level of experience lies in c++.
If anyone wonders, this works in any fps game. And as other games has detected if autoit is open (even if not at all related to the game), there is a chance it could happen with cs:go and ahk because of this very script. Even if it doesn't always shoot on time.