Chill Guy Auto-Clicker

First time posting see if it works if it does not reach out to me and I will try to fix it.

Tento skript by neměl být instalován přímo. Jedná se o knihovnu, kterou by měly jiné skripty využívat pomocí meta příkazu // @require https://update.greasyfork.org/scripts/565761/1752016/Chill%20Guy%20Auto-Clicker.js

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         Chill Guy Auto-Clicker
// @match        *://*chillguy*/*
// @match        *://game.azgame.io/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    
    // Wait for game to load
    setTimeout(() => {
        const btn = document.createElement('button');
        btn.textContent = '🖱️ AUTO CLICK';
        btn.style.cssText = 'position:fixed;top:10px;right:10px;z-index:999999;padding:10px;background:#4CAF50;color:white;border:none;border-radius:5px;cursor:pointer;font-size:16px;';
        
        let clicking = false;
        let interval;
        
        btn.onclick = () => {
            clicking = !clicking;
            if (clicking) {
                btn.style.background = '#f44336';
                btn.textContent = '⏹️ STOP CLICKING';
                interval = setInterval(() => {
                    const x = window.innerWidth/2;
                    const y = window.innerHeight/2;
                    const el = document.elementFromPoint(x, y);
                    if (el) {
                        el.click();
                        el.dispatchEvent(new Event('click', {bubbles:true}));
                    }
                }, 50);
            } else {
                clearInterval(interval);
                btn.style.background = '#4CAF50';
                btn.textContent = '🖱️ AUTO CLICK';
            }
        };
        
        document.body.appendChild(btn);
        console.log('Auto-clicker button added! Click the green button to start.');
    }, 3000);
})();