Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <Windows.h>
- #include <cmath>
- #include <ctime>
- using namespace std;
- bool On = false;
- int CPS;
- int x = 0;
- int y = 0;
- string Randomized;
- bool random; //set this to true for auto randomization
- int randomYesorNo;
- int randomNumGen;
- int main() {
- srand(time(0));
- //first cout is optional (just for reference in case the user forgets the keybinds)
- cout << "RShift + Backspace = start; Rcontrol + backspace = stop; Rshift + Rcontrol + backspace = choose CPS." << endl << endl;
- cout << "how many clicks per sec?" << endl;
- cin >> CPS;
- /* if you would like to make the program automatically randomize the clicks, just remove this section (all in between)
- and set bool random = true up top */
- cout << "Randomized?";
- cin >> Randomized;
- if (Randomized == "yes" || Randomized == "Yes" || Randomized == "y" || Randomized == "Y")
- {
- random = true;
- }
- if (Randomized == "No" || Randomized == "no" || Randomized == "n" || Randomized == "N")
- {
- random = false;
- }
- if (!random) {
- randomYesorNo = CPS;
- }
- //delete down to here
- while (1) {
- if (random) {
- randomYesorNo = CPS + rand() % 11;
- }
- if (GetAsyncKeyState(VK_RSHIFT) && GetAsyncKeyState(VK_BACK)) {
- On = true;
- }
- if (GetAsyncKeyState(VK_RCONTROL) && GetAsyncKeyState(VK_BACK)) {
- On = false;
- }
- if (GetAsyncKeyState(VK_RSHIFT) && GetAsyncKeyState(VK_RCONTROL) && GetAsyncKeyState(VK_BACK)) {
- cout << "how many clicks per sec?" << endl;
- cin >> CPS;
- }
- if (On) {
- mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0);
- mouse_event(MOUSEEVENTF_LEFTUP, x, y, 0, 0);
- Sleep(1000 / randomYesorNo);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment