WilliamHarlow

TrollClicker

Dec 12th, 2019
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.60 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. string RainbowToggleOn;
  16. string RainbowToggleOff;
  17.  
  18.  
  19. //todo - add randomzier
  20. //todo add classes
  21.  
  22.  
  23.  
  24.  
  25. //this never worked
  26. //troll
  27.  
  28.  
  29.  
  30.  
  31.  
  32. void BootMenu()
  33. {
  34. cout << " oOOOOo oOOo .o000o. .o000o. .oOOOo. \n";
  35. cout << "OO OO OOOO OO OO OO OO OO OO \n";
  36. cout << "OO .o OOOO OO OO OO OO OO OO \n";
  37. cout << "OO.oo OOOO OO OO OO OO OO OO \n";
  38. cout << "OO.oo OOOO OO OO OO OO OOoOoO \n";
  39. cout << "OO o. OOOO OO OO OO OO OO \n";
  40. cout << "OO OO OOOO OO OO OO OO OO \n";
  41. cout << "OO Oo OOOO OO OO OO OO OO \n";
  42. cout << " oOOOOo OOOO OooooO OoooO OO \n";
  43.  
  44. cout << "\n \n \n";
  45. cout << " " << endl;
  46. cout << " " << endl;
  47. cout << "Booting up Bloopclicker ";
  48. cout << "BloopClicker v2.troll";
  49.  
  50. system("color 02");
  51.  
  52.  
  53.  
  54.  
  55. }
  56. //menu to boot
  57.  
  58.  
  59. class myClick {
  60. public:
  61.  
  62. //left clicker
  63. void LeftClicker() {
  64. cout << "Choose the toggle on key \n>>";
  65. cin >> LeftToggleOn; //gets user input for toggle on key
  66. cout << "Choose the toggle off key \n>>";
  67. cin >> LeftToggleOff; // gets user input for toggle off key
  68. cout << "'"
  69. cout << LeftToggleOn;
  70. cout << "' toggles the clicker on, '";
  71. cout << LeftToggleOff;
  72. cout << "' toggles it off.";
  73. cin >> cps; //gets desired cps
  74.  
  75. while (1) {
  76. if (GetAsyncKeyState(LeftToggleOn))
  77. {
  78. click = true;
  79. }
  80. if (GetAsyncKeyState(LeftToggleOff))
  81. {
  82. click = false;
  83. }
  84. if (click == true)
  85. {
  86.  
  87. mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0); //x and y makes it click where your mouse is not in a certain spot
  88. mouse_event(MOUSEEVENTF_LEFTUP, x, y, 0, 0);
  89. Sleep(1000 / cps); //divides the tps by cps to get the integer for cps
  90. }
  91. }
  92. }
  93.  
  94. void RightClicker() {
  95. cout << "Choose the toggle on key \n>>";
  96. cin >> RightToggleOn; //same thing for LeftToggleOn
  97. cout << "Choose the toggle off key \n>>";
  98. cin >> RightToggleOff;
  99. cout << "'"
  100. cout << RightToggleOn;
  101. cout << "' toggles the clicker on, '";
  102. cout << RightToggleOff;
  103. cout << "' toggles it off.";
  104. cin >> cps;
  105. while (1) {
  106. if (GetAsyncKeyState(RightToggleOn))
  107. {
  108. click = true;
  109. }
  110. if (GetAsyncKeyState(RightToggleOff))
  111. {
  112. click = false;
  113. }
  114. if (click == true)
  115. {
  116.  
  117. mouse_event(MOUSEEVENTF_RIGHTDOWN, x, y, 0, 0);
  118. mouse_event(MOUSEEVENTF_RIGHTUP, x, y, 0, 0);
  119. Sleep(1000 / cps);
  120. }
  121. }
  122. }
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135. void Rl() {
  136.  
  137. cout << "Right or Left Clicker? \n";
  138. cin >> rl;
  139. if (rl == "Left", "left", "l") {
  140.  
  141. cout << "\n Add cps \n>>";
  142. LeftClicker();
  143.  
  144. }
  145. else {
  146. cout << "Right it is! \n";
  147. cout << "Add cps \n>>";
  148. RightClicker();
  149. }
  150. }
  151.  
  152. void GetKeyStrokes() {
  153.  
  154. if (GetAsyncKeyState==true) {
  155. cout << KeyPressed;
  156.  
  157. }
  158.  
  159. }
  160.  
  161.  
  162.  
  163. void RainbowConsole()
  164. string RainbowToggleOn;
  165. string RainbowToggleOff;
  166. cout << RainbowToggleOn;
  167. cout << " toggles rainbow on, '";
  168. cout << RainbowToggleOff;
  169. cout << "' toggles rainbow off. \n";
  170. {
  171. if (GetAsyncKeyState(RainbowToggleOn)) {
  172.  
  173. click==false;
  174. } else {
  175.  
  176. click==true;
  177. } if (click==true) {
  178.  
  179. while(click==true) {
  180. Sleep(2);
  181. system("color 03");
  182. Sleep(2);
  183. system("color 04");
  184. Sleep(2);
  185. system("color 0E");
  186. Sleep(2);
  187. system("color 06");
  188. Sleep(2);
  189. system("color 0A");
  190. Sleep(2);
  191. system("color 02");
  192. Sleep(2);
  193. system("color 0B");
  194. Sleep(2);
  195. system("color 03");
  196. Sleep(2);
  197. system("color 0D");
  198. Sleep(2);
  199. system("color 05");
  200.  
  201.  
  202.  
  203. }
  204.  
  205.  
  206.  
  207. }
  208.  
  209. }
  210.  
  211.  
  212. void ShutDown() {
  213. Sleep(300);
  214. shutdown -r;
  215. }
  216.  
  217.  
  218. int main()
  219. {
  220. RainbowConsole();
  221. BootMenu();
  222. Rl();
  223. Shutdown();
  224.  
  225. }
Advertisement
Add Comment
Please, Sign In to add comment