Greasy Fork is available in English.

Best AutoAim/AimBot (NOT VISUAL - GO NEAR TO AN ENEMY)

The best AutoAim - Forces to aim at ENEMY.

// ==UserScript==
// @name         Best AutoAim/AimBot (NOT VISUAL - GO NEAR TO AN ENEMY)
// @author       Cubic Flex [CF]
// @description  The best AutoAim - Forces to aim at ENEMY.
// @namespace    -
// @version      1.2
// @license      MIT
// @match        *://*.moomoo.io/*
// @require      https://cdn.jsdelivr.net/npm/msgpack-lite@0.1.26/dist/msgpack.min.js
// ==/UserScript==

/* global msgpack */
var mPI, aL = false, tR, mP = {}, aA = true, tH = false;
function dT(a, b){
    return Math.sqrt(Math.pow((b.y-a[2]),2) +Math.pow((b.x-a[1]),2));
}

WebSocket.prototype.oldSender = WebSocket.prototype.send;
WebSocket.prototype.send = function(m) {
    if(!aL){
        this.addEventListener("message", (m)=>{
            let t = msgpack.decode(new Uint8Array(m.data));
            let d;
            if(t.length > 1) {
                d = [t[0], ...t[1]];
                if (d[1] instanceof Array){
                    d = d;
                }
            } else {
                d = t;
            }
            let item = d[0];
            if(!d) {return};
            if (item == "1" && mPI == null){
                mPI = d[1];
            }
            if (item == "33") {
                let no = {};
                let eN = [];
                for(let i = 0; i < d[1].length / 13; i++) {
                    let pI = d[1].slice(13*i, 13*i+13);
                    if(pI[0] == mPI) {
                        mP.x = pI[1];
                        mP.y = pI[2];
                        mP.clan = pI[7];
                    } else if(pI[7] != mP.clan || pI[7] === null) {
                        eN.push(pI)
                        var nE = eN.sort((a,b) => dT(a, mP) - dT(b, mP))[0];
                        if(nE) {
                            console.log(pI)
                            tR = Math.atan2(nE[2]-mP.y, nE[1]-mP.x);
                        }
                    }
                }
            }
        });
        aL = true;
    }
    var data = msgpack.decode(new Uint8Array(m));

    if(data[0] == "2" && aA) {
        this.oldSender(new Uint8Array(Array.from(msgpack.encode(["2", [tR]]))));
    } else if(data[0] == "2" && tH){
        this.oldSender(new Uint8Array(Array.from(msgpack.encode(["2", [90 ** 100]]))));
    } else {
        this.oldSender(m);
    }
};

let d = document;d.addEventListener("keydown", (e)=>{
    if(e.keyCode==84){
        aA = !aA;
        d.title = ("Auto AimBot: " + (aA ? "ON" : "OFF")) + " | 360 Hit: " + (tH ? "ON" : "OFF");
    } else if(e.keyCode==82){
        tH = !tH;
        d.title = ("Auto AimBot: " + (aA ? "ON" : "OFF")) + " | 360 Hit: " + (tH ? "ON" : "OFF");
    }
});
d.title = ("Auto AimBot: " + (aA ? "ON" : "OFF")) + " | 360 Hit: " + (tH ? "ON" : "OFF");