// ==UserScript== // @name FreeLUX Auto ROLL 1.2 // @version 1.2 // @description Automatically clicks “ROLL” when the Turnstile Cloudflare CAPTCHA is solved for *lux faucets. // @author Coraxdevil // @match *://usdtlux.io/faucet.php // @match *://btclux.io/faucet.php // @match *://shibalux.io/faucet.php // @match *://tronlux.io/faucet.php // @match *://xrplux.io/faucet.php // @license MIT // @grant none // @namespace https://greasyfork.org/users/1630541 // ==/UserScript== (function () { 'use strict'; const log = (...args) => console.log('[AutoClaim]', ...args); const POLL_INTERVAL = 3000; // check every 3s const RELOAD_AFTER_CLICK = 15000; // reload every 15 after click const FALLBACK_RELOAD = 5 * 60 * 1000; // reload in every 5m function isCaptchaResolved() { const input = document.querySelector('input[name="cf-turnstile-response"]'); return !!(input && input.value && input.value.trim().length > 0); } function tryClickRollButton() { const button = document.querySelector("#process_claim_hourly_faucet"); if (!button) { log("Claim! btn not found."); return false; } if (isCaptchaResolved() && !button.disabled && button.offsetParent !== null) { log("CAPTCHA solved. Clicking on ROLL! button"); button.click(); return true; } log("Waiting for CAPTCHA..."); return false; } let clicked = false; function poll() { if (clicked) return; if (tryClickRollButton()) { clicked = true; setTimeout(() => location.reload(), RELOAD_AFTER_CLICK); } } function start() { log("Starting AutoClaim watcher."); setInterval(poll, POLL_INTERVAL); poll(); setTimeout(() => { if (!clicked) { log("Fallback reload — no claim detected in time window."); location.reload(); } }, FALLBACK_RELOAD); } if (document.readyState === 'complete' || document.readyState === 'interactive') { setTimeout(start, 1500); } else { window.addEventListener('DOMContentLoaded', () => setTimeout(start, 1500)); } })();