Greasy Fork

kirka.io ESP

ESP behind the wall players show cheat for kirka.io

目前为 2024-01-25 提交的版本。查看 最新版本

// ==UserScript==
// @name         kirka.io ESP
// @namespace    http://tampermonkey.net/
// @version      2024-01-25
// @description  ESP behind the wall players show cheat for kirka.io
// @author       You
// @match        https://kirka.io/*
// @require https://update.greasyfork.org/scripts/482771/1314238/Malayala%20Kit.js
// @require      https://unpkg.com/three@latest/build/three.min.js
// @icon         https://www.google.com/s2/favicons?sz=64&domain=kirka.io
// @lisans mid
// @grant        none
// ==/UserScript==


const AnonimbiriAPI = {
    THREE: window.THREE,
    esp: false,
    playersObjects: [],
    scene: null,
    camera: null,
    roomCode: null,
    debug: false,
};

delete window.THREE;

var toastManager = new MalayalaKit.ToastManager();
const kit = new MalayalaKit.CreateMenu({
    title: "Kirka Menu",
    icon: "",
    size: { width: 500, height: 400 },
    position: { top: 50, left: 50 },
    hotkey: {
        keyCode: 113,
        ctrlKey: false,
        altKey: false,
        shiftKey: false
    },
});
const general = new MalayalaKit.Tab("General");
general.addSwitch({
    label: "Player ESP",
    value: false,
    onchange: (value) => {
        AnonimbiriAPI.esp = value;
        toastManager.showToast({ message: 'Player ESP is ' + (value ? 'ON' : 'OFF'), type: 'info' });
    },
});
kit.addTab(general);

WeakMap.prototype.set = new Proxy(WeakMap.prototype.set, {
    apply(target, thisArgs, [object]) {

        if (object && typeof object === 'object'){
            if (object.type == 'Scene' && object.autoUpdate === false){
                AnonimbiriAPI.debug && console.log("%cScene Found: ", "color: pink", object);
                AnonimbiriAPI.scene = object;
            }else if (object.alphaTest && object.depthTest){
                AnonimbiriAPI.debug && console.log("%cMaterial Found: ", "color: pink", object);
                AnonimbiriAPI.playersObjects.push(object);
            }
        }

        return Reflect.apply(...arguments);
    }
});

window.requestAnimationFrame = new Proxy(window.requestAnimationFrame, {
    apply(target, prop, args) {
        if(AnonimbiriAPI.esp){
            AnonimbiriAPI.playersObjects.forEach(player => { player.alphaTest = 1; player.depthTest = false; player.color.setRGB(1, 0, 0); });
            AnonimbiriAPI.scene.children.filter(object => {
                return object.hasOwnProperty('entity') && object.entity.hasOwnProperty('colyseusObject');
            }).forEach(player => {
                /*if (player.entity.colyseusObject.team == 'red'){
                    AnonimbiriAPI.debug && console.log("%cTeam: ", "color: pink", player.entity.colyseusObject.name, ' ', player.entity.colyseusObject.team);
                }else if(player.entity.colyseusObject.team == 'blue'){

                }*/
                AnonimbiriAPI.debug && console.log("%cPlayer: ", "color: pink", player);
            });
        }
        return Reflect.apply(target, prop, args);
    }
});

window.AnonimbiriAPI = AnonimbiriAPI;
kit.render();