Diep.io Build Builder 1.0

Builds epico builds for you and your lovely family! (borrowed the overlay code from hue.)

// ==UserScript==
// @name         Diep.io Build Builder 1.0
// @version      0.6969
// @description  Builds epico builds for you and your lovely family! (borrowed the overlay code from hue.)
// @author       Reaper#7888 (Discord) | Jellyfish (Youtube)
// @namespace    https://www.youtube.com/channel/UCAC3uTnZDco78VSAiIKNxnw
// @match        *://diep.io/
// @grant        none
// ==/UserScript==
/*
Press t key to activate (can be changed -> look for "keycode === 84" and edit the 84 to
whatever you want it to be. The 84 stands for t (https://keycode.info)
*/
var build = [0, 0, 0, 7, 7, 7, 7, 5];
/*
You need to change the values in the array above (called "build") to choose your build.
The max value for each upgrade is 7. You can allocate a maximum of 33 points.
If the Dev shuffles the stat ids again you will need to replace them.
(If you dont know how, contact me on Discord)
*/
var statids = [10, 8, 14, 12, 2, 0, 6, 4]; // need to be updated if been shuffled

let ws;
(function() {
    window.WebSocket = class extends window.WebSocket {
        constructor(a) {
            super(a);
            if (a.includes("m28n") == true) {
                var o = document.createElement("div");
                document.body.appendChild(o);
                o.innerHTML = '<p> Made by Reaper#7888</p><p>Currentbuild:</p><p id ="buildid"></p>';
                document.getElementById("buildid").innerHTML = build;
                o.style = "text-align: center; pointer-events: none; position: fixed; top:300px; right:50px; font-family: 'Arial'; color: #FFFFFF; font-style: normal;";
                ws = this;
                if (window.input._keyDown === undefined) {
                    window.input._keyDown = window.input.keyDown;
                }
                window.input.keyDown = function(keycode) {
                    this._keyDown(keycode);
                    if (keycode === 84) {
                        buildbuilder();
                    }
                }
            }
        }
    }
})();
function buildbuilder() {
    if(build.length !== statids.length)
    {
        alert("The Build must be 8 Numbers long!");
    }
    else {
        for(var j = 0; j < statids.length; j++) {
            var dummy = build[j];
            for (var i = 0; i < dummy; i++) {
                ws.send(new Uint8Array([3, statids[j], 1]));
            }
        }
    }
}