special narrow one

nice function

// ==UserScript==
// @name         special narrow one
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  nice function
// @author       beaverite
// @match        https://narrow.one/*
// @icon         
// @license      MIT
// @run-at       document-start
// ==/UserScript==

(function () {
    'use strict';

    const game = {};
    window.game = game;
    let Check = true;
    
    const originalBind = Function.prototype.bind;
    Function.prototype.bind = function () {
        if (arguments?.[0]?.cam) {
            game.main = arguments[0];
        }
        f();
        return originalBind.apply(this, arguments);
    };
    function f() {
        const previousPositions = new Map();
        setInterval(() => {
            const myPlayer = game.main?.gameManager?.activeGame?.getMyPlayer?.();
            if (!myPlayer)
                return;
            const myPosition = myPlayer.getCamPos();
            let closestPlayer = null;
            let minDistSq = Infinity;
            for (const player of game.main.gameManager.activeGame.players.values()) {
                if (!player || player === myPlayer || player.dead || myPlayer.teamId === player.teamId) continue;
                const obj = player.obj;
                const mat = obj?.material;
                if (mat) {
                    const materials = Array.isArray(mat) ? mat : [mat];
                    materials.forEach(m => {
                        m.depthTest = false;
                        m.alphaTest = 1;
                        if (m.color && typeof m.color.set === 'function') {
                            m.color.set(0xff0000);
                        }
                    });
                }
            }
        }, 16); // ~60fps
    }
console.log(`
 _______  _______       ______   _______  _______           _______  _______ __________________________
(  ____ \\(  ____ \\     (  ___ \\ (  ____ \\(  ___  )|\\     /|(  ____ \\(  ____ )\\__   __/\\__   __/(  ____ \\
| (    \\/| (    \\/     | (   ) )| (    \\/| (   ) || )   ( || (    \\/| (    )|   ) (      ) (   | (    \\/
| |      | (_____      | (__/ / | (__    | (___) || |   | || (__    | (____)|   | |      | |   | (__  
| |      (_____  )     |  __ (  |  __)   |  ___  |( (   ) )|  __)   |     __)   | |      | |   | __)  
| |            ) |     | (  \\ \\ | (      | (   ) | \\     / | (      | (\\ (      | |      | |   | (    
| (____/\\/\\____) |     | )___) )| (____/\\| )   ( |  \\   /  | (____/\\| ) \\ \\_____) (___   | |   | (____/\\
(_______/\\_______)_____|/ \\___/ (_______/|/     \\|   \\_/   (_______/|/   \\__/\\_______/   )_(   (_______/
`);
})();