diep.io shape changer script

changes the shapes of bullets tanks shapes, the whole lot

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         diep.io shape changer script
// @namespace    http://tampermonkey.net/
// @version      0.2.1
// @description  changes the shapes of bullets tanks shapes, the whole lot
// @author       bismuth
// @match        *diep.io
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// @license      none
// ==/UserScript==
const map = {
    1: 6, //from -> to
    3: 5,
    4: 8,
    5: 3
}
let mem, active = true;
WebAssembly.instantiateStreaming = new Proxy(WebAssembly.instantiateStreaming, {
    apply(...args) {
        mem = new Int32Array(args[2][1].a.memory.buffer);
        return Reflect.apply(...args);
    }
});
window.requestAnimationFrame = new Proxy(window.requestAnimationFrame, {
    apply(...args) {
        if (mem) change();
        return Reflect.apply(...args);
    }
});
const change = () => {
    const things = mem.slice(mem[0xed44 >> 2] >> 2, mem[0xed48 >> 2] >> 2);
    for (const thing of things) {
        if (!active) {
            mem[thing + 0x68 >> 2] = (mem[thing + 4 >> 2] >> 8) || mem[thing + 0x68 >> 2];
            mem[thing + 4 >> 2] = 0;
            continue;
        }
        if (mem[thing + 4 >> 2]) continue;
        const before = mem[thing + 0x68 >> 2];
        mem[thing + 0x68 >> 2] = map[before] || before;
        mem[thing + 4 >> 2] = before << 8;
    }
}
document.onkeydown = async ({keyCode}) => {
    if (keyCode === 192) active ^= true;
}