Guest User

main.cpp

a guest
Aug 2nd, 2015
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.82 KB | None | 0 0
  1. #include "Offsets.h"
  2. #include "Memory.h"
  3. #include "readMemory.h"
  4. #include "Math.h"
  5. #include "Vector3.h"
  6. #include <iostream>
  7. #include <thread>
  8. #include <ctime>
  9. using namespace std;
  10.  
  11. readMemory mod;
  12. Offsets off;
  13. LocalPlayer pl;
  14. Weapon wep;
  15.  
  16. void antiBhop()
  17. {
  18.     while (true)
  19.     {
  20.         srand(time(NULL));
  21.         int randSleep = rand() % 30 + 1; // random value between 0 and 30
  22.  
  23.         int Flags = Memory::Read<int>(pl.Player + off.m_fFlags);
  24.  
  25.         if ((Flags & 0x1) == 1 && (GetAsyncKeyState(VK_SPACE) & 0x8000))
  26.         {
  27.             //Sleep(randSleep);
  28.             Memory::Write<int>(mod.ClientDLL + off.jumpOff, 5);
  29.             Sleep(20);
  30.             Memory::Write<int>(mod.ClientDLL + off.jumpOff, 4);
  31.         }
  32.         Sleep(10);
  33.     }
  34. }
  35.  
  36. float chooseX()
  37. {
  38.     while (true)
  39.     {
  40.         srand(GetTickCount());
  41.         int num = rand() % 50 + 1;
  42.         float randAngX = (rand() % 6000 + 1.0f) / 1000.0f; // pitch; random value between 0.000 and 6.000
  43.         float negrandAngX = -randAngX; // random value between -6.0000 and 0.0
  44.  
  45.         if (num <= 25)
  46.             return randAngX;
  47.         else
  48.             return negrandAngX;
  49.  
  50.         float randSleep = (rand() % 20 + 1.0f) / 10.0f;
  51.         Sleep(randSleep);
  52.     }
  53. }
  54.  
  55. float chooseY()
  56. {
  57.     while (true)
  58.     {
  59.         srand(time(NULL));
  60.         int num = rand() % 50 + 1;
  61.         float randAngY = (rand() % 1500 + 1.0f) / 1000.0f; // yaw; random value between 0.000 and 1.500
  62.         float negrandAngY = -randAngY; // random value between -1.000 and 0.000
  63.  
  64.         if (num <= 25)
  65.             return randAngY;
  66.         else
  67.             return negrandAngY;
  68.  
  69.         Sleep(5);
  70.     }
  71. }
  72.  
  73. void silver1Aim()
  74. {
  75.     while (true)
  76.     {
  77.         DWORD currW = wep.currW;
  78.  
  79.         int WepAmmo = Memory::Read<int>(currW + off.m_iClip1);
  80.  
  81.         int ShotsFired = Memory::Read<int>(pl.Player + off.iShotsFired);
  82.  
  83.         if (ShotsFired > 1)
  84.         {
  85.             mouse_event(MOUSEEVENTF_MOVE, chooseX(), chooseY(), NULL, NULL);
  86.         }
  87.         Sleep(5);
  88.     }
  89. }
  90. void rf()
  91. {  
  92.     while (true)
  93.     {
  94.         if ((GetAsyncKeyState(VK_MBUTTON) & 0x8000))
  95.         {
  96.             Memory::Write<int>(mod.ClientDLL + off.atkOff, 5);
  97.             Sleep(20);
  98.             Memory::Write<int>(mod.ClientDLL + off.atkOff, 4);
  99.         }
  100.         Sleep(5);
  101.     }
  102. }
  103.  
  104. void weaponStuffs()
  105. {
  106.     while (true)
  107.     {
  108.         wep.currWep(pl.Player);
  109.  
  110.         int iWeaponID = Memory::Read<int>(wep.currW + off.m_iWeaponID);
  111.         int WepAmmo = Memory::Read<int>(wep.currW + off.m_iClip1);
  112.         int Health = Memory::Read<int>(pl.Player + off.iHealth);
  113.         int ShotsFired = Memory::Read<int>(pl.Player + off.iShotsFired);
  114.  
  115.         cout << "Weapon ID: " << iWeaponID << endl;
  116.         cout << "Weapon Ammo: " << WepAmmo << endl;
  117.         cout << "Health: " << Health << endl;
  118.         cout << "Shots Fired: " << ShotsFired << endl;
  119.         Sleep(1000);
  120.     }
  121. }
  122.  
  123. int main()
  124. {
  125.     Memory::Process("csgo.exe");
  126.     mod.getClient();
  127.  
  128.     thread antiBhopT(antiBhop);
  129.  
  130.     thread chooseAngXT(chooseX);
  131.     thread chooseAngYT(chooseY);
  132.     thread silver1AimT(silver1Aim);
  133.  
  134.     thread rfT(rf);
  135.  
  136.     /*weaponStuffs();*/
  137.  
  138.     while (true)
  139.     {
  140.         int i = 1;
  141.         Sleep(500);
  142.     }
  143. }
Advertisement
Add Comment
Please, Sign In to add comment