Auto Reload on Stake.com - CodeStats edition

Automatically claims rewards on Stake.com by sequentially clicking VIP Reward → Claim Reload → Return to Rewards. The script starts after a short page-load delay, mimics human behavior with random delays, occasional skipped cycles, and subtle mouse/scroll movements. FREE BONUS CODES @ https://t.me/codestats2 SOL: FVDejAWbUGsgnziRvFi4eGkJZuH6xuLviuTdi2g4Ut3o

2025-09-12 기준 버전입니다. 최신 버전을 확인하세요.

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

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

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name         Auto Reload on Stake.com - CodeStats edition
// @description  Automatically claims rewards on Stake.com by sequentially clicking VIP Reward → Claim Reload → Return to Rewards. The script starts after a short page-load delay, mimics human behavior with random delays, occasional skipped cycles, and subtle mouse/scroll movements. FREE BONUS CODES @ https://t.me/codestats2   SOL: FVDejAWbUGsgnziRvFi4eGkJZuH6xuLviuTdi2g4Ut3o
// @author       CHUBB
// @namespace    https://t.me/codestats2
// @version      09.12.2025
// @match        https://stake.com/*
// @match        https://stake.us/*
// @match        https://stake.com/?tab=rewards&modal=vip
// @match        https://stake.us/?tab=rewards&modal=vip
// @run-at       document-idle
// @license      MIT
// ==/UserScript==

// First attempt after short delay
(function firstRun() {
    const firstDelay = Math.floor(Math.random() * 5000) + 5000; // 5–10s
    console.log(`First attempt in ${(firstDelay / 1000).toFixed(1)} seconds`);

    setTimeout(async () => {
        await claimReload();
        startCycle();
    }, firstDelay);
})();

function startCycle() {
    const min = 10 * 60 * 1000;   // 10 minutes
    const max = 12 * 60 * 1000;  // 12 minutes
    const delay = Math.floor(Math.random() * (max - min + 1)) + min;

    console.log(`Next reload attempt in ${(delay / 60000).toFixed(2)} minutes`);

    setTimeout(async () => {
        if (Math.random() < 0.1) {
            console.log("Skipped this round — acting lazy.");
            randomHumanFidget();
            startCycle();
        } else {
            await claimReload();
            startCycle();
        }
    }, delay);
}

async function claimReload() {
    simulateMouseMove();

    // Reward Tab
    const tabClicked = await orderedClick('button[data-testid="rewards-tab"]');
    if (!tabClicked) return;

    // Step 1: vip-reward-claim-reload
    const vipClicked = await orderedClick('button[data-testid="vip-reward-claim-reload"]');
    if (!vipClicked) return;

    // Step 2: claim-reload
    const claimClicked = await orderedClick('button[data-testid="claim-reload"]');
    if (!claimClicked) return;

    // Step 3: return-to-rewards
    await orderedClick('button[data-testid="return-to-rewards"]');

    simulateMouseMove();
    console.log("Completed full reload sequence.");
}

// Retry logic: tries multiple times before giving up
async function orderedClick(selector, retries = 10, interval = 1000) {
    for (let i = 0; i < retries; i++) {
        const el = document.querySelector(selector);
        if (el) {
            const delay = Math.floor(Math.random() * 2000) + 1000; // 1–3s wait
            await wait(delay);
            el.click();
            console.log(`Clicked: ${selector} (after ${delay}ms)`);
            return true;
        }
        console.log(`Waiting for: ${selector} (retry ${i + 1}/${retries})`);
        await wait(interval);
    }
    console.log(`Failed to find after ${retries} retries: ${selector}`);
    return false;
}

function simulateMouseMove() {
    const simElm = document.documentElement;
    const simMouseMove = new Event('mousemove', { bubbles: true });
    simElm.dispatchEvent(simMouseMove);
}

function randomHumanFidget() {
    if (Math.random() < 0.5) {
        simulateMouseMove();
        console.log("Fidget: mouse wiggle.");
    }
    if (Math.random() < 0.5) {
        const scrollAmount = Math.floor(Math.random() * 300) - 150;
        window.scrollBy({ top: scrollAmount, behavior: 'smooth' });
        console.log(`Fidget: scrolled ${scrollAmount}px`);
    }
}

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