autoclicker menu shell

Right Shift menu + left/right toggle hooks

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         autoclicker menu shell
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Right Shift menu + left/right toggle hooks
// @match        *://*/*
// @grant        none
// ==/UserScript==

(function () {
    'use strict';

    // ---------------------------
    // CREATE MENU
    // ---------------------------
    const menu = document.createElement("div");
    menu.id = "acMenu";
    menu.innerHTML = `
        <h2>Auto Clicker Menu</h2>

        <div class="toggle" id="leftToggle">
            <span>Left Click (14 CPS)</span>
            <div class="indicator" id="leftIndicator"></div>
        </div>

        <div class="toggle" id="rightToggle">
            <span>Right Click (30 CPS)</span>
            <div class="indicator" id="rightIndicator"></div>
        </div>
    `;
    document.body.appendChild(menu);

    // ---------------------------
    // STYLE
    // ---------------------------
    const style = document.createElement("style");
    style.textContent = `
        #acMenu {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.8);
            background: rgba(20, 20, 20, 0.95);
            padding: 20px;
            border-radius: 12px;
            color: white;
            font-family: Arial, sans-serif;
            z-index: 999999999;
            display: none;
            width: 260px;
            text-align: center;
            transition: 0.15s ease;
        }

        #acMenu.open {
            display: block;
            transform: translate(-50%, -50%) scale(1);
        }

        .toggle {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: rgba(255,255,255,0.05);
            padding: 10px;
            border-radius: 8px;
            margin-top: 10px;
            cursor: pointer;
        }

        .indicator {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: red;
            transition: 0.15s;
        }

        .indicator.on {
            background: lime;
        }
    `;
    document.head.appendChild(style);

    // ---------------------------
    // MENU TOGGLE (Right Shift)
    // ---------------------------
    let menuOpen = false;

    window.addEventListener("keydown", (e) => {
        if (e.code === "ShiftRight") {
            menuOpen = !menuOpen;
            menu.classList.toggle("open", menuOpen);
        }
    });

    // ---------------------------
    // TOGGLE STATES
    // ---------------------------
    let leftOn = false;
    let rightOn = false;

    const leftIndicator = document.getElementById("leftIndicator");
    const rightIndicator = document.getElementById("rightIndicator");

    // ---------------------------
    // CLICK HANDLERS (SAFE HOOKS)
    // ---------------------------
    document.getElementById("leftToggle").onclick = () => {
        leftOn = !leftOn;
        leftIndicator.classList.toggle("on", leftOn);

        // 🔵 HOOK: Your left-click 14 CPS logic goes here
        window.dispatchEvent(new CustomEvent("left-toggle", { detail: leftOn }));
    };

    document.getElementById("rightToggle").onclick = () => {
        rightOn = !rightOn;
        rightIndicator.classList.toggle("on", rightOn);

        // 🔵 HOOK: Your right-click 30 CPS logic goes here
        window.dispatchEvent(new CustomEvent("right-toggle", { detail: rightOn }));
    };

})();