Hyper Evo Online Loader

Loader for evoworld.io cheat

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Hyper Evo Online Loader
// @namespace    http://tampermonkey.net/
// @version      1.0.1
// @description  Loader for evoworld.io cheat
// @author       YoMino
// @license MIT
// @match        https://evoworld.io/
// @grant        GM_xmlhttpRequest
// @connect      raw.githubusercontent.com
// @run-at       document-idle
// ==/UserScript==

(function () {
    'use strict';

    const CONFIG = {
        enabled: true,
        remoteScriptUrl: 'https://raw.githubusercontent.com/danneagudan08-cmd/Script-Config/refs/heads/main/NEWloader.js',
        loadRemoteScript: true,
        debug: true
    };

    function log(...args) {
        if (CONFIG.debug) console.log('[HyperEvo Offline]', ...args);
    }

    function warn(...args) {
        console.warn('[HyperEvo Offline]', ...args);
    }

    function error(...args) {
        console.error('[HyperEvo Offline]', ...args);
    }

    function waitForGame(timeoutMs = 15000) {
        return new Promise((resolve, reject) => {
            const start = Date.now();

            const timer = setInterval(() => {
                if (window.game) {
                    clearInterval(timer);
                    resolve(window.game);
                    return;
                }

                if (Date.now() - start > timeoutMs) {
                    clearInterval(timer);
                    reject(new Error('window.game non trovato.'));
                }
            }, 250);
        });
    }

    function loadRemoteScript(url) {
        return new Promise((resolve, reject) => {
            if (!url || !/^https:\/\/raw\.githubusercontent\.com\//.test(url)) {
                reject(new Error('URL remoto non valido.'));
                return;
            }

            GM_xmlhttpRequest({
                method: 'GET',
                url,
                timeout: 15000,

                onload(res) {
                    if (res.status < 200 || res.status >= 300) {
                        reject(new Error('HTTP ' + res.status));
                        return;
                    }

                    const code = String(res.responseText || '');

                    if (!code.trim()) {
                        reject(new Error('Script remoto vuoto.'));
                        return;
                    }

                    try {
                        const script = document.createElement('script');
                        script.textContent = `
                            try {
                                ${code}
                            } catch (e) {
                                console.error('[Remote Script Error]', e);
                            }
                        `;
                        document.documentElement.appendChild(script);
                        script.remove();
                        resolve();
                    } catch (e) {
                        reject(e);
                    }
                },

                onerror() {
                    reject(new Error('Errore rete.'));
                },

                ontimeout() {
                    reject(new Error('Timeout.'));
                }
            });
        });
    }

    function installDebugTools() {
        window.HyperEvoDebug = {
            getGame() {
                return window.game || null;
            },

            getMe() {
                return window.game && window.game.me ? window.game.me : null;
            },

            printMe() {
                const me = this.getMe();
                console.log('[HyperEvoDebug me]', me);
                return me;
            },

            isReady() {
                return !!(window.game && window.game.me);
            }
        };

        log('Debug tools installati.');
    }

    async function main() {
        if (!CONFIG.enabled) return;

        installDebugTools();

        try {
            await waitForGame();
            log('Game trovato:', window.game);
        } catch (e) {
            warn(e.message);
        }

        if (CONFIG.loadRemoteScript) {
            try {
                await loadRemoteScript(CONFIG.remoteScriptUrl);
                log('Script remoto caricato.');
            } catch (e) {
                error('Errore caricamento script remoto:', e);
            }
        }
    }

    main();
})();