joker / Tron-Doge-Lite-SolPick Gems Automation

// ==UserScript==
// @name     Tron-Doge-Lite-SolPick Gems Automation
// @namespace https://tronpick.io/?ref=joker8889
// @version  1.0
// @source https://photolessons.org/
// @description  https://tronpick.io/?ref=joker8889  https://dogepick.io/?ref=joker8889  https://solpick.io/?ref=joker8889  https://litepick.io/?ref=joker8889
// @match    https://tronpick.io/gems.php
// @match    https://dogepick.io/gems.php
// @match    https://litepick.io/gems.php
// @match    https://solpick.io/gems.php
// @grant    none
// @license MIT
// ==/UserScript==

(function() {
  // Set the interval time between clicks (in milliseconds)
  const intervalTime = 5000;

  // Define the button selectors to click
  const buttonSelectors = ["#start_game_gems", ".progress_row.col_3.selected button#ce00", "#stop_game_gems", ".progress_row.col_3.selected button#ce00"];

  // Function to click the buttons
  let currentButtonIndex = 0;
  function clickButton() {
    const currentButtonSelector = buttonSelectors[currentButtonIndex];
    const button = document.querySelector(currentButtonSelector);
    if (button) {
      button.click();
      console.log(`Clicked button with selector ${currentButtonSelector}.`);
      setTimeout(() => {
        console.log(`Waiting 5 seconds after clicking button with selector ${currentButtonSelector}.`);
      }, 6000);
    } else {
      console.log(`Could not find button with selector ${currentButtonSelector}.`);
    }
    currentButtonIndex = (currentButtonIndex + 1) % buttonSelectors.length;
  }

  // Start clicking the buttons at the set interval time
  setInterval(clickButton, intervalTime);
})();