Hydragon / 🚀 Freebitco.in AutoRoll - Roll for Free Bitcoins!

// ==UserScript==
// @name         🚀 Freebitco.in AutoRoll - Roll for Free Bitcoins!
// @version      1.1
// @description  Automates the process of rolling for free bitcoins on FreeBitco.in. Use this script to easily roll for free bitcoins every hour. Don't forget to support me by using my Referral Link: https://freebitco.in/?r=3635563
// @match        https://freebitco.in/*
// @require      https://code.jquery.com/jquery-latest.min.js
// @license      GPL-3.0-or-later; http://www.gnu.org/licenses/gpl-3.0.txt
// @namespace https://greasyfork.org/users/1166370
// @group        cryptocurrency
// ==/UserScript==
 
/* global $ */
(function () {
  'use strict';
 
  // Function to check the button's visibility and click it if visible
  function checkAndClickButton() {
    const rollButton = $('#free_play_form_button');
    
    if (rollButton.is(':visible')) {
      rollButton.click();
      console.log("Status: Button ROLL clicked.");
    } else {
      console.log("Status: Countdown is active. Skipping button click.");
    }
  }
 
  // Execute when the page is loaded
  $(document).ready(function () {
    console.log("Status: Page loaded.");
    checkAndClickButton(); // Check and click the button immediately on page load
  });
})();