#MaxHotkeysPerInterval 99000000
SendMode Input
Process = csgo.exe
DLLName = client_panorama.dll
dwLocalPlayer = 0xD2EB94
fov = 0x31E4
fovvalue = 90
Num = 0
Process, Exist, %Process%
PID = %ErrorLevel%
if (!PID)
{
MsgBox, [!] CS:GO is not running!
ExitApp
}
ProcessHandle := GetProcessHandle("Counter-Strike: Global Offensive")
if (!ProcessHandle)
{
MsgBox, [!] Failed to get handle!
ExitApp
}
Client := GetDllBase(DLLName, PID)
if (!Client)
{
MsgBox, [!] Failed to get %DLLName% from %Process%!
ExitApp
}
LocalPlayer := ReadMemory(Client + dwLocalPlayer, PID, ProcessHandle)
$capslock::
while GetKeystate("capslock", "P")
{
WriteMemoryUChar( localplayer + fov, 46, PID)
}
return
$MButton::
while GetKeystate("MButton", "P")
{
WriteMemoryUChar( localplayer + fov, 90, PID)
}
return
$rshift::
while GetKeystate("rshift", "P")
{
WriteMemoryUChar( localplayer + fov, 150, PID)
}
return
WriteMemoryUChar( adress, value, PID = 0){
ProcessHandle := DllCall("OpenProcess", "UInt", 2035711, "char", 0, "UInt", PID, "Ptr")
DllCall("WriteProcessMemory", "Ptr", ProcessHandle, "Ptr", adress, "UChar*", value, "Ptr", 1, "Ptr", 0)
DllCall("CloseHandle", "Ptr", ProcessHandle)
return
}
ReadMemory(MADDRESS,PID = 0, ProcessHandle = -1)
{
VarSetCapacity(MVALUE,4,0)
DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)
Loop 4
result += *(&MVALUE + A_Index-1) << 8*(A_Index-1)
SetFormat, Integer, D
return, result
}
GetDllBase(DllName, PID = 0)
{
TH32CS_SNAPMODULE := 0x00000008
INVALID_HANDLE_VALUE = -1
VarSetCapacity(me32, 548, 0)
NumPut(548, me32)
snapMod := DllCall("CreateToolhelp32Snapshot", "Uint", TH32CS_SNAPMODULE
, "Uint", PID)
If (snapMod = INVALID_HANDLE_VALUE) {
Return 0
}
If (DllCall("Module32First", "Uint", snapMod, "Uint", &me32)){
while(DllCall("Module32Next", "Uint", snapMod, "UInt", &me32)) {
If !DllCall("lstrcmpi", "Str", DllName, "UInt", &me32 + 32) {
DllCall("CloseHandle", "UInt", snapMod)
Return NumGet(&me32 + 20)
}
}
}
DllCall("CloseHandle", "Uint", snapMod)
Return 0
}
GetProcessHandle(name)
{
winget, pid, PID, %name%
h := DllCall("OpenProcess", "int", 2035711, "char", 0, "UInt", pid, "UInt")
return, h
}
end::exitapp
home::reload