AHK questions

I had a hard time finding a AHK script that would allow me to use all of the modifiers correctly with a razer mouse.But this works.

; Disable Alt+Tab
!Tab::Return

; Disable Windows Key + Tab
#Tab::Return

#ifWinActive World of Warcraft
{
$1::
$^1::
$+1::
$!1::
Loop
{
if not GetKeyState("1", "P")
break
if GetKeyState("LCtrl", "P")
Send ^1
else if GetKeyState("LShift", "P")
Send +1
else if GetKeyState("LAlt", "P")
Send !1
else
Send 1
sleep 135
}
return
}
{
$2::
$^2::
$+2::
$!2::
Loop
{
if not GetKeyState("2", "P")
break
if GetKeyState("LCtrl", "P")
Send ^2
else if GetKeyState("LShift", "P")
Send +2
else if GetKeyState("LAlt", "P")
Send !2
else
Send 2
sleep 135
}
return
}

Now I’m trying to figure out how to make it so that if I press 2 it repeats this key until pressed again. I’ve tried pasting a global loop but that didn’t seem to work. I would be grateful for any help.