AHK Toggle Auto KeyPress with Modifiers Script

What this script does is when you press the tick key (tilde ~ key to the left of the 1 key) it toggles this script on. While on, it continuously presses the 1 key unless a modifier, shift, alt, ctrl, is pressed until it’s toggled back off. I like the toggle function because it allows me to focus on mechanics and movement more than mashing the script key over and over.

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
#MaxThreadsPerHotkey 2
toggle = 0
`::
Toggle := !Toggle
     While Toggle{
	if GetKeyState("LCtrl", "P")
	Send ^1
	else if GetKeyState("LShift", "P")
	Send +1
	else if GetKeyState("LAlt", "P")
	Send !1
	else
	Send 1
	sleep 100
	}
return

Hey @Ky1e this looks nice.

I am new to scripts so I have a basic question. What keys get pressed while pressing down the LCtrl, LShift and LAlt? Is it in the send command? " ^ " " + and " ! "

can to turn this into a keypress one? i dont really like using toggles and would rather hold the assigned key down.