Advertisement
captmicro

Untitled

Apr 26th, 2011
391
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.60 KB | None | 0 0
  1. SetDebugPrivileges()
  2.  
  3. local hwnd = 0
  4. while (hwnd == 0) do
  5.     hwnd = FindWindow("Synergy")
  6. end
  7.  
  8. local procID = GetProcessId(hwnd)
  9. WriteConsole("Process ID: " .. tostring(procID) .. "\n")
  10. local procHandle = OpenProcess(PROCESS_ALL_ACCESS, procID)
  11. WriteConsole("Process Handle: " .. tostring(procHandle) .. " [" .. tostring(PROCESS_ALL_ACCESS) .. "]\n")
  12.  
  13. local engine = 0x100A0000 --GetBaseAddress(procHandle, "engine.dll")
  14. local sv_cheats = engine + 0x51C978
  15. local host_timescale = engine + 0x383E20
  16. local host_framerate = engine + 0x3839C0
  17. local r_drawothermodels = 0x5243C578
  18. local tmp = 0
  19.  
  20. while (GetAsyncKey(VK_END) == 0) do --END
  21.     if (GetAsyncKey(VK_UP) == 1) then
  22.         tmp = ReadInt(procHandle, host_framerate)
  23.         if (tmp < 10) then
  24.             WriteInt(procHandle, host_framerate, tmp + 1)
  25.             WriteConsole("speed " .. (tmp + 1) .. "x\n")
  26.         end
  27.     end
  28.     if (GetAsyncKey(VK_DOWN) == 1) then
  29.         tmp = ReadInt(procHandle, host_framerate)
  30.         if (tmp > 1) then
  31.             WriteInt(procHandle, host_framerate, tmp - 1)
  32.             WriteConsole("speed " .. (tmp - 1) .. "x\n")
  33.         end
  34.     end
  35.     if (GetAsyncKey(VK_F9) == 1) then
  36.         if (ReadInt(procHandle, sv_cheats) == 0) then
  37.             WriteInt(procHandle, sv_cheats, 1)
  38.             WriteConsole("sv_cheats on\n")
  39.         else
  40.             WriteInt(procHandle, sv_cheats, 0)
  41.             WriteConsole("sv_cheats off\n")
  42.         end
  43.     end
  44.     if (GetAsyncKey(VK_F10) == 1) then
  45.         if (ReadInt(procHandle, r_drawothermodels) == 1) then
  46.             WriteInt(procHandle, sv_cheats, 2)
  47.             WriteConsole("wallhack on\n")
  48.         else
  49.             WriteInt(procHandle, sv_cheats, 1)
  50.             WriteConsole("wallhack off\n")
  51.         end
  52.     end
  53.     Sleep(100)
  54. end
  55.  
  56. CloseHandle(procHandle)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement