Greasy Fork 还支持 简体中文。

Sploop.io Legit Script [V1.5 - Add setting menu]

Menu Settings (ESC)

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.

(У мене вже є менеджер скриптів, дайте мені встановити його!)

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         Sploop.io Legit Script [V1.5 - Add setting menu]
// @namespace    http://tampermonkey.net/
// @version      1.5
// @description  Menu Settings (ESC)
// @match        *://sploop.io/*
// @icon         https://i.postimg.cc/vBz07fcS/Screenshot-2025-08-28-090152.png
// @grant        none
// @author       Normalplayer
// ==/UserScript==

(function() {
    'use strict';

    // ================= SETTINGS =================
    const STORAGE_KEY = 'sploop_legit_settings_v4';

    const config = {
        ghostMode: false,
        hitbox: true,
        betterHealthBar: true,
        textures: true,
        transparentUI: true,
        showOverlay: true,
        removeAds: true
    };

    try {
        const saved = localStorage.getItem(STORAGE_KEY);
        if (saved) Object.assign(config, JSON.parse(saved));
    } catch (e) { console.error("Save load error", e); }

    function saveConfig() {
        localStorage.setItem(STORAGE_KEY, JSON.stringify(config));
    }

    // ================= MENU UI =================
    const menuContainer = document.createElement('div');
    menuContainer.id = 'legit-script-menu';
    menuContainer.style.cssText = `
        position: fixed;
        top: 50%; left: 50%;
        transform: translate(-50%, -50%);
        width: 380px;
        background-color: rgba(0, 0, 0, 0.92);
        border: 4px solid #444;
        border-radius: 15px;
        padding: 25px;
        z-index: 1000000;
        color: white;
        font-family: 'Baloo Paaji', cursive;
        font-weight: 900;
        display: none;
        box-shadow: 0 0 30px rgba(0,0,0,1);
        text-align: center;
        user-select: none;
        -webkit-font-smoothing: antialiased;
    `;

    const title = document.createElement('h2');
    title.innerText = "SCRIPT SETTINGS";
    title.style.cssText = `
        margin: 0 0 20px 0;
        color: #ffc107;
        border-bottom: 3px solid #555;
        padding-bottom: 10px;
        font-size: 32px;
        text-shadow: 2px 2px 0 #000;
        letter-spacing: 1px;
    `;
    menuContainer.appendChild(title);

    const optionsContainer = document.createElement('div');
    optionsContainer.style.textAlign = "left";
    optionsContainer.style.padding = "0 10px";
    menuContainer.appendChild(optionsContainer);

    function createToggle(labelText, configKey, callback) {
        const wrapper = document.createElement('div');
        wrapper.style.cssText = "margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center;";

        const label = document.createElement('span');
        label.innerText = labelText;
        label.style.cssText = "font-size: 20px; color: #fff; text-shadow: 1px 1px 0 #000;";

        const btn = document.createElement('button');
        btn.style.cssText = `
            width: 70px; height: 32px; border: 2px solid rgba(0,0,0,0.5); border-radius: 8px;
            font-weight: 900; cursor: pointer; font-family: 'Baloo Paaji', cursive;
            transition: all 0.2s; font-size: 16px;
        `;

        const updateBtnState = () => {
            if (config[configKey]) {
                btn.innerText = "ON";
                btn.style.background = "#88cc44";
                btn.style.color = "white";
                btn.style.boxShadow = "0 4px 0 #558822";
                btn.style.transform = "translateY(0)";
            } else {
                btn.innerText = "OFF";
                btn.style.background = "#cc4444";
                btn.style.color = "white";
                btn.style.boxShadow = "0 4px 0 #882222";
                btn.style.transform = "translateY(0)";
            }
        };
        updateBtnState();

        btn.onclick = () => {
            config[configKey] = !config[configKey];
            updateBtnState();
            saveConfig();
            if (callback) callback(config[configKey]);
        };
        btn.onmousedown = () => { btn.style.boxShadow = "0 0 0 0"; btn.style.transform = "translateY(4px)"; };
        btn.onmouseup = () => { updateBtnState(); };

        wrapper.appendChild(label);
        wrapper.appendChild(btn);
        optionsContainer.appendChild(wrapper);
    }

    createToggle("Ghost Mode", "ghostMode");
    createToggle("Hitboxes", "hitbox");
    createToggle("Better Health Bar", "betterHealthBar");
    createToggle("Custom Skins", "textures");
    createToggle("Big Shop (Transp.)", "transparentUI", updateCSS);
    createToggle("Overlay (FPS/Ping)", "showOverlay", (val) => {
        document.getElementById('stats-overlay').style.display = val ? 'block' : 'none';
    });

    const closeBtn = document.createElement('button');
    closeBtn.innerText = "CLOSE (ESC)";
    closeBtn.style.cssText = `
        margin-top: 25px; padding: 10px 0; background: #333; border: 2px solid #666;
        color: #ccc; font-weight: 900; border-radius: 8px; cursor: pointer; width: 100%;
        font-size: 18px; font-family: 'Baloo Paaji', cursive; box-shadow: 0 4px 0 #111;
    `;
    closeBtn.onmousedown = () => { closeBtn.style.transform = "translateY(4px)"; closeBtn.style.boxShadow = "none"; };
    closeBtn.onmouseup = () => { closeBtn.style.transform = "translateY(0)"; closeBtn.style.boxShadow = "0 4px 0 #111"; };
    closeBtn.onclick = () => toggleMenu(false);
    menuContainer.appendChild(closeBtn);

    document.body.appendChild(menuContainer);

    let isMenuOpen = false;
    function toggleMenu(forceState) {
        if (typeof forceState !== 'undefined') isMenuOpen = forceState;
        else isMenuOpen = !isMenuOpen;
        menuContainer.style.display = isMenuOpen ? 'block' : 'none';
    }

    document.addEventListener('keydown', (e) => {
        if (e.key === 'Escape') {
            e.preventDefault(); e.stopImmediatePropagation(); toggleMenu();
        }
    });

    // ================= CSS MANAGER =================
    const cssId = 'sploop-legit-css';
    function updateCSS() {
        let style = document.getElementById(cssId);
        if (style) style.remove();
        if (!config.transparentUI && !config.removeAds) return;

        style = document.createElement('style');
        style.id = cssId;
        let cssContent = '';

        if (config.removeAds) {
            cssContent += `
                #cross-promo, #bottom-wrap, #google_play,
                #game-left-content-main, #game-bottom-content,
                #game-right-content-main, #left-content, #right-content { display:none !important; }
                #game-content { justify-content: center !important; }
                #main-content { width: auto !important; }
            `;
        }

        if (config.transparentUI) {
            cssContent += `
                #hat-menu {
                    width: 500px !important; height: 790px !important;
                    background: rgba(0,0,0,0) !important; opacity: 0.95 !important;
                    border: 5px solid black !important; box-shadow: none !important;
                }
                #hat_menu_content { max-height: 780px !important; overflow-y: auto !important; background: transparent !important; }
                #clan-menu { background: rgba(0,0,0,0) !important; opacity: 0.95 !important; border: 5px solid black !important; }
                #clan_menu_content { background: transparent !important; }
            `;
        }
        style.innerHTML = cssContent;
        document.head.appendChild(style);
    }
    updateCSS();

    // ================= HEALTH BAR & VISUALS =================
    function lerpColor(a, b, amount) {
        const ah = parseInt(a.replace(/#/g, ''), 16), ar = ah >> 16, ag = (ah >> 8) & 0xff, ab = ah & 0xff;
        const bh = parseInt(b.replace(/#/g, ''), 16), br = bh >> 16, bg = (bh >> 8) & 0xff, bb = bh & 0xff;
        const rr = ar + amount * (br - ar), rg = ag + amount * (bg - ag), rb = ab + amount * (bb - ab);
        return '#' + (((1 << 24) + (rr << 16) + (rg << 8) + rb) | 0).toString(16).slice(1);
    }

    function drawHpText(ctx, text, xPos, yPos, color) {
        ctx.save();
        ctx.font = "900 20px 'Baloo Paaji'";
        ctx.textAlign = "center";
        ctx.textBaseline = "top";
        ctx.lineJoin = "round";
        ctx.lineWidth = 8;
        ctx.strokeStyle = "#313131";
        ctx.strokeText(text, xPos, yPos);
        ctx.fillStyle = color;
        ctx.fillText(text, xPos, yPos);
        ctx.restore();
    }

    const enhanceFillRect = function (originalFillRect) {
        return function (x, y, width, height) {
            if (!config.betterHealthBar) return originalFillRect.call(this, x, y, width, height);
            const fullWidth = 95;
            if (height > 5 && height < 20 && (this.fillStyle === "#a4cc4f" || this.fillStyle === "#cc5151")) {
                const hpPercent = Math.max(0, Math.min(1, width / fullWidth));
                const percentText = `${~~(width / fullWidth * 100)}%`;
                const centerX = x + fullWidth / 2;
                let color;
                if (this.fillStyle === "#a4cc4f") {
                    color = hpPercent > 0.5 ? lerpColor("#a4cc4f", "#e09f3e", (1 - hpPercent) * 2) : lerpColor("#e09f3e", "#cc5151", (0.5 - hpPercent) * 2);
                    this.fillStyle = color;
                    originalFillRect.call(this, x, y, width, height);
                    drawHpText(this, percentText, centerX, y + height + 7, color);
                    return;
                } else if (this.fillStyle === "#cc5151") {
                    color = hpPercent > 0.5 ? lerpColor("#cc5151", "#e09f3e", (1 - hpPercent) * 2) : lerpColor("#e09f3e", "#a4cc4f", (0.5 - hpPercent) * 2);
                    this.fillStyle = color;
                    originalFillRect.call(this, x, y, width, height);
                    drawHpText(this, percentText, centerX, y + height + 7, color);
                    return;
                }
            }
            originalFillRect.call(this, x, y, width, height);
        };
    };
    CanvasRenderingContext2D.prototype.fillRect = enhanceFillRect(CanvasRenderingContext2D.prototype.fillRect);

    // ================= TEXTURES & RESOURCES =================
    const textureMap = {
        "hat_1.png":"https://i.postimg.cc/pdHJbCC3/hat-1.png", "hat_2.png":"https://i.postimg.cc/6QXfJczN/hat-2.png", "hat_3.png":"https://i.postimg.cc/GpxJcDS0/hat-3.png", "hat_4.png":"https://i.postimg.cc/SKf7y915/hat-4.png", "hat_5.png":"https://i.postimg.cc/DzPd2GYT/hat-5.png",
        "hat_6.png":"https://i.postimg.cc/tgNtX6mC/hat-6.png", "hat_7.png":"https://i.postimg.cc/5tSqxzkX/hat-7.png", "hat_8.png":"https://i.postimg.cc/HL94pMP7/hat-8.png", "hat_9.png":"https://i.postimg.cc/3RLXGTTt/hat-9.png", "hat_10.png":"https://i.postimg.cc/xCsvm22Z/hat-10.png",
        "hat_11.png":"https://i.postimg.cc/hjCLmBBw/hat-11.png", "hat_12.png":"https://i.postimg.cc/V67qt882/hat-12.png", "hat_13.png":"https://i.postimg.cc/G2MFDCR0/hat-13.png", "hat_14.png":"https://i.postimg.cc/Y9X6FH7M/hat-14.png", "skid_hat.png":"https://i.postimg.cc/yY3mDtrG/skid-hat.png",
        "stone_toolhammer.png":"https://i.postimg.cc/m21YPJ5x/stone-toolhammer.png", "g_toolhammer.png":"https://i.postimg.cc/k5mv3ssT/g-toolhammer.png", "d_toolhammer.png":"https://i.postimg.cc/L8f3bwt5/d-toolhammer.png", "r_toolhammer.png":"https://i.postimg.cc/MHN1smXQ/r-toolhammer.png",
        "stone_sword.png":"https://i.postimg.cc/xTNvXh4S/stone-sword.png", "g_sword.png":"https://i.postimg.cc/7Lkn899M/g-sword.png", "d_sword.png":"https://i.postimg.cc/CxDsQXGh/d-sword.png", "r_sword.png":"https://i.postimg.cc/vTk5PtDg/r-sword.png",
        "katana.png":"https://i.postimg.cc/G2MFDCR1/katana.png", "g_katana.png":"https://i.postimg.cc/5tVSdggL/g-katana.png", "d_katana.png":"https://i.postimg.cc/wTnkFgmz/d-katana.png", "c_katana.png":"https://i.postimg.cc/j2LzQFqf/r-katana.png",
        "stone_axe.png":"https://i.postimg.cc/3J0XkVbV/stone-axe.png", "g_axe.png":"https://i.postimg.cc/mgMy5JYt/g-axe.png", "d_axe.png":"https://i.postimg.cc/bNZTQsdx/d-axe.png", "r_axe.png":"https://i.postimg.cc/qRmsKTrM/r-axe.png",
        "great_axe.png":"https://i.postimg.cc/pdHJbCCc/great-axe.png", "g_great_axe.png":"https://i.postimg.cc/pL8J64f8/g-great-axe.png", "d_great_axe.png":"https://i.postimg.cc/CLRNjzd9/d-great-axe.png", "r_great_axe.png":"https://i.postimg.cc/C5zjHQMB/r-great-axe.png",
        "stone_spear.png":"https://i.postimg.cc/15VG82j1/stone-spear.png", "g_spear.png":"https://i.postimg.cc/zGWFc6Cd/g-spear.png", "d_spear.png":"https://i.postimg.cc/L6GVv214/d-spear.png", "r_spear.png":"https://i.postimg.cc/XqpwczNK/r-spear.png",
        "cut_spear.png":"https://i.postimg.cc/hPXr9fhV/cut-spear.png", "g_cutspear.png":"https://i.postimg.cc/JzJ52vNk/g-cutspear.png", "d_cutspear.png":"https://i.postimg.cc/fTVKxJkF/d-cutspear.png", "r_cutspear.png":"https://i.postimg.cc/PJPmzRfx/r-cutspear.png",
        "stick.png":"https://i.postimg.cc/SNY6n3tt/stick.png", "g_stick.png":"https://i.postimg.cc/43gQkPPp/g-stick.png", "d_stick.png":"https://i.postimg.cc/Pr0MKTwN/d-stick.png", "r_stick.png":"https://i.postimg.cc/yxkFXb6X/r-stick.png",
        "bat.png":"https://i.postimg.cc/hPXr9fh7/bat.png", "g_bat.png":"https://i.postimg.cc/136rj2GN/g-bat.png", "d_bat.png":"https://i.postimg.cc/tCs5hY7M/d-bat.png", "r_bat.png":"https://i.postimg.cc/qRmsKTrv/r-bat.png",
        "s_dagger.png":"https://i.postimg.cc/J7234MKK/s-dagger.png", "g_dagger.png":"https://i.postimg.cc/BnDBVkTF/g-dagger.png", "d_dagger.png":"https://i.postimg.cc/ZKWcrC02/d-dagger.png", "r_dagger.png":"https://i.postimg.cc/tJYhtMR4/r-dagger.png",
        "s_healing_staff.png":"https://i.postimg.cc/Kv3P1wsP/s-healing-staff.png", "g_healing_staff.png":"https://i.postimg.cc/FHcVB8yG/g-healing-staff.png", "d_healing_staff.png":"https://i.postimg.cc/gk1K4mZY/d-healing-staff.png", "r_healing_staff.png":"https://i.postimg.cc/rsKSCPyt/r-healing-staff.png",
        "hammer.png":"https://i.postimg.cc/5tVSdggR/hammer.png", "g_hammer.png":"https://i.postimg.cc/BnDBVkTg/g-hammer.png", "d_hammer.png":"https://i.postimg.cc/QxvqShWP/d-hammer.png", "r_hammer.png":"https://i.postimg.cc/kGBxFpMV/r-hammer.png",
        "shield.png":"https://i.postimg.cc/8PfR79ny/shield.png", "s_musket.png":"https://i.postimg.cc/wxG5TgFf/s-musket.png", "bow.png":"https://i.postimg.cc/5NX3w6jC/bow.png", "Xbow.png":"https://i.postimg.cc/FskyY8B4/Xbow.png",
        "scythe.png":"https://i.postimg.cc/tCn3swmN/scythe.png", "meme.png":"https://i.postimg.cc/B6hTF033/meme.png", "pearl.png":"https://i.postimg.cc/63HrZXKB/pearl.png"
    };

    const imageRadii = new Map([
        ["tree.png", 90], ["cherry_tree.png", 90], ["palm_tree.png", 90],
        ["wood_farm.png", 80], ["wood_farm_cherry.png", 80],
        ["rock.png", 75], ["stone_farm.png", 75],
        ["bush.png", 50], ["berry_farm.png", 50], ["cactus.png", 50],
        ["gold.png", 76], ["ruby.png", 100], ["tornado.png", 220],
        ["cave_stone0.png", 92], ["cave_stone1.png", 92], ["cave_stone2.png", 58],
        ["fireball.png", 100], ["ice0.png", 92], ["ice1.png", 20], ["chest.png", 40],
        ["wall.png", 45], ["castle_wall.png", 59], ["spike.png", 45],
        ["hard_spike.png", 45], ["ice_spike.png", 45], ["castle_spike.png", 45],
        ["windmill_base.png", 45], ["trap.png", 40], ["boost.png", 40],
        ["turret_base.png", 45], ["heal_pad.png", 50], ["platform.png", 60],
        ["roof.png", 50], ["bed.png", 50], ["teleporter.png", 35], ["lootbox.png", 40],
        ["wolf.png", 50], ["duck.png", 20], ["cow.png", 90], ["shark.png", 90],
        ["mammoth_body.png", 90], ["dragon_2_body.png", 100], ["gcow.png", 90]
    ]);

    const resourceKeywordsList = ["tree","rock","bush","cactus","ruby","wood","stone","gold","wall","spike","windmill","trap","boost","turret","heal_pad","platform","roof","bed","teleporter","lootbox","tornado","inv_","ice","cave_stone"];
    const skinFragments = new Set();
    for(let i=0; i<=105; i++) skinFragments.add(`body${i}.png`);
    skinFragments.add('45body.png'); skinFragments.add('78body.png');

    const origDrawImage = CanvasRenderingContext2D.prototype.drawImage;
    const replacementCache = new Map();
    const circlesToDraw = [];

    // ================= MAIN DRAW HOOK =================
    CanvasRenderingContext2D.prototype.drawImage = function(img, ...rest) {
        if (!img || !img.src) return origDrawImage.apply(this, arguments);

        if (img._isProcessed === undefined) {
            img._isProcessed = true;
            const src = img.src;
            const fileName = src.substring(src.lastIndexOf('/') + 1).split('?')[0];

            img._replacement = null;
            if (textureMap[fileName]) {
                if (!replacementCache.has(fileName)) {
                    const newImg = new Image(); newImg.src = textureMap[fileName]; replacementCache.set(fileName, newImg);
                }
                img._replacement = replacementCache.get(fileName);
            }

            img._radius = 0;
            if (imageRadii.has(fileName)) img._radius = imageRadii.get(fileName);
            img._isGhostRes = resourceKeywordsList.some(k => src.includes(k));
            img._isPlayer = skinFragments.has(fileName);
        }

        let drawImg = img;
        if (config.textures && img._replacement && img._replacement.complete) drawImg = img._replacement;

        const shouldGhost = config.ghostMode && img._isGhostRes;
        if (shouldGhost) { this.save(); this.globalAlpha = 0.3; }

        origDrawImage.call(this, drawImg, ...rest);

        if (shouldGhost) this.restore();

        if (config.hitbox && img._radius > 0 && rest.length >= 4) {
            const [x, y, w, h] = rest;
            const mh = this.canvas.height;
            const mw = this.canvas.width;
            const src = img.src;
            const isWorldEntity = (img._isGhostRes || src.includes('/entity/')) && !src.includes('inv_') && !src.includes('ui_');

            const isHotbarZone = y > (mh * 0.8) && x > (mw * 0.25) && x < (mw * 0.75);
            const isChooseZone = y < (mh * 0.2) && x > (mw * 0.2) && x < (mw * 0.8);
            const shouldHideHitbox = (isHotbarZone || isChooseZone) && !isWorldEntity;

            if (this.canvas.id === "game-canvas" && !shouldHideHitbox) {
                this.beginPath();
                this.arc(x + w / 2, y + h / 2, img._radius, 0, 2 * Math.PI);
                this.lineWidth = 2;
                this.strokeStyle = "#ff0000";
                this.stroke();
            }
        }

        if (config.hitbox && img._isPlayer && rest.length >= 2) {
             if (this.canvas.id === "game-canvas") {
                 const [x, y, w, h] = rest;
                 circlesToDraw.push({ x, y, width: w, height: h, transform: this.getTransform() });
             }
        }
    };

    // ================= OVERLAY SYSTEM =================
    const overlay = document.createElement("canvas");
    overlay.id = 'stats-overlay';
    overlay.width = window.innerWidth;
    overlay.height = window.innerHeight;
    overlay.style.position = "absolute";
    overlay.style.top = "0";
    overlay.style.left = "0";
    overlay.style.pointerEvents = "none";
    overlay.style.zIndex = "9999";
    document.body.appendChild(overlay);
    const octx = overlay.getContext("2d");

    let frameCount = 0, fpsStartTime = performance.now(), fps=0, cps=0;
    let lastFrameTime = performance.now(), ping='...';
    let serverName = "Unknown";

    setInterval(()=>{
        const now = performance.now();
        ping = Math.round(now - lastFrameTime);
        lastFrameTime = now;
        const select = document.getElementById("server-select");
        if (select && select.options.length > 0) serverName = select.options[select.selectedIndex].text;
    }, 50);

    document.addEventListener("mousedown", ()=>{ cps++; setTimeout(()=>cps--,1000); });

    window.addEventListener("resize", ()=>{
        overlay.width = window.innerWidth;
        overlay.height = window.innerHeight;
    });

    setTimeout(() => {
        ['#grid-toggle','#native-friendly-indicator'].forEach(id=>{
            const el = document.querySelector(id); if(el) el.click();
        });
    }, 2000);

    function loop(){
        requestAnimationFrame(loop);

        const now = performance.now();
        frameCount++;
        if(now - fpsStartTime >= 1000){ fps = frameCount; frameCount=0; fpsStartTime=now; }

        octx.clearRect(0,0,overlay.width,overlay.height);

        if (config.hitbox && circlesToDraw.length > 0) {
            octx.lineWidth = 2;
            octx.strokeStyle = "#ff0000";
            for (let i = 0; i < circlesToDraw.length; i++) {
                const c = circlesToDraw[i];
                octx.save();
                octx.setTransform(c.transform);
                octx.beginPath();
                octx.arc(c.x + c.width / 2, c.y + c.height / 2, 35, 0, 2 * Math.PI);
                octx.stroke();
                octx.restore();
            }
        }
        circlesToDraw.length = 0;

        if (config.showOverlay) {
            octx.save();
            octx.font = "900 20px 'Baloo Paaji'";
            octx.textBaseline = "top";
            octx.strokeStyle = "#313131";
            octx.lineWidth = 8;
            octx.lineJoin = "round";
            octx.fillStyle = "white";

            const drawStat = (text, y) => {
                octx.strokeText(text, 10, y);
                octx.fillText(text, 10, y);
            };

            drawStat(`SERVER: ${serverName}`, 5);
            drawStat(`FPS: ${fps}`, 30);
            drawStat(`CPS: ${cps}`, 55);
            drawStat(`PING: ${ping}ms`, 80);
            octx.restore();
        }
    }
    loop();
})();