Maybe something like this :
 
#include <MsgBoxConstants.au3>
HotKeySet("{ESC}", "_Terminate")
HotKeySet("{F8}", "_PauseScript")
Global $bPaused = False
; Main Loop
While 1
	Sleep(100)
WEnd
Func _PauseScript()
	$bPaused = True
	ToolTip("Script is paused", 10, 10)
	If MsgBox(0, 'Pause', 'Script is paused') = $IDOK Then
		$bPaused = False
		ToolTip("")
		Return
	EndIf
EndFunc   ;==>_PauseScript
Func _Terminate()
    Exit
EndFunc