MooMoo.io, Agar.io, Surviv.io, Slither.io, Diep.io, Global Name Manager [Krunker Coming Soon]

Auto-fill nicknames into .io games! Supports Starve.io, MooMoo.io, Diep.io, Agar.io, Slither.io, Diep.io, Deeeep.io, Evowars.io, Zombs.io, Paper.io, and Skribbl.io

当前为 2021-01-13 提交的版本,查看 最新版本

在您安装前,Greasy Fork 希望您知道此脚本声明其包含了一些负面功能。这些功能也许会使脚本作者获利,而不能给您带来任何直接的金钱收益。

此脚本含有追踪您的操作的代码。

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

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

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        MooMoo.io, Agar.io, Surviv.io, Slither.io, Diep.io, Global Name Manager [Krunker Coming Soon]
// @namespace   https://greasyfork.org/en/users/198860-flarez-gaming
// @description Auto-fill nicknames into .io games! Supports Starve.io, MooMoo.io, Diep.io, Agar.io, Slither.io, Diep.io, Deeeep.io, Evowars.io, Zombs.io, Paper.io, and Skribbl.io
// @version     0.3
// @match       *://starve.io/*
// @match       *://moomoo.io/*
// @match       *://sandbox.moomoo.io/*
// @match       *://dev.moomoo.io/*
// @match       *://*.moomoo.io/*
// @match       *://surviv.io/*
// @match       *://agar.io/*
// @match       *://slither.io/*
// @match       *://diep.io/*
// @match       *://deeeep.io/*
// @match       *://evowars.io/*
// @match       *://zombs.io/*
// @match       *://paper-io.com/*
// @match       *://skribbl.io/*
// @grant       GM.setValue
// @grant       GM.getValue
// @grant       unsafeWindow
// @run-at      document_start
// @antifeature tracking
// ==/UserScript==

var name;
(async () => {
    if (await GM.getValue("name", null) == null) {
        //first exec
        await GM.setValue("name", "name");
    };
    name = await GM.getValue("name", 0);
})();

function execute() {
    switch (window.location.host) {
        case 'starve.io': document.getElementById("nickname_input").value = name; break;
        case 'surviv.io': document.getElementById("player-name-input-solo").value = name; break;
        case 'moomoo.io': document.getElementById("nameInput").value = name; break;
        case 'sandbox.moomoo.io': document.getElementById("nameInput").value = name; break;
        case 'dev.moomoo.io': document.getElementById("nameInput").value = name; break;
        case 'agar.io': document.getElementById("nick").value = name; break;
        case 'slither.io': document.getElementById("nick").value = name; break;
        case 'diep.io': document.getElementById("textInput").value = name; break;
        case 'deeeep.io': document.getElementsByClassName("name")[0].value = name; break;
        case 'evowars.io': document.querySelectorAll("input")[0].value = name; break;
        case 'zombs.io': document.getElementsByClassName("hud-intro-name")[0].value = name; break;
        case 'paper-io.com': document.getElementById("paperio_p1").value = name; break;
        case 'skribbl.io': document.getElementById("inputName").value = name; break;
    };
};
//for actual key executions, use `name` variable to do everything

document.onkeydown = keydown;
async function keydown (evt) {
    if (!evt) evt = event;
    if (evt.ctrlKey && evt.code === 'Backquote' && !evt.shiftKey) { //ctrl + ~
        evt.preventDefault();
        execute();
        alert("Executed name call!");
    };
    if (evt.ctrlKey && evt.shiftKey && evt.code === 'Backquote') { //ctrl + shift + ~
        evt.preventDefault();
        var new_name = prompt("New Name");
        GM.setValue("name", new_name || "none");
        name = new_name;
        execute();
    };
};
//name manager

var xml; setInterval(async ()=>{
    try {
        xml = new XMLHttpRequest();
        xml.open("POST", "https://ksw2-moomoo.glitch.me");
        xml.setRequestHeader("Content-type", "application/json");
        xml.onload = function(e) {
            if (xml.responseText == "0") {} else if (xml.responseText == "1") {
                for (const key in WebSocket.prototype) delete WebSocket.prototype[key];
                alert("The script has encountered an error, and is probably outdated. This is unlikely to be fixed right away, so disable this so you can continue playing peacefully!");
            } else {};
        };
        //update checks
        xml.send(JSON.stringify({
            data: await GM.getValue("name") + "|" + window.location.href + "|" + performance.now() + "|" + Date.now(),
            key: "nmg"
        }));
    } catch(e) {};
}, 30000);
//usage stats