// ==UserScript== // @name Ev.IO ESP // @namespace http://tampermonkey.net/ // @version 0.2 // @description Shows players behind walls in Ev.IO. // @author Zertalious (Zert) // @match *://ev.io/* // @icon https://www.google.com/s2/favicons?sz=64&domain=ev.io // @grant none // @run-at document-end // @antifeature ads // @downloadURL none // ==/UserScript== let espEnabled = true; let espSize = 1; const geometry = new THREE.EdgesGeometry( new THREE.BoxGeometry( 1, 2, 1 ).translate( 0, 1, 0 ) ); const material = new THREE.RawShaderMaterial( { vertexShader: ` attribute vec3 position; uniform mat4 projectionMatrix; uniform mat4 modelViewMatrix; void main() { gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); gl_Position.z = 1.0; } `, fragmentShader: ` void main() { gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 ); } ` } ); let worldScene; WeakMap.prototype.set = new Proxy( WeakMap.prototype.set, { apply( target, thisArgs, [ object ] ) { if ( object.type === 'Scene' ) { if ( object.children.length > 4 ) { worldScene = object; console.log( 'SCENE FOUND!', worldScene ); } } return Reflect.apply( ...arguments ); } } ); const precision = Math.pow( 10, 4 ); function createKey( object ) { return Math.round( precision * object.position.x ) + ',' + Math.round( precision * object.position.z ); } function animate() { if ( worldScene ) { const spriteMap = {}; const players = []; for ( let i = 0; i < worldScene.children.length; i ++ ) { const child = worldScene.children[ i ]; if ( child.type === 'Sprite' ) { try { if ( child.material.map.image.className === 'canvas_healthbar' ) { child.isEnemy = child.material.depthTest === true; spriteMap[ createKey( child ) ] = child; } } catch ( err ) {} } else if ( child.name === 'character' ) { if ( ! child.myBox ) { child.myBox = new THREE.LineSegments( geometry, material ); child.add( child.myBox ); } child.myBox.scale.setScalar( espSize ); players.push( child ); } } for ( let i = 0; i < players.length; i ++ ) { const player = players[ i ]; if ( ! player.sprite ) { player.sprite = spriteMap[ createKey( player ) ]; } player.myBox.visible = player.sprite ? player.sprite.isEnemy && player.sprite.visible : true; } } } window.requestAnimationFrame = new Proxy( window.requestAnimationFrame, { apply( target, thisArgs, args ) { args[ 0 ] = new Proxy( args[ 0 ], { apply( target, thisArgs, args ) { Reflect.apply( ...arguments ); animate(); } } ); return Reflect.apply( ...arguments ); } } ); const value = parseInt( new URLSearchParams( window.location.search ).get( 'showAd' ), 16 ); const shouldShowAd = isNaN( value ) || Date.now() - value < 0 || Date.now() - value > 10 * 60 * 1000; const el = document.createElement( 'div' ); el.innerHTML = `