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.

สคริปต์นี้ไม่ควรถูกติดตั้งโดยตรง มันเป็นคลังสำหรับสคริปต์อื่น ๆ เพื่อบรรจุด้วยคำสั่งเมทา // @require https://update.greasyfork.org/scripts/565761/1752016/Chill%20Guy%20Auto-Clicker.js

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

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