WilliamHarlow

cleaned up

Aug 27th, 2021
727
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.17 KB | None | 0 0
  1. #include <iostream>
  2. #include <Windows.h>
  3. #include <string>
  4. using namespace std;
  5. /* colors for rainbow
  6. 0 = Black
  7. 1 = Blue
  8. 2 = Green
  9. 3 = Aqua
  10. 4 = Red
  11. 5 = Purple
  12. 6 = Yellow
  13. 7 = White
  14. 8 = Gray
  15. 9 = Light Blue
  16. A = Light Green
  17. B = Light Aqua
  18. C = Light Red
  19. D = Light Purple
  20. E = Light Yellow
  21. F = Bright White
  22. 7 = F = bright white white
  23. system("color 02");For example, this is black green text
  24. */
  25. int x = 0, y = 0, cps;
  26. bool click = false;
  27. string rl;
  28.  
  29. void
  30. BootMenu ()
  31. {
  32.   cout << " oOOOOo   oOo   .o000o.  .o000o.  .oOOOo.   \n";
  33.   cout << "OO    OO  OOO  OO    OO OO    OO  OO   OO   \n";
  34.   cout << "OO   .o   OOO  OO    OO OO    OO  OO   OO   \n";
  35.   cout << "OO.oo     OOO  OO    OO OO    OO  OO   OO   \n";
  36.   cout << "OO.oo     OOO  OO    OO OO    OO  OOoOoO    \n";
  37.   cout << "OO   o.   OOO  OO    OO OO    OO  OO        \n";
  38.   cout << "OO    OO  OOO  OO    OO OO    OO  OO        \n";
  39.   cout << "OO    Oo  OOO  OO    OO OO    OO  OO        \n";
  40.   cout << " oOOOOo   OOO   OooooO    OoooO   OO        \n"; //picture art for start.
  41.   cout << "\n \n \n";
  42.   cout << "  " << endl;
  43.   cout << "  " << endl;
  44.   system ("color 04");
  45.   cout << "Booting up";
  46.   Sleep (300);
  47.   system ("color 06");
  48.   cout << ".";
  49.   Sleep (250);
  50.   system ("color 02");
  51.   cout << ".";
  52.   Sleep (200);
  53.   system ("color 03");
  54.   cout << ".\n";
  55.   cout << "Bloopclicker v2 \n made by Bloopdog himself. \n";
  56.   system ("color 01");
  57.   cout << "Toggle on key is up arrow, toggle off key is down arrow. \n ";
  58.   system ("color 04");      // makes the background black and text red
  59. }
  60.  
  61. void LeftClicker ()
  62. {               // leftclicking function
  63.  
  64.   while (1)
  65.     {               //while 1, so basically forever
  66.       if (GetAsyncKeyState (VK_DOWN < 0))   //checks for down arrow being pressed
  67.     {
  68.       click = true;     //if down arrow pressed, turns click bool to true
  69.     }
  70.       if (GetAsyncKeyState (VK_UP >= 0))    //checks for up arrow
  71.     {
  72.       click = false;    //if up arrow is pressed, changes "click" bool to false, meaning it restarts function
  73.     }
  74.  
  75.       if (click)
  76.     {           //when click is true, checks for left click, and if left click is pressed, it will start clicking
  77.       // as fast as you set it (probably lower because the cps is the denom for 1000, to get the actual cps)
  78.       if (GetAsyncKeyState (VK_LBUTTON < 0))
  79.         INPUT input[2] = { };
  80.  
  81.       input[0].type = INPUT_MOUSE;
  82.       input[0].mi.dx = x;
  83.       input[0].mi.dy = y;
  84.       input[0].mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
  85.       input[1] = input[0];
  86.       input[1].mi.dwFlags = MOUSEEVENTF_LEFTUP;
  87.       SendInput (2, input, sizeof (INPUT));
  88.       Sleep (1000 / cps);
  89.     }
  90.     }
  91.  
  92.  
  93.  
  94. }
  95.  
  96.  
  97.  
  98.  
  99.  
  100. void RightClicker ()
  101. {              
  102.   while (1)
  103.     {
  104.       if (GetAsyncKeyState (VK_DOWN < 0))
  105.     {
  106.       click = true;
  107.     }
  108.       if (GetAsyncKeyState (VK_UP >= 0))
  109.     {
  110.       click = false;
  111.     }
  112.       if (click)
  113.     {      
  114.        if (GetAsyncKeyState (VK_RBUTTON < 0))
  115.         INPUT input[2] = { };
  116.       input[0].type = INPUT_MOUSE;
  117.       input[0].mi.dx = x;
  118.       input[0].mi.dy = y;
  119.       input[0].mi.dwFlags = MOUSEEVENTF_RIGHTDOWN;
  120.       input[1] = input[0];
  121.       input[1].mi.dwFlags = MOUSEEVENTF_RIGHTUP;
  122.       SendInput (2, input, sizeof (INPUT));
  123.       Sleep (1000 / cps);
  124.             }  
  125.         }
  126.     }
  127. }
  128.  
  129.  
  130.  
  131.  
  132. void Rl ()
  133. {
  134.   cout << "Right or Left Clicker? (Left, left or just l) \n";
  135.   cin >> rl;            //gets users input for whether they want left or right
  136.   if (rl == "Left", "left", "l", "L", "lefy", "lwft", "lef", "let",
  137.       "not right", "Left click", "left click", "LEFTCLICK", "legt", "lefr")
  138.     {
  139.       cout << "\n Add cps \n>>";
  140.       cin >> cps;
  141.       cout << "cps is taken and divides 1k to get a slightly randomized click speed, it can also be affected by your pc's speed. \n";
  142.       cout << "You'll be clicking around:";
  143.       cout << cps; <<" clicks per second";
  144.       LeftClicker;
  145.     }
  146.   else
  147.     {
  148.       cout << "Right it is! \n";    //if anything other than those certain strings was chosen, gets cps for right click, and goes to right click
  149.       cout << "Add cps \n>>";   //func
  150.       cin >> cps;
  151.       RightClicker;
  152.     }
  153.  
  154. }
  155.  
  156. int main ()
  157. {
  158.  
  159.   BootMenu ();          // goes to bootmenu
  160.   Rl ();            //goes ot right or left choice // system("pause") keeps it open until i press any key. //cin.ignore();
  161.  
  162. }
  163.  
Advertisement
Add Comment
Please, Sign In to add comment