H.F Faucet For All (ON)

Auto-clicks "Claim Now" (join referral)

// ==UserScript==
// @name         H.F Faucet For All (ON)
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Auto-clicks "Claim Now" (join referral)
// @author       👽
// @license      MIT
// @match        https://helpfpcoin.site/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    console.log('✅ HELP.COIN.FEY script loaded on:', window.location.href);

    function delay(ms) {
        return new Promise(resolve => setTimeout(resolve, ms));
    }

    function waitForElement(selector, timeout = 15000) {
        return new Promise((resolve, reject) => {
            const start = Date.now();
            const interval = setInterval(() => {
                const el = document.querySelector(selector);
                if (el) {
                    clearInterval(interval);
                    resolve(el);
                } else if (Date.now() - start > timeout) {
                    clearInterval(interval);
                    console.warn('⏰ Element not found within timeout:', selector);
                    resolve(null); // Don't break loop
                }
            }, 500);
        });
    }

    async function autoClaimLoop() {
        while (true) {
            console.log('🔁 Starting claim cycle...');
            await delay(10000); // Wait 10 seconds

            const claimButton = document.getElementById('claimBtn');
            if (claimButton && claimButton.offsetParent !== null) {
                claimButton.click();
                console.log('🟢 Claim button clicked!');
            } else {
                console.log('⚠️ Claim button not found or not visible.');
            }

            // Optional wait before next loop
            await delay(1000);
        }
    }

    // Run only on pages with "faucet" in the path
    if (window.location.href.includes('/faucet')) {
        window.addEventListener('load', () => {
            console.log('🚀 Starting auto claim loop for HELP COIN...');
            autoClaimLoop();
        });
    } else {
        console.log('ℹ️ Not a faucet page. Script is idle.');
    }

})();