ScriptBlox Auto Upload Loop no game id script

good

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

You will need to install an extension such as Tampermonkey to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         ScriptBlox Auto Upload Loop no game id script
// @namespace    http://tampermonkey.net/
// @version      1
// @description  good
// @match        https://scriptblox.com/upload
// @grant        none
// @license      
// ==/UserScript==

(function() {
    'use strict';

    const targetGameID = "";
    const hardcodedSuffix = "";
    function generateRandomLetters(length) {
        let result = '';
        const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
        for (let i = 0; i < length; i++) {
            result += characters.charAt(Math.floor(Math.random() * characters.length));
        }
        return result;
    }
    let currentTitle = generateRandomLetters(15);
    let currentFeatures = generateRandomLetters(25) + hardcodedSuffix;

    function trigger(el) {
        if (!el) return;
        el.dispatchEvent(new Event('input', { bubbles: true }));
        el.dispatchEvent(new Event('change', { bubbles: true }));
        el.dispatchEvent(new Event('blur', { bubbles: true }));
    }

    setInterval(() => {
        const successMsg = document.querySelector('small.text-green-500');
        const submitBtn = document.querySelector('button[type="submit"]');

        if (successMsg && successMsg.textContent.includes('successfully')) {
            if (submitBtn) submitBtn.click();
            currentTitle = generateRandomLetters(15);
            currentFeatures = generateRandomLetters(25) + hardcodedSuffix;

            const uploadLink = document.querySelector('a[href="/upload"]');
            if (uploadLink) {
                uploadLink.click();
            } else {
                const allSpans = document.querySelectorAll('span');
                for (const s of allSpans) {
                    if (s.textContent.trim() === "Upload") {
                        s.click();
                        if (s.closest('a')) s.closest('a').click();
                        break;
                    }
                }
            }
            return;
        }

        let isVerified = false;
        const cfInput = document.querySelector('input[name="cf-turnstile-response"]');
        if (cfInput && cfInput.value) isVerified = true;

        const successIcon = document.getElementById('success');
        if (successIcon) {
            const style = window.getComputedStyle(successIcon);
            if (style.display !== 'none' && style.visibility !== 'hidden') isVerified = true;
        }

        const tInput = document.getElementById('title');
        const gInput = document.getElementById('game');
        const fInput = document.getElementById('features');
        const sInput = document.getElementById('script');

        if (gInput && gInput.value !== targetGameID) {
            gInput.value = targetGameID;
            trigger(gInput);
        }
        if (fInput && fInput.value !== currentFeatures) {
            fInput.value = currentFeatures;
            trigger(fInput);
        }
        if (tInput && tInput.value !== currentTitle && !isVerified) {
             tInput.value = currentTitle;
             trigger(tInput);
        }
        if (submitBtn && isVerified) {
            if (sInput && sInput.value.trim() !== "") {
                submitBtn.click();
            }
        }

    }, 0);

})();