Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Windows.h>
- #include <iostream>
- #include <thread>
- #include <conio.h>
- #include <string>
- #include <MMSystem.h>
- int key = 6;
- int speed = 50;
- int increment = 60;
- int x;
- int y;
- int probability = 5;
- int jitter = 0;
- int console;
- int code;
- int horizon = 1;
- int vertical = 1;
- bool tog = false;
- using namespace std;
- void calc() {
- int r = rand() % 100 + 1;
- if (r <= probability) {
- mouse_event(MOUSEEVENTF_RIGHTDOWN, x, y, 0, 0);
- Sleep(5);
- mouse_event(MOUSEEVENTF_RIGHTUP, x, y, 0, 0);
- }
- }
- void screen() {
- int cord = rand() % horizon;
- int horizontal = rand() % vertical;
- POINT p;
- GetCursorPos(&p);
- SetCursorPos(p.x + horizontal, p.y - cord);
- SetCursorPos(p.x - horizontal, p.y + cord);
- SetCursorPos(p.x + horizontal, p.y - cord);
- SetCursorPos(p.x - horizontal, p.y + cord);
- SetCursorPos(p.x + horizontal, p.y - cord);
- }
- void click() {
- while (true) {
- if (GetAsyncKeyState(109)) {
- Sleep(300);
- tog = !tog;
- }
- if(tog == true){
- if(jitter>=1){
- if (GetAsyncKeyState(key)) {
- mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0);
- Sleep(rand() % speed + increment);
- mouse_event(MOUSEEVENTF_LEFTUP, x, y, 0, 0);
- calc();
- screen();
- }
- }
- if (jitter <= 1) {
- if (GetAsyncKeyState(key)) {
- mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0);
- Sleep(rand() % speed + increment);
- mouse_event(MOUSEEVENTF_LEFTUP, x, y, 0, 0);
- calc();
- }
- }
- }
- std::this_thread::sleep_for(std::chrono::milliseconds(1));
- }
- }
- void Function() {
- INPUT ip;
- ip.type = INPUT_KEYBOARD;
- ip.ki.time = 0;
- ip.ki.wVk = 0;
- ip.ki.dwExtraInfo = 0;
- ip.ki.dwFlags = KEYEVENTF_SCANCODE;
- ip.ki.wScan = 0x2A;
- SendInput(1, &ip, sizeof(INPUT));
- Sleep(250);
- ip.ki.dwFlags = KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP;
- SendInput(1, &ip, sizeof(INPUT));
- }
- void Wobble() {
- while (true) {
- if(tog==true){
- if (GetAsyncKeyState(87)) {
- Function();
- Sleep(250);
- }
- }
- std::this_thread::sleep_for(std::chrono::milliseconds(1));
- }
- }
- int main() {
- STARTUPINFO startInfo = { 0 };
- PROCESS_INFORMATION processInfo = { 0 };
- BOOL bScucces = CreateProcess(TEXT("C:\\Windows\\calc.exe"), NULL, NULL, NULL, FALSE, NULL, NULL, NULL, &startInfo, &processInfo);
- FreeConsole();
- std::thread ClickThread(click);
- std::thread FunctionThread(Function);
- std::thread WobbleThread(Wobble);
- std::thread CalcThread(calc);
- std::thread ScreenThread(screen);
- ClickThread.join();
- FunctionThread.join();
- WobbleThread.join();
- CalcThread.join();
- ScreenThread.join();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement