Size
3.8 KB
Version
1.0.1
Created
Dec 2, 2025
Updated
10 days ago
1// ==UserScript==
2// @name FreeBitco.in Auto Roll
3// @description Automatically rolls for free bitcoins every hour on freebitco.in
4// @version 1.0.1
5// @match https://*.freebitco.in/*
6// @icon https://static1.freebitco.in/favicon.png
7// @grant GM.getValue
8// @grant GM.setValue
9// ==/UserScript==
10(function() {
11 'use strict';
12
13 let minuteCounter = 1;
14 let rollAttempts = 0;
15
16 // Random number generator for human-like timing
17 function random(min, max) {
18 return min + (max - min) * Math.random();
19 }
20
21 // Function to click the roll button
22 function clickRollButton() {
23 const rollButton = document.querySelector('#free_play_form_button');
24 if (rollButton && rollButton.offsetParent !== null) {
25 rollButton.click();
26 rollAttempts++;
27 console.log(`✅ Status: ROLL button clicked (Attempt #${rollAttempts})`);
28 return true;
29 } else {
30 console.log('⚠️ Status: ROLL button not available yet (cooldown active)');
31 return false;
32 }
33 }
34
35 // Function to close popup modals
36 function closePopup() {
37 const closeButton = document.querySelector('.close-reveal-modal');
38 if (closeButton) {
39 closeButton.click();
40 console.log('✅ Status: Popup closed successfully');
41 return true;
42 } else {
43 console.log('ℹ️ Status: No popup found to close');
44 return false;
45 }
46 }
47
48 // Function to check if roll is available
49 function isRollAvailable() {
50 const rollButton = document.querySelector('#free_play_form_button');
51 return rollButton && rollButton.offsetParent !== null && !rollButton.disabled;
52 }
53
54 // Initialize the auto-roll script
55 function init() {
56 console.log('🚀 FreeBitco.in Auto Roll Extension Started');
57 console.log('⏰ Monitoring for available rolls...');
58
59 // Initial roll attempt (2-4 seconds after page load)
60 setTimeout(function() {
61 console.log('🎲 Attempting initial roll...');
62 clickRollButton();
63 }, random(2000, 4000));
64
65 // Close popup after roll (12-18 seconds after page load)
66 setTimeout(function() {
67 closePopup();
68 }, random(12000, 18000));
69
70 // Minute counter for monitoring
71 setInterval(function() {
72 console.log(`⏱️ Status: ${minuteCounter} minute(s) elapsed | Total rolls: ${rollAttempts}`);
73 minuteCounter++;
74 }, 60000); // Every 60 seconds
75
76 // Recurring roll every ~60 minutes (with slight randomization)
77 setInterval(function() {
78 console.log('🔄 Hourly roll cycle triggered');
79 if (isRollAvailable()) {
80 clickRollButton();
81
82 // Close popup after roll
83 setTimeout(function() {
84 closePopup();
85 }, random(12000, 18000));
86 } else {
87 console.log('⏳ Roll not available yet, will retry in next cycle');
88 }
89 }, random(3605000, 3615000)); // ~60 minutes + 5-15 seconds
90
91 // Additional safety check every 5 minutes to catch available rolls
92 setInterval(function() {
93 if (isRollAvailable()) {
94 console.log('🎯 Roll detected as available during safety check');
95 clickRollButton();
96
97 setTimeout(function() {
98 closePopup();
99 }, random(12000, 18000));
100 }
101 }, 300000); // Every 5 minutes
102 }
103
104 // Wait for page to be fully loaded
105 if (document.readyState === 'loading') {
106 document.addEventListener('DOMContentLoaded', init);
107 } else {
108 init();
109 }
110
111})();