Code:
#RequireAdmin
HotKeySet("{F8}","_Main")
HotKeySet("{F9}","_Pause")
HotKeySet("{F10}","_Exit")
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("AdBuck Anti AFK", 403, 99, 192, 124)
$Button1 = GUICtrlCreateButton("Start", 8, 8, 123, 49)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$Button2 = GUICtrlCreateButton("Pause", 136, 8, 123, 49)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$Button3 = GUICtrlCreateButton("Exit", 264, 8, 123, 49)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$Label1 = GUICtrlCreateLabel("Hotkeys : Start=F8 Pause=F9 Exit=F10", 8, 64, 380, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_Main()
Case $Button2
_Pause()
Case $Button3
_Exit()
EndSwitch
WEnd
Func _Main()
$i = 0
$i2 = 0
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button2
_Pause()
Case $Button3
_Exit()
EndSwitch
$random = Random(8000,18000,1)
$random2 = Random(1,100,1)
sleep($random)
If $random2 > 50 Then
Do
$random3 = Random(100,300,1)
sleep($random3)
MouseClick("Left")
$i = $i + 1
Until $i = 3
$i = 0
Else
Do
$random3 = Random(100,300,1)
sleep($random3)
send("lolRofl")
$i2 = $i2 + 1
Until $i2 = 3
$i2 = 0
EndIf
WEnd
EndFunc
Func _Pause()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_Main()
Case $Button3
_Exit()
EndSwitch
sleep(100)
WEnd
EndFunc
Func _Exit()
Exit
EndFunc