simple Autofire & Autospin Detector

balls

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         simple Autofire & Autospin Detector
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  balls
// @author       8_no
// @match        https://diep.io/
// @icon         https://www.google.com/s2/favicons?sz=64&domain=diep.io
// @grant        none
// @license      MIT
// ==/UserScript==

var died=true;
var autofire=false;
var autospin=false;

function s() {
    if(input.should_prevent_unload()) {
        if (died) {
            died=false;
//alive
              };
         }else{
//dead
                  died=true;
             autofire=false;
             autospin=false;
         }
}

setInterval(s, 100);

//activation
document.addEventListener("keydown", (kc) => {
            if (kc.keyCode === 69) {
           autofire = !autofire;
        }
            if (kc.keyCode === 67) {
           autospin = !autospin;
        }
});

//gui
const ctx = canvas.getContext("2d");
setTimeout(() => {
    let gui = () => {
        ctx.fillStyle = "yellow";
        ctx.lineWidth = 8;
        ctx.font = 3 + "em Ubuntu";
        ctx.strokeStyle = "orange";
        ctx.strokeText(`Autofire: ${autofire}`, 50, 1000);
        ctx.fillText(`Autofire: ${autofire}`, 50, 1000);
        ctx.fillStyle = "lime";
        ctx.lineWidth = 8;
        ctx.font = 3 + "em Ubuntu";
        ctx.strokeStyle = "darkgreen";
        ctx.strokeText(`Autospin: ${autospin}`, 50, 1050);
        ctx.fillText(`Autospin: ${autospin}`, 50, 1050);
        window.requestAnimationFrame(gui);
    }
    gui();
    setTimeout(() => {
        gui();
    },5000);
}, 1000);