chrondog

Untitled

Jan 1st, 2013
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.47 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3. #include <Windows.h>
  4. #include <TlHelp32.h>
  5. #include "ModuleProcess.h"
  6. #include "Colors.h"
  7.  
  8. using namespace std;
  9.  
  10. ULONG Client;
  11. ULONG GameOverlayRenderer;
  12. ULONG VGUIMatSurface;
  13.  
  14. HANDLE hl2handle;
  15. ULONG hl2Process;
  16.  
  17. int ONLADDER();
  18. int INWATER();
  19. int ONGROUND();
  20. int INCHAT();
  21. void JUMP();
  22.  
  23. int main()
  24. {
  25.         hl2handle = GetProcessHandle("hl2.exe", hl2Process);
  26.         Client = GetModuleAddress("client.dll", hl2Process);
  27.         GameOverlayRenderer = GetModuleAddress("gameoverlayrenderer.dll", hl2Process);
  28.         VGUIMatSurface = GetModuleAddress("vguimatsurface.dll", hl2Process);
  29.  
  30.         if(hl2handle)
  31.         {
  32.             cout << green << "\n\n\n\n\n\n\n\n\n\n\t\t\t  External bunnyhop enabled\n\t\t\t  Put <unbind space> in console\n\t\t\t  Hold SPACE to bunnyhop";
  33.             long int FL_ONGROUND = 0, FL_INWATER = 0, FL_ONLADDER = 0, FL_INCHAT = 0;
  34.             while(1)
  35.             {
  36.                 FL_INCHAT = INCHAT(); FL_ONGROUND = ONGROUND(); FL_INWATER = INWATER(); FL_ONLADDER = ONLADDER();
  37.                 if(GetKeyState(VK_SPACE) & (1 << 15) && !FL_INCHAT)
  38.                 {
  39.                     if(FL_ONGROUND != -1 || FL_INWATER != 0 && FL_INWATER != 1 || FL_ONLADDER == 9)
  40.                         JUMP();
  41.                     else
  42.                         Sleep(1);
  43.                 }
  44.                 else Sleep(1);
  45.             }
  46.         }
  47.         cin.get();
  48.         return 0;
  49. }
  50.  
  51. int ONLADDER()
  52. {
  53.     int OnLadder = 0;
  54.     ReadProcessMemory(hl2handle, LPCVOID(Client+0x76202C), &OnLadder, sizeof(OnLadder), NULL);
  55.     ReadProcessMemory(hl2handle, LPCVOID(OnLadder+0x13c), &OnLadder, sizeof(OnLadder), NULL);
  56.     return OnLadder;
  57. }
  58.  
  59. int INWATER()
  60. {
  61.     int InWater = 0;
  62.     ReadProcessMemory(hl2handle, LPCVOID(Client+0x77FE3C), &InWater, sizeof(InWater), NULL);
  63.     return InWater;
  64. }
  65.  
  66. int ONGROUND()
  67. {
  68.     int OnGround = 0;
  69.     ReadProcessMemory(hl2handle, LPCVOID(Client+0x782158), &OnGround, sizeof(OnGround), NULL);
  70.     return OnGround;
  71. }
  72.  
  73. int INCHAT()
  74. {
  75.     int InChat = 0, InChat2 = 0;
  76.     ReadProcessMemory(hl2handle, LPCVOID(GameOverlayRenderer + 0x7BE70), &InChat, sizeof(InChat), NULL);
  77.     ReadProcessMemory(hl2handle, LPCVOID(VGUIMatSurface+0x114064), &InChat2, sizeof(InChat2), NULL);
  78.     if (InChat || !InChat2)
  79.         return 1;
  80.     else
  81.         return 0;
  82. }
  83.  
  84. void JUMP()
  85. {
  86.     int JUMP = 5; WriteProcessMemory(hl2handle, LPVOID(Client+0x7711E8), &JUMP, sizeof(JUMP), NULL);
  87.     Sleep(5);
  88.     JUMP = 4; WriteProcessMemory(hl2handle, LPVOID(Client+0x7711E8), &JUMP, sizeof(JUMP), NULL);
  89. }
Advertisement
Add Comment
Please, Sign In to add comment