Zerofaucet Auto Loop

Fully automated faucet claim

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==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();
    }

})();