HF update (1min)

Wait 7–12s, click enabled claim button once per page load, then stop

// ==UserScript==
// @name         HF update (1min)
// @namespace    http://tampermonkey.net/
// @version      2.4
// @description  Wait 7–12s, click enabled claim button once per page load, then stop
// @author       👽
// @match        https://helpfpcoin.site/faucet/*
// @grant        none
// @license      MIT
// ==/UserScript==

/*
  OOOOO   TTTTT  RRRRR    EEEEE   W   W   OOOOO
 O     O    T    R    R   E       W   W  O     O
 O     O    T    RRRRR    EEEE    W W W  O     O
 O     O    T    R  R     E       WW WW  O     O
  OOOOO     T    R   R    EEEEE   W   W   OOOOO
*/

(function() {
    'use strict';

    // Inject your logo at top-left
    (function addLogo() {
        const logoUrl = 'https://yourdomain.com/path/to/logo.png'; // <-- Replace with your actual logo URL

        const img = document.createElement('img');
        img.src = logoUrl;
        img.alt = 'My Logo';
        img.style.position = 'fixed';
        img.style.top = '10px';
        img.style.left = '10px';
        img.style.width = '80px';  // Adjust size if needed
        img.style.height = 'auto';
        img.style.zIndex = '99999';
        img.style.borderRadius = '8px';
        img.style.boxShadow = '0 0 8px rgba(0,0,0,0.5)';
        img.style.backgroundColor = 'white'; // Optional background for contrast

        document.body.appendChild(img);
    })();

    let clicked = false; // Track if clicked already on this page load

    const delay = Math.floor(Math.random() * 5000) + 7000; // 7–12 sec delay

    const simulateClick = (element) => {
        if (clicked) return; // Prevent double click
        clicked = true;

        const rect = element.getBoundingClientRect();
        const x = rect.left + rect.width / 2;
        const y = rect.top + rect.height / 2;

        ['mouseover', 'mousedown', 'mouseup', 'click'].forEach(type => {
            element.dispatchEvent(new MouseEvent(type, {
                view: window,
                bubbles: true,
                cancelable: true,
                clientX: x,
                clientY: y,
                button: 0
            }));
        });
    };

    setTimeout(() => {
        const button = document.querySelector("button#claimBtns.claim-btn");
        // Only click if button exists, visible, and NOT disabled
        if (button && button.offsetParent !== null && !button.disabled) {
            simulateClick(button);
        }
    }, delay);

})();