Greasy Fork is available in English.

Fey.Top Auto (ON)

Auto-claims on feyorra.top

// ==UserScript==
// @name         Fey.Top Auto (ON)
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Auto-claims on feyorra.top
// @author       👽
// @match        https://feyorra.top/faucet
// @grant        none
// @license      MIT
// ==/UserScript==

(function () {
    'use strict';

    const CLAIM_BUTTON_SELECTOR = 'button.claim-button';
    const TURNSTILE_INPUT_SELECTOR = 'input[name="cf-turnstile-response"]';
    const REPEAT_INTERVAL_MS = 4 * 60 * 1000; // 4 minutes
    let hasClaimed = false;

    function tryClickClaim() {
        const claimButton = document.querySelector(CLAIM_BUTTON_SELECTOR);
        if (claimButton && !hasClaimed) {
            console.log('✅ Captcha verified. Clicking "Collect your reward"...');
            claimButton.click();
            hasClaimed = true;

            // 🔁 Restart process after 4 minutes
            setTimeout(() => {
                console.log('🔄 4 minutes passed. Reloading to claim again...');
                window.location.reload();
            }, REPEAT_INTERVAL_MS);
        }
    }

    // ⏳ Check for Turnstile completion
    const turnstileInterval = setInterval(() => {
        const input = document.querySelector(TURNSTILE_INPUT_SELECTOR);
        if (input && input.value.trim() !== '') {
            console.log('✅ Cloudflare Turnstile completed.');
            clearInterval(turnstileInterval);
            tryClickClaim();
        }
    }, 2000);

    // 👀 Watch for IconCaptcha verification
    const observer = new MutationObserver(() => {
        const message = document.querySelector('.iconcaptcha-modal__body-title');
        if (message && message.textContent.includes('Verification complete')) {
            console.log('✅ IconCaptcha solved.');
            observer.disconnect();
            tryClickClaim();
        }
    });

    observer.observe(document.body, { childList: true, subtree: true });
})();