Stake Keno Custom Auto Pick

Adds a custom auto-pick button to Stake.us Keno game. didja win using this? pls sen

// ==UserScript==
// @name         Stake Keno Custom Auto Pick 
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Adds a custom auto-pick button to Stake.us Keno game. didja win using this? pls sen
// @author       Telegram: @sighb3r LTC: ltc1qvpmsjyn6y7vk080uhje8v63mvty4adp7ewk20c <- sen pls I LOSE ALL
// @license MIT 
// @match        https://stake.us/casino/games/keno
// @match        https://stake.com/casino/games/keno
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    function injectCustomAutoPickButton() {
        const betButton = document.querySelector('[data-testid="bet-button"]');
        if (betButton && !document.querySelector('.customAutoPick')) {
            const customAutoPickDiv = document.createElement('div');
            customAutoPickDiv.className = 'customAutoPick';
            customAutoPickDiv.style.display = 'flex';
            customAutoPickDiv.style.alignItems = 'center';
            customAutoPickDiv.style.marginTop = '10px';

            const input = document.createElement('input');
            input.type = 'number';
            input.min = 1;
            input.max = 10;
            input.value = 3;
            input.style.marginRight = '10px';
            input.className = 'input spacing-expanded svelte-1u979cd';

            const button = document.createElement('button');
            button.textContent = 'Custom Auto Pick';
            button.className = 'inline-flex relative items-center gap-2 justify-center rounded-sm font-semibold whitespace-nowrap ring-offset-background transition-colors disabled:pointer-events-none disabled:opacity-50 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 bg-grey-400 text-white hover:bg-grey-300 hover:text-white focus-visible:outline-white text-sm leading-none py-[0.8125rem] px-[1rem]';
            button.onclick = async () => {
                const count = parseInt(input.value, 10) || 3;
                console.log(`Auto-picking ${count} numbers...`);
                await pickAndClickRandomTiles(count);
            };

            customAutoPickDiv.appendChild(input);
            customAutoPickDiv.appendChild(button);
            betButton.parentNode.insertBefore(customAutoPickDiv, betButton.nextSibling);
        }
    }

    async function pickAndClickRandomTiles(count = 3) {
        const clearTableButton = document.querySelector('[data-testid="clear-table-button"]');
        if (clearTableButton) {
            console.log('Clearing table...');
            clearTableButton.click();
            await new Promise(resolve => setTimeout(resolve, 500));
        }

        const tileElements = document.querySelectorAll('[data-test="tile"]');
        const tiles = Array.from(tileElements);

        const pickedTiles = [];
        while (pickedTiles.length < count) {
            const randomIndex = Math.floor(Math.random() * tiles.length);
            const pickedTile = tiles[randomIndex];
            if (!pickedTiles.includes(pickedTile)) {
                pickedTiles.push(pickedTile);
            }
        }

        for (const pickedTile of pickedTiles) {
            console.log(`Clicking on tile number: ${pickedTile.querySelector('span').textContent}`);
            pickedTile.click();
            await new Promise(resolve => setTimeout(resolve, 100));
        }
    }

    function waitForElement(selector, callback) {
        const observer = new MutationObserver((mutations) => {
            if (document.querySelector(selector)) {
                observer.disconnect();
                callback();
            }
        });

        observer.observe(document.body, { childList: true, subtree: true });
    }

    waitForElement('[data-testid="bet-button"]', injectCustomAutoPickButton);
})();