WilliamHarlow

Rainbow

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