Snake.io cheat (Zoom Hack)

Cheats for snake.io (Zoom hack)

// ==UserScript==
// @name         Snake.io cheat (Zoom Hack)
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  Cheats for snake.io (Zoom hack)
// @author       idk just not you
// @license      MIT
// @match        https://snake.io/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=snake.io
// @grant        none
// ==/UserScript==

(function() {
    function get(x) { return document.getElementById(x); }

    let cheatMenu = document.createElement("div");
    cheatMenu.id = "cheatMenu";
    cheatMenu.style.position = "absolute";
    cheatMenu.style.top = "30px";
    cheatMenu.style.left = "20px";
    cheatMenu.style.zIndex = "9999";
    cheatMenu.style.background = "white";
    cheatMenu.style.padding = "10px";
    cheatMenu.style.border = "1px solid black";

    cheatMenu.innerHTML = `
        <section><label>Canvas width:</label><input type="range" min="1" max="3264" value="1332" id="WS"></section>
        <section><label id="WV">1332</label></section>
        <section><label>Canvas height:</label><input type="range" min="1" max="3264" value="764" id="HS"></section>
        <section><label id="HV">764</label></section>
        <section><label>Zoom (Working only on snake.io site):</label><input type="range" min="0.5" max="15" value="1" step="0.01" id="ZOOM"></section>
        <section><label id="ZM">1</label></section>
    `;

    document.body.appendChild(cheatMenu);

    let box = get("cheatMenu");

    document.addEventListener("keydown", (event) => {
        if (event.keyCode == 89) { // Нажатие "Y" скрывает/показывает меню
            box.style.opacity = (box.style.opacity == "1") ? "0" : "1";
        }
    });

    let CanvasWidth = get("WS");
    let showWidth = get("WV");
    CanvasWidth.oninput = function() {
        showWidth.innerHTML = this.value;
        let gameCanvas = get("unity-canvas");
        gameCanvas.style.width = this.value + "px";
    };

    let CanvasHeight = get("HS");
    let showHeight = get("HV");
    CanvasHeight.oninput = function() {
        showHeight.innerHTML = this.value;
        let gameCanvas = get("unity-canvas");
        gameCanvas.style.height = this.value + "px";
    };

    let ZoomVS = get("ZOOM");
    let ShowZoomVS = get("ZM");
    ZoomVS.oninput = function() {
        let zoomValue = parseFloat(this.value);
        let gameCanvas = get("unity-canvas");
        let gameContainer = get("unity-container");

        ShowZoomVS.innerHTML = this.value;

        gameContainer.style.transform = "scale(" + zoomValue + ")";
        gameContainer.style.transformOrigin = "center";

        gameCanvas.style.transform = "scale(" + zoomValue + ")";
        gameCanvas.style.transformOrigin = "center";

        gameContainer.style.position = "absolute";
        gameContainer.style.top = "50%";
        gameContainer.style.left = "50%";
        gameContainer.style.transform = "translate(-50%, -50%)";
        gameContainer.style.overflow = "hidden";
        document.getElementById("otherKooApps").style.opacity = 0;
    };
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址