CryptoClicks Auto Roll

Automates the roll process by monitoring the Turnstile token to bypass iframe restrictions.

スクリプトをインストールするには、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         CryptoClicks Auto Roll
// @namespace    https://tampermonkey.net/
// @version      1.0
// @description  Automates the roll process by monitoring the Turnstile token to bypass iframe restrictions.
// @author       Rubystance
// @license      MIT
// @match        https://cryptoclicks.net/*
// @grant        none
// ==/UserScript==

(function () {
    'use strict';

    const REF_KEY = 'cryptoclicks_ref_used';
    const REF_URL = 'https://cryptoclicks.net/?ref=9205';

    if (!localStorage.getItem(REF_KEY)) {
        localStorage.setItem(REF_KEY, 'yes');
        location.href = REF_URL;
        return;
    }

    let lastActivity = Date.now();
    setInterval(() => {

        if (Date.now() - lastActivity > 120000) {
            console.warn('[AutoRoll] Watchdog timeout - reloading page');
            location.reload();
        }
    }, 10000);

    function startProcess() {
        const btnModal = document.querySelector('#btn-modal');
        if (btnModal && btnModal.offsetParent !== null) {
            console.log('[AutoRoll] Opening Modal...');
            btnModal.click();
            setTimeout(selectCloudflare, 2000);
        } else {

            setTimeout(startProcess, 30000);
        }
    }

    function selectCloudflare() {
        const select = document.querySelector('select');
        if (select) {
            console.log('[AutoRoll] Selecting Cloudflare/Turnstile...');
            select.value = "3";
            select.dispatchEvent(new Event('change', { bubbles: true }));
            lastActivity = Date.now();
            checkCaptchaSolved();
        }
    }

    function checkCaptchaSolved() {
        console.log('[AutoRoll] Waiting for Captcha resolution...');

        const checkInterval = setInterval(() => {

            const turnstileResponse = document.querySelector('[name="cf-turnstile-response"]');
            const rollButton = document.querySelector('#rollFaucet');

            if (turnstileResponse && turnstileResponse.value.length > 10) {
                console.log('[AutoRoll] Captcha Solved! Preparing to Roll...');
                clearInterval(checkInterval);
                lastActivity = Date.now();

                const delay = Math.floor(Math.random() * (2000 - 1000 + 1)) + 1000;

                setTimeout(() => {
                    if (rollButton) {
                        rollButton.click();
                        console.log('[AutoRoll] Button Clicked Successfully!');
                    }
                }, delay);
            }

            lastActivity = Date.now();
        }, 1500);
    }

    window.addEventListener('load', () => {
        console.log('[AutoRoll] Script initialized');
        setTimeout(startProcess, 3000);
    });

})();