Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoTrayIcon
- #RequireAdmin
- #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
- #AutoIt3Wrapper_Icon=Download.ico
- #AutoIt3Wrapper_UseX64=y
- #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
- #include <GUIConstantsEx.au3>
- #include <StaticConstants.au3>
- #include <WindowsConstants.au3>
- #include <WinAPIEx.au3>
- #include <GUIConstants.au3>
- FileInstall("Calibri.ttf", @TempDir & "\Calibri.ttf", 1)
- _WinAPI_AddFontResourceEx(@TempDir & "\Calibri.ttf", $FR_PRIVATE)
- FileInstall("PIZZADUDEBULLETS.ttf", @TempDir & "\PIZZADUDEBULLETS.ttf", 1)
- _WinAPI_AddFontResourceEx(@TempDir & "\PIZZADUDEBULLETS.ttf", $FR_PRIVATE)
- Global $GUI[], $Offset[]
- $GUI.Width = 187
- $GUI.Height = 70 + 21
- $GUI.BGColor = 0x323232
- $GUI.InputBgColor = 0x414141
- $GUI.TextColor = 0xFFFFFF
- $GUI.TitleColor = 0xAADD55
- $GUI.TextColor2 = 0x2D2D2D
- $GUI.TitleTextColor = $GUI.BGColor
- $GUI.LineColor = $GUI.TitleColor
- FileInstall("VAC.jpg", @TempDir & "\VAC.jpg", 1)
- $GUI.Banned = GUICreate("VAC", $GUI.Width, $GUI.Height, -1, -1, BitOR($WS_POPUP, $WS_MINIMIZEBOX, $WS_SYSMENU))
- GUISetBkColor($GUI.BGColor)
- GUISetFont(10, 400, 0, "Calibri")
- $GUI.Close = GUICtrlCreateLabel("G", $GUI.Width - 26, 2, 19, 19)
- GUICtrlSetCursor(-1, 0)
- GUICtrlSetFont(-1, 16, 800, 0, 'PizzaDude Bullets')
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, 0xFF0000)
- $GUI.BannedPic = GUICtrlCreatePic(@TempDir & "\VAC.jpg", 1, 20, $GUI.Width - 2, $GUI.Height - 22)
- FileDelete(@TempDir & "\VAC.jpg")
- $GUI.TitleBar = GUICtrlCreateLabel("VAC Ban", 6, 1, $GUI.Width - 16, 17, $ES_CENTER, $GUI_WS_EX_PARENTDRAG)
- GUICtrlSetColor(-1, $GUI.TitleTextColor)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetFont(-1, 12, 800, 0, "Calibri")
- GUICtrlCreateGraphic(0, 0, $GUI.Width, 21)
- GUICtrlSetBkColor(-1, $GUI.TitleColor)
- GUICtrlCreateGraphic(0, 21, $GUI.Width, $GUI.Height - 21)
- GUICtrlSetBkColor(-1, $GUI.LineColor)
- GUICtrlCreateGraphic(1, 21, $GUI.Width - 3, $GUI.Height - 21 - 2)
- GUICtrlSetBkColor(-1, $GUI.BGColor)
- WinSetTrans($GUI.Banned, "", 245)
- GUISetState(@SW_SHOW)
- _MainLoop()
- Func _MainLoop()
- Do
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE, $GUI.Close
- Exit
- EndSwitch
- Until ProcessExists("cs2.exe")
- EndFunc ;==>_MainLoop
- _Init()
- Func _Init()
- $Offset.dwViewAngles = 0x1A89710
- $Offset.dwCheats = 0x1A8AAE8 + 8
- $Offset.flPitchDown = 0x1A79860 + 8
- $Offset.flPitchUp = 0x1A79870 + 8
- $Offset.ClientDLL = 0
- Do
- $Offset.ClientDLL = _MemoryModuleGetBaseAddress(ProcessExists("cs2.exe"), "client.dll")
- Until $Offset.ClientDLL <> 0
- Global $Process = _WinAPI_OpenProcess(0x1F0FFF, 0, ProcessExists("cs2.exe"))
- EndFunc ;==>_Init
- While ProcessExists("cs2.exe")
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE, $GUI.Close
- Exit
- EndSwitch
- _WriteMem(_ReadMem($Offset.ClientDLL + $Offset.dwCheats, $Process, "uint64") + 0x40, $Process, 1, "dword")
- _WriteMem(_ReadMem($Offset.ClientDLL + $Offset.flPitchDown, $Process, "uint64") + 0x40, $Process, 360, "float")
- _WriteMem(_ReadMem($Offset.ClientDLL + $Offset.flPitchUp, $Process, "uint64") + 0x40, $Process, 360, "float")
- For $i = 0 To 180
- _WriteMem($Offset.ClientDLL + $Offset.dwViewAngles, $Process, $i, "float")
- _WriteMem($Offset.ClientDLL + $Offset.dwViewAngles + 0x8, $Process, 50, "float")
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE, $GUI.Close
- Exit
- EndSwitch
- Sleep(5)
- Next
- For $i = -180 To 0
- _WriteMem($Offset.ClientDLL + $Offset.dwViewAngles, $Process, $i, "float")
- _WriteMem($Offset.ClientDLL + $Offset.dwViewAngles + 0x8, $Process, -50, "float")
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE, $GUI.Close
- Exit
- EndSwitch
- Sleep(5)
- Next
- WEnd
- Func _ReadMem($BaseAddress, $hProcess, $iSize)
- $pBuf = DllStructCreate($iSize)
- $iRead = 0
- _WinAPI_ReadProcessMemory($hProcess, $BaseAddress, DllStructGetPtr($pBuf), DllStructGetSize($pBuf), $iRead)
- Return DllStructGetData($pBuf, 1)
- EndFunc ;==>_ReadMem
- Func _WriteMem($BaseAddress, $hProcess, $Value, $iSize)
- $pBuf = DllStructCreate($iSize)
- DllStructSetData($pBuf, 1, $Value)
- $iWrite = 0
- _WinAPI_WriteProcessMemory($hProcess, $BaseAddress, DllStructGetPtr($pBuf), DllStructGetSize($pBuf), $iWrite)
- EndFunc ;==>_WriteMem
- Func _MemoryModuleGetBaseAddress($iPID, $sModule)
- If Not ProcessExists($iPID) Then Return SetError(1, 0, 0)
- If Not IsString($sModule) Then Return SetError(2, 0, 0)
- Local $PSAPI = DllOpen("psapi.dll")
- ;Get Process Handle
- Local $hProcess
- Local $PERMISSION = BitOR(0x0002, 0x0400, 0x0008, 0x0010, 0x0020) ; CREATE_THREAD, QUERY_INFORMATION, VM_OPERATION, VM_READ, VM_WRITE
- If $iPID > 0 Then
- Local $hProcess = DllCall("kernel32.dll", "ptr", "OpenProcess", "dword", $PERMISSION, "int", 0, "dword", $iPID)
- If $hProcess[0] Then
- $hProcess = $hProcess[0]
- EndIf
- EndIf
- ;EnumProcessModules
- Local $Modules = DllStructCreate("ptr[1024]")
- Local $aCall = DllCall($PSAPI, "int", "EnumProcessModules", "ptr", $hProcess, "ptr", DllStructGetPtr($Modules), "dword", DllStructGetSize($Modules), "dword*", 0)
- If $aCall[4] > 0 Then
- Local $iModnum = $aCall[4] / 4
- Local $aTemp
- For $i = 1 To $iModnum
- $aTemp = DllCall($PSAPI, "dword", "GetModuleBaseNameW", "ptr", $hProcess, "ptr", Ptr(DllStructGetData($Modules, 1, $i)), "wstr", "", "dword", 260)
- If $aTemp[3] = $sModule Then
- DllClose($PSAPI)
- Return Ptr(DllStructGetData($Modules, 1, $i))
- EndIf
- Next
- EndIf
- DllClose($PSAPI)
- Return SetError(-1, 0, 0)
- EndFunc ;==>_MemoryModuleGetBaseAddress
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement