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.

Questo script non dovrebbe essere installato direttamente. È una libreria per altri script da includere con la chiave // @require https://update.greasyfork.org/scripts/565761/1752016/Chill%20Guy%20Auto-Clicker.js

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==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);
})();