Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. #include <Windows.h>
  2. #include <iostream>
  3. #include <string>
  4.  
  5.  
  6. using namespace std;
  7.  
  8. DWORD pid;
  9. int Health = 0x11AA378;
  10. int MyHealth;
  11. int Ammo = 0x011AA3D0;
  12. int MyAmmo;
  13. int NewAmmo;
  14. int newHealth;
  15. int speed = 0x510CDC;;
  16. int myspeed;
  17. int newspeed;
  18. int godmode = 999999;
  19. int crosshair = 0x50F20C;
  20. int mycrosshair;
  21. int newcrosshair;
  22.  
  23.  
  24. int main()
  25. {
  26. HWND hWnd = FindWindowA(0, ("AssaultCube"));
  27. GetWindowThreadProcessId(hWnd, &pid);
  28. cout << "Process ID: " << pid << endl;
  29. HANDLE pHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
  30. ReadProcessMemory(pHandle, (LPVOID)Ammo, &MyAmmo, sizeof(MyAmmo), 0);
  31. cout << "Your Ammo: " << MyAmmo << endl;
  32. ReadProcessMemory(pHandle, (LPVOID)Health, &MyHealth, sizeof(MyAmmo), 0);
  33. cout << "Your Health: " << MyHealth << endl;
  34. ReadProcessMemory(pHandle, (LPVOID)speed, &myspeed, sizeof(myspeed), 0);
  35. cout << "Game Speed: " << myspeed << endl;
  36. ReadProcessMemory(pHandle, (LPVOID)crosshair, &myspeed, sizeof(myspeed), 0);
  37. cout << "Your Crosshair: " << mycrosshair << endl;
  38. cout << "Ammo Hack F1" << endl;
  39. cout << "Health Hack F2" << endl;
  40. cout << "Set Game Speed F3" << endl;
  41. cout << "GodMode F4" << endl;
  42. cout << "SetCrosshair F5" << endl;
  43.  
  44.  
  45. while (true)
  46. {
  47. if (GetKeyState(VK_F1))
  48. {
  49. cout << "How Much Ammo Do You want: ";
  50. cin >> NewAmmo;
  51. Sleep(100);
  52. WriteProcessMemory(pHandle, (LPVOID)Ammo, &NewAmmo, sizeof(NewAmmo), 0);
  53. cout << "Ammo Set To " << NewAmmo << endl;
  54. }
  55.  
  56. if (GetKeyState(VK_F2))
  57. {
  58. cout << "How Much Health Do You want: ";
  59. cin >> newHealth;
  60. Sleep(100);
  61. WriteProcessMemory(pHandle, (LPVOID)Health, &newHealth, sizeof(newHealth), 0);
  62. cout << "Health Set To " << newHealth << endl;
  63. }
  64.  
  65. if (GetKeyState(VK_F3))
  66. {
  67. cout << "Enter Game Speed: ";
  68. cin >> newspeed;
  69. WriteProcessMemory(pHandle, (LPVOID)speed, &newspeed, sizeof(newspeed), 0);
  70. cout << "Speed Set To: " << newspeed << endl;
  71. }
  72.  
  73. if (GetKeyState(VK_F4))
  74. {
  75. WriteProcessMemory(pHandle, (LPVOID)Health, &godmode, sizeof(godmode), 0);
  76. }
  77.  
  78. if (GetKeyState(VK_F5))
  79. {
  80. cout << "Enter Crosshair Size: ";
  81. cin >> mycrosshair;
  82. WriteProcessMemory(pHandle, (LPVOID)crosshair, &newcrosshair, sizeof(newcrosshair), 0);
  83. cout << "Crosshair Set To: " << mycrosshair << endl;
  84. }
  85. }
  86. return 0;
  87.  
  88. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement