Shows players behind walls in Ev.IO.
当前为
// ==UserScript==
// @name Ev.IO ESP
// @namespace http://tampermonkey.net/
// @version 0.1
// @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
// ==/UserScript==
let espEnabled = true;
const geometry = new THREE.EdgesGeometry( new THREE.BoxGeometry( 1, 2, 1 ).translate( 0, - 2.5, 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 boxes = [];
function animate() {
if ( worldScene ) {
let idx = 0;
if ( espEnabled ) {
for ( let i = 0; i < worldScene.children.length; i ++ ) {
const child = worldScene.children[ i ];
try {
if ( child.type === 'Sprite' && child.visible && child.material.map.image.className === 'canvas_healthbar' && child.material.depthTest === true ) {
let box = boxes[ idx ];
if ( ! box ) {
box = boxes[ idx ] = new THREE.LineSegments( geometry, material );
}
if ( box.parent !== worldScene ) {
worldScene.add( box );
}
box.position.set( child.position.x, child.position.y, child.position.z );
box.visible = true;
idx ++;
}
} catch ( err ) {}
}
}
for ( let i = idx; i < boxes.length; i ++ ) {
boxes[ i ].visible = false;
}
}
}
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 = `<style>
.dialog {
position: absolute;
left: 50%;
top: 50%;
padding: 20px;
background: rgba(50, 0, 0, 0.8);
border: 6px solid rgba(0, 0, 0, 0.2);
color: #fff;
transform: translate(-50%, -50%);
box-shadow: 0 0 0 10000px rgba(0, 0, 0, 0.3);
text-align: center;
z-index: 999999;
}
.dialog * {
color: #fff;
}
.close {
position: absolute;
right: 5px;
top: 5px;
width: 20px;
height: 20px;
opacity: 0.5;
cursor: pointer;
}
.close:before, .close:after {
content: ' ';
position: absolute;
left: 50%;
top: 50%;
width: 100%;
height: 20%;
transform: translate(-50%, -50%) rotate(-45deg);
background: #fff;
}
.close:after {
transform: translate(-50%, -50%) rotate(45deg);
}
.close:hover {
opacity: 1;
}
.dialog .btn {
cursor: pointer;
padding: 0.5em;
background: hsla(0, 67%, 44%, 0.7);
border: 3px solid rgba(0, 0, 0, 0.2);
}
.dialog .btn:active {
transform: scale(0.8);
}
.msg {
position: absolute;
left: 10px;
bottom: 10px;
background: rgba(50, 0, 0, 0.8);
color: #fff;
padding: 15px;
animation: msg 0.5s forwards, msg 0.5s reverse forwards 3s;
z-index: 999999;
pointer-events: none;
}
@keyframes msg {
from {
transform: translate(-120%, 0);
}
to {
transform: none;
}
}
</style>
<div class="dialog">${shouldShowAd ? `<big>Loading ad...</big>` : `<div class="close" onclick="this.parentNode.style.display='none';"></div>
<big>== Ev.IO ESP ==</big>
<br>
<br>
[V] to toggle ESP
<br>
<br>
By Zertalious
<br>
<br>
<div style="display: grid; grid-gap: 8px; grid-template-columns: 1fr 1fr;">
<div class="btn" onclick="window.open('https://discord.gg/K24Zxy88VM')">Discord</div>
<div class="btn" onclick="window.open('https://www.instagram.com/zertalious/', '_blank')">Instagram</div>
<div class="btn" onclick="window.open('https://twitter.com/Zertalious', '_blank')">Twitter</div>
<div class="btn" onclick="window.open('https://greasyfork.org/en/users/662330-zertalious', '_blank')">More scripts</div>
</div>
` }
</div>
<div class="msg" style="display: none;"></div>`;
const msgEl = el.querySelector( '.msg' );
while ( el.children.length > 0 ) {
document.body.appendChild( el.children[ 0 ] );
}
if ( shouldShowAd ) {
const url = new URL( window.location.href );
url.searchParams.set( 'showAd', Date.now().toString( 16 ) );
window.location.href = 'https://zertalious.xyz?ref=' + new TextEncoder().encode( url.href ).toString();
}
window.addEventListener( 'keyup', function ( event ) {
if ( String.fromCharCode( event.keyCode ) === 'V' ) {
espEnabled = ! espEnabled;
msgEl.innerText = 'ESP: ' + ( espEnabled ? 'ON' : 'OFF' );
msgEl.style.display = 'none';
void msgEl.offsetWidth;
msgEl.style.display = '';
}
} )