#RequireAdmin
#include <NomadMemory.au3>
#include <Apple.au3>
#include <WinApi.au3>
#include <String.au3>
#include <GUIConstantsEx.au3>
ToolTip("Ожидание процесса игры", 0, 0)
While 1
If ProcessExists("hl2.exe") > 0 Then ExitLoop
WEnd
ToolTip("", 0, 0)
$Pid = ProcessExists("hl2.exe")
$Open = _MemoryOpen($Pid)
OnAutoItExitRegister("_Exit")
AdlibRegister("_Wait", 500)
_Apple_Startup(1, 0x00FFFF, 0x00FF00, 0xFF0000)
$GUI = _Apple_Draw_Gui(150, 854, 1, "", 0x800080, 230)
_Apple_Create_Text("----------------", 150)
GUICtrlSetBkColor(-1, 0xFF0000)
_Apple_Create_Function("WallHack", 110)
_Apple_Create_Text("----------------", 150)
GUICtrlSetBkColor(-1, 0xFF0000)
_Apple_State_Gui(1, $GUI)
_Apple_Topmost_Check("")
_Apple_Enable_Up_Down()
_hotkey_assign(45, "_GUI")
$Gui_ = 1
While 1
sleep(2000)
WEnd
Func _0($action)
If $action = 1 Then
_MemoryWrite(0x243B0C9C,$open,"2","dword")
ElseIf $action = 0 Then
_MemoryWrite(0x243B0C9C,$open,"0","dword")
EndIf
EndFunc
Func _gui()
If $Gui_ = 1 Then
_Apple_State_Gui(0, $Gui)
$Gui_ = 0
Else
_Apple_State_Gui(1, $Gui)
$Gui_ = 1
EndIf
EndFunc
Func _Wait()
If ProcessExists("hl2.exe") = 0 Then
_MemoryClose($Open)
Exit
EndIf
EndFunc
Func _Exit()
_MemoryClose($Open)
Exit
EndFunc