WilliamHarlow

hoensty what the hell

Oct 30th, 2019
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.18 KB | None | 0 0
  1. #include <iostream>
  2. #include <Windows.h>
  3. #include <string>
  4. using namespace std;
  5.  
  6. int x = 0, y = 0, cps;
  7. bool click = false;
  8. string rl;
  9. string LeftToggleOn;
  10. string LeftToggleOff;
  11. string RightToggleOn;
  12. string RightToggleOff;
  13. string GetKeyStrokes;
  14. string KeyPressed;
  15. int click=1
  16.  
  17. //todo - add randomzier
  18.  
  19.  
  20. void BootMenu()
  21. {
  22. cout << " oOOOOo oOOo .o000o. .o000o. .oOOOo. \n";
  23. cout << "OO OO OOOO OO OO OO OO OO OO \n";
  24. cout << "OO .o OOOO OO OO OO OO OO OO \n";
  25. cout << "OO.oo OOOO OO OO OO OO OO OO \n";
  26. cout << "OO.oo OOOO OO OO OO OO OOoOoO \n";
  27. cout << "OO o. OOOO OO OO OO OO OO \n";
  28. cout << "OO OO OOOO OO OO OO OO OO \n";
  29. cout << "OO Oo OOOO OO OO OO OO OO \n";
  30. cout << " oOOOOo OOOO OooooO OoooO OO \n";
  31.  
  32. cout << "\n \n \n";
  33. cout << " " << endl;
  34. cout << " " << endl;
  35. cout << "Booting up Bloopclicker ";
  36.  
  37. system("color 02");
  38.  
  39.  
  40.  
  41.  
  42. }
  43. //menu to boot
  44.  
  45.  
  46.  
  47. //left clicker
  48. void LeftClicker() {
  49. cout << "Choose the toggle on key \n>>";
  50. cin >> LeftToggleOn; //gets user input for toggle on key
  51. cout << "Choose the toggle off key \n>>";
  52. cin >> LeftToggleOff; // gets user input for toggle off key
  53. cout << "'"
  54. cout << LeftToggleOn;
  55. cout << "' toggles the clicker on, '";
  56. cout << LeftToggleOff;
  57. cout << "' toggles it off.";
  58. cin >> cps; //gets desired cps
  59.  
  60. while (1) {
  61. if (GetAsyncKeyState(LeftToggleOn))
  62. {
  63. click = true;
  64. }
  65. if (GetAsyncKeyState(LeftToggleOff))
  66. {
  67. click = false;
  68. }
  69. if (click == true)
  70. {
  71.  
  72. mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0); //x and y makes it click where your mouse is not in a certain spot
  73. mouse_event(MOUSEEVENTF_LEFTUP, x, y, 0, 0);
  74. Sleep(1000 / cps); //divides the tps by cps to get the int cps
  75. }
  76. }
  77. }
  78.  
  79. void RightClicker() {
  80. cout << "Choose the toggle on key \n>>";
  81. cin >> RightToggleOn; //same thing for LeftToggleOn
  82. cout << "Choose the toggle off key \n>>";
  83. cin >> RightToggleOff;
  84. cout << "'"
  85. cout << RightToggleOn;
  86. cout << "' toggles the clicker on, '";
  87. cout << RightToggleOff;
  88. cout << "' toggles it off.";
  89. cin >> cps;
  90. while (1) {
  91. if (GetAsyncKeyState(RightToggleOn)) //checks for RightToggleOn hotkey and if pressed starts the clicker
  92. {
  93. click = true;
  94. }
  95. if (GetAsyncKeyState(RightToggleOff))
  96. {
  97. click = false;
  98. }
  99. if (click == true)
  100. {
  101.  
  102. mouse_event(MOUSEEVENTF_RIGHTDOWN, x, y, 0, 0);
  103. mouse_event(MOUSEEVENTF_RIGHTUP, x, y, 0, 0);
  104. Sleep(1000 / cps);
  105. }
  106. }
  107. }
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117. /*Gets user input for whether they want left or right Clicker
  118. If any word resembling left it will choose left else its Right
  119. therefore if typo its automatically right.
  120. */
  121.  
  122.  
  123. void Rl() { //Right Left
  124.  
  125. cout << "Right or Left Clicker? \n";
  126. cin >> rl;
  127. if (rl == "Left", "left", "l") {
  128.  
  129. cout << "\n Add cps \n>>";
  130. LeftClicker();
  131.  
  132. }
  133. else {
  134. cout << "Right it is! \n";
  135. cout << "Add cps \n>>";
  136. RightClicker();
  137. }
  138. }
  139.  
  140. //Honestly no idea what i did here, probably a failed attempt at keylogger
  141. void GetKeyStrokes() {
  142.  
  143. if (GetAsyncKeyState==true)
  144. {
  145. cout << "\n <";
  146. cout << KeyPressed;
  147. cout << ">";
  148.  
  149.  
  150. } if (KeyPressed==VK_CAPITAL) {
  151. cout << "\n <CAPS> ";
  152.  
  153. } if (KeyPressed==VK_RETURN) {
  154. cout << " \n <ENTER>";
  155.  
  156. } if (KeyPressed==VK_RSHIFT) {
  157. cout << "\n <RSHIFT>";
  158.  
  159. } if (KeyPressed==VKLSHIFT) {
  160. cout << "\n <LSHIFT>";
  161. }
  162.  
  163.  
  164. }
  165. void ClickCounter() {
  166. if (GetAsyncKeyState(VK_LBUTTON)) {
  167. click++
  168. cout << " "
  169. cout click;
  170. cout << " "
  171. }
  172.  
  173. }
  174.  
  175. int main()
  176. {
  177. BootMenu();
  178. Rl();
  179. ClickCounter();
  180. GetKeyStrokes();
  181.  
  182. }
Advertisement
Add Comment
Please, Sign In to add comment