Then just make like this, replace only this function
Code:
; Function that runs bot
Func _run()
$run = Not $run
While $run
If PixelGetColor(165, 64) <> 0x5A4D39 Then
Send("{F11}")
Sleep(500)
EndIf
If PixelGetColor(140, 92) <> 0x184563 Then
Send("{F12}")
Sleep(500)
EndIf
WEnd
EndFunc