EbM 1

Stealth auto-claim only — no popup handling, no refresh, no YouTube, real simulated clicks only (undetectable automation style)

// ==UserScript==
// @name         EbM 1
// @namespace    http://tampermonkey.net/
// @version      2.4
// @description  Stealth auto-claim only — no popup handling, no refresh, no YouTube, real simulated clicks only (undetectable automation style)
// @author       👽
// @match        https://earnbitmoon.club/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function () {
    'use strict';

    // Simulate a real user click
    function simulateClick(el) {
        if (!el) return;
        const options = { bubbles: true, cancelable: true, view: window };
        ['mouseover', 'mousedown', 'mouseup', 'click'].forEach(type => {
            el.dispatchEvent(new MouseEvent(type, options));
        });
    }
    simulateClick.toString = () => "function simulateClick() { [native code] }";

    // Wait for an element to appear
    function waitForElement(selector, maxAttempts = 20, interval = 500) {
        return new Promise(resolve => {
            let attempts = 0;
            const check = () => {
                const el = document.querySelector(selector);
                if (el) return resolve(el);
                if (++attempts >= maxAttempts) return resolve(null);
                setTimeout(check, interval);
            };
            check();
        });
    }

    // Main auto-claim process
    async function runAutoClaim() {
        const rollBtn = await waitForElement('button[data-toggle="modal"][data-target="#modal2my"][style*="font-size: 15px"][style*="background: #FFA500"]');
        simulateClick(rollBtn);

        const verifyDone = await new Promise(resolve => {
            const interval = setInterval(() => {
                const txt = document.querySelector('.iconcaptcha-modal__body-title');
                if (txt && txt.textContent.trim() === 'Verification complete.') {
                    clearInterval(interval);
                    resolve(true);
                }
            }, 500);
        });

        setTimeout(async () => {
            const pressBtn = await waitForElement('button.zxz[onclick="starzRoll3();"][style*="font-size: 15px"][style*="background: #FFA500"]');
            simulateClick(pressBtn);
        }, 5000);
    }

    // Start after delay to simulate human behavior
    setTimeout(runAutoClaim, 10000);
})();