Guest User

Untitled

a guest
Jun 5th, 2020
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.70 KB | None | 0 0
  1. #include <iostream>
  2. #include <Windows.h>
  3. #include <cmath>
  4. #include <ctime>
  5.  
  6. using namespace std;
  7.  
  8. bool On = false;
  9. int CPS;
  10. int x = 0;
  11. int y = 0;
  12. string Randomized;
  13. bool random; //set this to true for auto randomization
  14. int randomYesorNo;
  15. int randomNumGen;
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22. int main() {
  23.  
  24.  
  25.     srand(time(0));
  26.  
  27.  
  28.  
  29.  
  30.     //first cout is optional (just for reference in case the user forgets the keybinds)
  31.     cout << "RShift + Backspace = start; Rcontrol + backspace = stop; Rshift + Rcontrol + backspace = choose CPS." << endl << endl;
  32.     cout << "how many clicks per sec?" << endl;
  33.  
  34.  
  35.     cin >> CPS;
  36.  
  37.  
  38. /*  if you would like to make the program automatically randomize the clicks, just remove this section (all in between)
  39.     and set bool random = true up top    */
  40.     cout << "Randomized?";
  41.     cin >> Randomized;
  42.  
  43.     if (Randomized == "yes" || Randomized == "Yes" || Randomized == "y" || Randomized == "Y")
  44.     {
  45.         random = true;
  46.     }
  47.  
  48.     if (Randomized == "No" || Randomized == "no" || Randomized == "n" || Randomized == "N")
  49.     {
  50.         random = false;
  51.     }
  52.  
  53.     if (!random) {
  54.         randomYesorNo = CPS;
  55.     }
  56.     //delete down to here
  57.  
  58.  
  59.     while (1) {
  60.  
  61.  
  62.         if (random) {
  63.             randomYesorNo = CPS + rand() % 11;
  64.         }
  65.  
  66.  
  67.         if (GetAsyncKeyState(VK_RSHIFT) && GetAsyncKeyState(VK_BACK)) {
  68.  
  69.             On = true;
  70.         }
  71.  
  72.         if (GetAsyncKeyState(VK_RCONTROL) && GetAsyncKeyState(VK_BACK)) {
  73.  
  74.             On = false;
  75.         }
  76.  
  77.         if (GetAsyncKeyState(VK_RSHIFT) && GetAsyncKeyState(VK_RCONTROL) && GetAsyncKeyState(VK_BACK)) {
  78.             cout << "how many clicks per sec?" << endl;
  79.             cin >> CPS;
  80.         }
  81.  
  82.         if (On) {
  83.             mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0);
  84.             mouse_event(MOUSEEVENTF_LEFTUP, x, y, 0, 0);
  85.             Sleep(1000 / randomYesorNo);
  86.         }
  87.  
  88.  
  89.  
  90.     }
  91.  
  92.  
  93. }
Advertisement
Add Comment
Please, Sign In to add comment