The Diep.io Custom AutoBuilder. Beta

NEW! custom builds update! This is still in beta, so your build will not save! :[ but soon... :]

当前为 2025-01-20 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         The Diep.io Custom AutoBuilder. Beta
// @namespace    http://tampermonkey.net/
// @version      9.1
// @homepage     https://greatest.deepsurf.us/scripts/416440
// @description  NEW! custom builds update! This is still in beta, so your build will not save! :[ but soon... :]
// @author       -{Abyss⌬}-ora
// @match        https://diep.io/*
// @grant        none
// @license      GNU GPLv3
// ==/UserScript==


(function () {
    "use strict";

    const hoverMenu = document.createElement("div");
    hoverMenu.id = "myhover";
    hoverMenu.className = "hover";

    const modMenu = document.createElement("a");
    modMenu.id = "modtab";

    const menuHeader = document.createElement("h1");
    menuHeader.textContent = "-{Abyss⌬}-ora's Mod Menu beta";
    modMenu.appendChild(menuHeader);

    const style = document.createElement("style");
    style.type = "text/css";
    style.textContent = `
        #myhover a {
            z-index: 999;
            position: absolute;
            top: 300px;
            right: -260px;
            transition: 0.3s;
            width: 250px;
            padding: 15px;
            background-image: url("https://media.tenor.com/images/f3f5354b7c304bc61882dbb1183885e7/tenor.gif");
            background-color: #555;
            text-decoration: none;
            font-size: 10px;
            font-family: 'Monoton', cursive;
            text-shadow: 1px 1px #000, 2px 2px #555;
            color: white;
            border: double thick white;
            border-radius: 20px;
        }
        #myhover a:hover {
            right: 0;
        }
        .button {
            display: block;
            margin: 5px auto;
            width: 90%;
            text-align: center;
            font-size: 18px;
            font-family: 'Jersey 10', sans-serif;
            color: black;
            background-color: white;
            border-radius: 5px;
            transition: 0.4s;
            cursor: pointer;
        }
        .button:hover {
            transform: translateX(-10px);
        }
        #userInput {
            margin: 5px auto;
            width: 90%;
            padding: 8px;
            font-family: 'Monoton', cursive;
            text-align: center;
        }
        #specialButton {
            display: block;
            margin: 5px auto;
            width: 90%;
            text-align: center;
            font-size: 18px;
            font-family: 'Jersey 10', sans-serif;
            color: white;
            background-color: black;
            border-radius: 5px;
            border-color: white;
            transition: 0.4s;
            cursor: pointer;
            opacity: 0.8;
        }
        #specialButton:hover {
            color: black;
            background-color: darkgray;
            transform: translateX(-10px);
        }
        .popup {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 300px;
            background-image: url("https://media.tenor.com/images/f3f5354b7c304bc61882dbb1183885e7/tenor.gif");
            background-color: white;
            border: double thick white;
            border-radius: 10px;
            padding: 20px;
            z-index: 1000;
        }
        .attribute {
            display: flex;
            align-items: center;
            margin-bottom: 10px;
        }
        .attribute div {
            width: 30px;
            height: 30px;
            border: 1px solid #000;
            margin: 0;
        }
        .attribute button {
            background-color: gray;
            border: none;
            color: white;
            font-size: 20px;
            cursor: pointer;
            width: 30px;
            height: 30px;
            margin: 0;
        }
        #pointsCounter {
            text-align: center;
            font-size: 16px;
            margin-bottom: 10px;
        }
        #createBuildButton {
            display: block;
            margin: 20px auto 0 auto;
            width: 80%;
            text-align: center;
            font-size: 18px;
            font-family: 'Jersey 10', sans-serif;
            color: black;
            background-color: white;
            border-radius: 5px;
            border: 2px solid black;
            cursor: pointer;
            padding: 10px;
        }
        #createBuildButton:hover {
            background-color: gray;
            color: white;
        }
        #codeString {
            text-align: center;
            font-size: 18px;
            margin: 10px 0;
        }
        .remove-button {
            background-color: gray;
            border: none;
            color: white;
            font-size: 18px;
            cursor: pointer;
            width: 30px;
            height: 30px;
            margin-right: 5px;
            transition: background-color 0.3s;
        }
        .remove-button:hover {
            background-color: red;
        }
    `;
    document.head.appendChild(style);

    const userInput = document.createElement("input");
    userInput.id = "userInput";
    userInput.type = "text";
    userInput.placeholder = "Enter Username For Quick Spawn";
    userInput.value = localStorage.getItem("name") || "";

    modMenu.appendChild(userInput);

    const buttons = [
        { name: "L3mon", color: "#FFFFFF", cmd: "656565656565654848748487484874877" },
        { name: "Factory", color: "#F0F0F0", cmd: "567456745678567456745678567488888" },
        { name: "OverLord 2.0", color: "#E0E0E0", cmd: "456745674567456745674567456788888" },
        { name: "OverLord", color: "#D0D0D0", cmd: "555666555566664444444888888822111" },
        { name: "Juggernaut", color: "#C0C0C0", cmd: "213121312138238238883288327777777" },
        { name: "Annihilator", color: "#B0B0B0", cmd: "000000000011111111222222223333333" },
        { name: "Shadow", color: "#A0A0A0", cmd: "999999999999999999888888887777777" },
        { name: "Nemesis", color: "#909090", cmd: "666666666666666555555554444444444" },
        { name: "Warlord", color: "#808080", cmd: "123456789012345678901234567890123" },
        { name: "Phantom", color: "#707070", cmd: "543210987654321098765432109876543" },
    ];

    buttons.forEach((buttonData) => {
        const buttonContainer = document.createElement("div");
        buttonContainer.style.display = "flex";
        buttonContainer.style.alignItems = "center";
        buttonContainer.style.justifyContent = "center";

        const removeButton = document.createElement("button");
        removeButton.className = "remove-button";
        removeButton.textContent = "[-]";
        removeButton.onclick = () => {
            buttonContainer.remove();
        };
        buttonContainer.appendChild(removeButton);

        const button = document.createElement("button");
        button.className = "button";
        button.textContent = buttonData.name;
        button.style.backgroundColor = buttonData.color;
        button.onclick = () => {
            const spawnName = userInput.value.trim();
            window.input.execute(`game_spawn ${spawnName}`);
            window.input.execute(`game_stats_build ${buttonData.cmd}`);
        };
        buttonContainer.appendChild(button);

        modMenu.appendChild(buttonContainer);
    });

    const specialButton = document.createElement("button");
    specialButton.id = "specialButton";
    specialButton.textContent = "[+]";
    specialButton.onclick = () => {
        const popup = document.createElement("div");
        popup.className = "popup";

        const buildNameInput = document.createElement("input");
        buildNameInput.type = "text";
        buildNameInput.placeholder = "Build Name";
        buildNameInput.style.display = "block";
        buildNameInput.style.width = "80%";
        buildNameInput.style.margin = "0 auto 10px auto";
        popup.appendChild(buildNameInput);

        const pointsCounter = document.createElement("div");
        pointsCounter.id = "pointsCounter";
        pointsCounter.textContent = "Points: 33";
        popup.appendChild(pointsCounter);

        const codeString = document.createElement("div");
        codeString.id = "codeString";
        codeString.textContent = "Code: 0";
        popup.appendChild(codeString);

        let totalPoints = 33;
        let code = "";

        const attributes = [
            { name: "Health Regen", color: "rgb(232, 188, 157)" },
            { name: "Max Health", color: "rgb(230, 128, 234)" },
            { name: "Body Damage", color: "rgb(165, 128, 234)" },
            { name: "Bullet Speed", color: "rgb(128, 162, 234)" },
            { name: "Bullet Penetration", color: "rgb(234, 215, 128)" },
            { name: "Bullet Damage", color: "rgb(234, 128, 128)" },
            { name: "Reload", color: "rgb(164, 234, 128)" },
            { name: "Movement Speed", color: "rgb(128, 234, 230)" },
        ];

        attributes.forEach((attribute, index) => {
            const attributeRow = document.createElement("div");
            attributeRow.className = "attribute";

            const minusButton = document.createElement("button");
            minusButton.textContent = "-";
            minusButton.onclick = () => {
                const coloredSquares = Array.from(attributeRow.children).filter(child => child.style.backgroundColor === attribute.color);
                if (coloredSquares.length > 0 && totalPoints < 33) {
                    coloredSquares[coloredSquares.length - 1].style.backgroundColor = "gray";
                    totalPoints++;
                    pointsCounter.textContent = `Points: ${totalPoints}`;
                    code = code.slice(0, -1);
                    codeString.textContent = `Code: ${code}`;
                }
            };
            attributeRow.appendChild(minusButton);

            for (let i = 0; i < 7; i++) {
                const colorDiv = document.createElement("div");
                colorDiv.style.backgroundColor = "gray";
                attributeRow.appendChild(colorDiv);
            }

            const plusButton = document.createElement("button");
            plusButton.textContent = "+";
            plusButton.onclick = () => {
                const graySquares = Array.from(attributeRow.children).filter(child => child.style.backgroundColor === "gray");
                if (graySquares.length > 0 && totalPoints > 0) {
                    graySquares[0].style.backgroundColor = attribute.color;
                    totalPoints--;
                    pointsCounter.textContent = `Points: ${totalPoints}`;
                    code += (index + 1).toString();
                    codeString.textContent = `Code: ${code}`;
                }
            };
            attributeRow.appendChild(plusButton);

            popup.appendChild(attributeRow);
        });

        const createBuildButton = document.createElement("button");
        createBuildButton.id = "createBuildButton";
        createBuildButton.textContent = "Create Build";
        createBuildButton.onclick = () => {
            const buildName = buildNameInput.value.trim();
            if (buildName === "") {
                alert("Please enter a build name.");
                return;
            }

            const buttonContainer = document.createElement("div");
            buttonContainer.style.display = "flex";
            buttonContainer.style.alignItems = "center";
            buttonContainer.style.justifyContent = "center";

            const removeButton = document.createElement("button");
            removeButton.className = "remove-button";
            removeButton.textContent = "[-]";
            removeButton.onclick = () => {
                buttonContainer.remove();
            };
            buttonContainer.appendChild(removeButton);

            const newButton = document.createElement("button");
            newButton.className = "button";
            newButton.textContent = buildName;
            newButton.style.backgroundColor = "#C0C0C0";
            newButton.onclick = () => {
                const spawnName = userInput.value.trim();
                window.input.execute(`game_spawn ${spawnName}`);
                window.input.execute(`game_stats_build ${code}`);
            };
            buttonContainer.appendChild(newButton);

            modMenu.insertBefore(buttonContainer, specialButton);

            document.body.removeChild(popup);
        };
        popup.appendChild(createBuildButton);

        document.body.appendChild(popup);
    };

    modMenu.appendChild(specialButton);

    hoverMenu.appendChild(modMenu);
    document.body.appendChild(hoverMenu);

    document.addEventListener("keydown", (event) => {
        if (event.key === "r" || event.key === "R") {
            const hoverMenu = document.getElementById("myhover");
            if (hoverMenu) {
                hoverMenu.style.display = hoverMenu.style.display === "none" ? "block" : "none";
            }
        }
    });


})();