Advertisement
Guest User

Untitled

a guest
Sep 20th, 2019
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.74 KB | None | 0 0
  1. #include <Windows.h>
  2. #include "GameClasses.h"
  3.  
  4. BOOL bSpeed, bJump, bDistance, bNXChams, bNoFog = false;
  5. FLOAT fSpeed = 285.00, fHeight = 330.00;
  6.  
  7. BOOL RunHack() {
  8.  
  9. while (GetModuleHandle("cshell.dll") == NULL) { } // Just wait...
  10.  
  11. // Do hacks
  12. while (true)
  13. {
  14. // On/Off Toggle
  15. if (GetAsyncKeyState(VK_NUMPAD1) & 1)
  16. {
  17. bSpeed = !bSpeed;
  18. }
  19. else if (GetAsyncKeyState(VK_NUMPAD2) & 1)
  20. {
  21. bJump = !bJump;
  22. }
  23. else if (GetAsyncKeyState(VK_NUMPAD3) & 1)
  24. {
  25. bDistance = !bDistance;
  26. }
  27. else if (GetAsyncKeyState(VK_NUMPAD4) & 1) {
  28. bNXChams = !bNXChams;
  29. }
  30. else if (GetAsyncKeyState(VK_NUMPAD5) & 1)
  31. {
  32. bNoFog = !bNoFog;
  33. }
  34.  
  35. //Increase/Decrease speed
  36. if (GetAsyncKeyState(VK_INSERT) & 1)
  37. {
  38. fSpeed += 75.0F;
  39. }
  40. else if (GetAsyncKeyState(VK_DELETE) & 1)
  41. {
  42.  
  43. if ((fSpeed - 75.0F) >= 285.00)
  44. {
  45. fSpeed -= 75.0F;
  46. }
  47. }
  48.  
  49. //Increase/Decrease Height
  50. if (GetAsyncKeyState(VK_HOME) & 1)
  51. {
  52. fHeight += 75.0F;
  53. }
  54. else if (GetAsyncKeyState(VK_END) & 1)
  55. {
  56. // Never below 330.00
  57. if ((fHeight - 75.0F) >= 330.00)
  58. {
  59. fHeight -= 75.0F;
  60. }
  61. }
  62.  
  63. cMoveMGR* pMoveMgr = (cMoveMGR*)0x38355DB8;
  64.  
  65. if (pMoveMgr) {
  66.  
  67. if (bJump) {
  68. // Jump Hack
  69. pMoveMgr->JumpVel = fHeight;
  70. }
  71. else {
  72. pMoveMgr->JumpVel = 330.00F;
  73. }
  74.  
  75. if (bSpeed)
  76. {
  77. // Speed Hack
  78. pMoveMgr->WalkVel = fSpeed;
  79. pMoveMgr->FRunVel = fSpeed;
  80. pMoveMgr->BRunVel = fSpeed;
  81. pMoveMgr->SRunVel = fSpeed;
  82. pMoveMgr->DuckVel = fSpeed;
  83. }
  84. else
  85. {
  86. pMoveMgr->WalkVel = 50.00F;
  87. pMoveMgr->FRunVel = 285.00F;
  88. pMoveMgr->BRunVel = 285.00F;
  89. pMoveMgr->SRunVel = 285.00F;
  90. pMoveMgr->DuckVel = 70.0F;
  91. }
  92.  
  93. if (bDistance)
  94. {
  95. //Activation Distance
  96. pMoveMgr->ActivationDistance = 99999999.0F;
  97. }
  98. else {
  99. pMoveMgr->ActivationDistance = 100.00F;
  100. }
  101. }
  102.  
  103. if(bNXChams)
  104. {
  105. ((void(__cdecl*)(const char* Key, float Value))(0x3745A970))("SkelModelStencil", 1.0);
  106. }
  107. else {
  108. ((void(__cdecl*)(const char* Key, float Value))(0x3745A970))("SkelModelStencil", 0.0);
  109. }
  110.  
  111. if (bNoFog)
  112. {
  113. ((void(__cdecl*)(const char* Key, float Value))(0x3745A970))("FogEnable", 0.0);
  114. }
  115. else {
  116. ((void(__cdecl*)(const char* Key, float Value))(0x3745A970))("FogEnable", 1.0);
  117. }
  118. }
  119.  
  120. return true;
  121. }
  122.  
  123. BOOL WINAPI DllMain(HMODULE MODULE, DWORD Reason, LPVOID Reserved) {
  124.  
  125. static HANDLE THREAD;
  126.  
  127. switch (Reason)
  128. {
  129. case DLL_PROCESS_ATTACH:
  130. DisableThreadLibraryCalls(MODULE);
  131. THREAD = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)RunHack,0,0,0);
  132. break;
  133.  
  134. case DLL_PROCESS_DETACH:
  135. if (THREAD != NULL)
  136. {
  137. TerminateThread(THREAD, 0);
  138. }
  139. break;
  140. }
  141.  
  142. return true;
  143. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement