Zerofaucet Auto Loop

Fully automated faucet claim

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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         Zerofaucet Auto Loop
// @namespace    https://zerofaucet.top/
// @version      1.0
// @description  Fully automated faucet claim
// @author       Rubystance
// @license      MIT
// @match        https://zerofaucet.top/index.php*
// @grant        none
// ==/UserScript==

(function () {
    'use strict';

    const ADDRESS = "YOUR_ADDRESS_HERE";
    const LOOP_TIME = 65000; // 1 minute and 5 seconds

    function click(selector) {
        const el = document.querySelector(selector);
        if (el) {
            el.click();
            return true;
        }
        return false;
    }

    function goDashboardThenFaucet() {
        setTimeout(() => {
            click('a[href="index.php?page=dashboard"]');

            setTimeout(() => {
                click('a[href="index.php?page=faucet"]');
            }, 1500);

        }, LOOP_TIME);
    }

    if (location.pathname.endsWith("index.php") && !location.search) {
        const input = document.querySelector('input[name="address"]');
        const button = document.querySelector('button[type="submit"]');

        if (input && button) {
            input.value = ADDRESS;
            input.dispatchEvent(new Event('input', { bubbles: true }));
            setTimeout(() => button.click(), 500);
        }
    }

    if (location.search.includes("page=dashboard")) {
        setTimeout(() => {
            click('a[href="index.php?page=faucet"]');
        }, 1000);
    }

    if (location.search.includes("page=faucet")) {
        setTimeout(() => {
            click('button.btn.btn-success.btn-lg');
        }, 1000);
    }

    if (location.search.includes("page=verify")) {
        const interval = setInterval(() => {
            const claimButton = document.querySelector('button.btn.btn-success[type="submit"]');
            if (!claimButton) return;

            const rect = claimButton.getBoundingClientRect();
            const style = getComputedStyle(claimButton);

            if (
                rect.width > 0 &&
                rect.height > 0 &&
                style.display !== 'none' &&
                style.visibility !== 'hidden'
            ) {
                claimButton.click();
                clearInterval(interval);
            }
        }, 1500);
    }

    if (
        location.search.includes("page=faucet") &&
        document.body.innerText.includes("You've claimed successfully")
    ) {
        goDashboardThenFaucet();
    }

})();