Greasy Fork

Greasy Fork is available in English.

Shellshock.IO Aimbot & ESP

Locks aim to the nearest player in shellshock.io. Comes with an ESP too. Press B, V, N, L to toggle aimbot, esp, esp lines, aimbot on right mouse hold.

当前为 2024-02-13 提交的版本,查看 最新版本

在您安装前,Greasy Fork 希望您知道此脚本声明其包含了一些负面功能。这些功能也许会使脚本作者获利,而不能给您带来任何直接的金钱收益。

此脚本会在您访问的网站中插入广告

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Shellshock.IO Aimbot & ESP
// @namespace    http://tampermonkey.net/
// @version      0.3.2
// @description  Locks aim to the nearest player in shellshock.io. Comes with an ESP too. Press B, V, N, L to toggle aimbot, esp, esp lines, aimbot on right mouse hold.
// @author       Zertalious (Zert)
// @match        *://shellshock.io/*
// @match        *://algebra.best/*
// @match        *://algebra.vip/*
// @match        *://biologyclass.club/*
// @match        *://deadlyegg.com/*
// @match        *://deathegg.world/*
// @match        *://eggcombat.com/*
// @match        *://egg.dance/*
// @match        *://eggfacts.fun/*
// @match        *://egghead.institute/*
// @match        *://eggisthenewblack.com/*
// @match        *://eggsarecool.com/*
// @match        *://geometry.best/*
// @match        *://geometry.monster/*
// @match        *://geometry.pw/*
// @match        *://geometry.report/*
// @match        *://hardboiled.life/*
// @match        *://hardshell.life/*
// @match        *://humanorganising.org/*
// @match        *://mathdrills.info/*
// @match        *://mathfun.rocks/*
// @match        *://mathgames.world/*
// @match        *://math.international/*
// @match        *://mathlete.fun/*
// @match        *://mathlete.pro/*
// @match        *://overeasy.club/*
// @match        *://scrambled.best/*
// @match        *://scrambled.tech/*
// @match        *://scrambled.today/*
// @match        *://scrambled.us/*
// @match        *://scrambled.world/*
// @match        *://shellshockers.club/*
// @match        *://shellshockers.site/*
// @match        *://shellshockers.us/*
// @match        *://shellshockers.world/*
// @match        *://softboiled.club/*
// @match        *://violentegg.club/*
// @match        *://violentegg.fun/*
// @match        *://yolk.best/*
// @match        *://yolk.life/*
// @match        *://yolk.rocks/*
// @match        *://yolk.tech/*
// @match        *://zygote.cafe/*
// @icon         https://www.google.com/s2/favicons?domain=shellshock.io
// @grant        none
// @run-at       document-start
// @antifeature  ads
// @require      https://cdn.jsdelivr.net/npm/[email protected]
// ==/UserScript==

const keys = {};

window.XMLHttpRequest = class extends window.XMLHttpRequest {

	open( method, url ) {

		if ( url.indexOf( 'shellshock.js' ) > - 1 ) {

			this.isScript = true;

		}

		return super.open( ...arguments );

	}

	get response() {

		if ( this.isScript && ! isNaN( value ) ) {

			const code = super.response;

			let babylonVarName,
				playersVarName,
				myPlayerVarName,
				sceneVarName,
				cullFuncName;

			try {

				babylonVarName = /crosshairs=new ([a-zA-Z]+)\./.exec( code )[ 1 ];
				playersVarName = /ame\),!([a-zA-Z_$]+)\[/.exec( code )[ 1 ];
				myPlayerVarName = /"fire":document.pointerLockElement&&([^&]+)&&/.exec( code )[ 1 ];
				sceneVarName = /createMapCells\(([^,]+),/.exec( code )[ 1 ];
				cullFuncName = /=([a-zA-Z_$]+)\(this\.([a-zA-Z_$]+),\.[0-9]+\)/.exec( code )[ 1 ];

				keys.MeshBuilder = /\.([a-zA-Z_$]+)\.CreatePo/.exec( code )[ 1 ];
				keys.CreateBox = /\.([a-zA-Z_$]+)\("[^"]+",{si/.exec( code )[ 1 ];
				keys.CreateLines = /\.([a-zA-Z_$]+)\("",{po/.exec( code )[ 1 ];
				keys.Vector3 = /v1=new [a-zA-Z_$]+\.([a-zA-Z_$]+)/.exec( code )[ 1 ];
				keys.actor = /this\.([a-zA-Z_$]+)\.[a-zA-Z_$]+\.position,!/.exec( code )[ 1 ];
				keys.playing = /OPEN&&[a-zA-Z_$]+\.([a-zA-Z_$]+)/.exec( code )[ 1 ];

				keys.yaw = /\.([a-zA-Z_$]+)=[a-zA-Z_$]+\.yaw/.exec( code )[ 1 ];
				keys.pitch = /\.([a-zA-Z_$]+)=[a-zA-Z_$]+\.pitch/.exec( code )[ 1 ];
				keys.mesh = /this\.([a-zA-Z_$]+)\.setVisible\(/.exec( code )[ 1 ];

			} catch ( error ) {

				alert( 'Script failed to inject. Report the issue to the script developer.\n' + JSON.stringify( getVars(), undefined, 2 ) );

				return code;

			}

			function getVars() {

				return {
					babylonVarName,
					playersVarName,
					myPlayerVarName,
					playersVarName,
					sceneVarName,
					cullFuncName,
					keys
				};

			}

			console.log( '%cInjecting code...', 'color: red; background: black; font-size: 2em;', getVars() );

			return code.replace( sceneVarName + '.render()', `

					window[ '${onUpdateFuncName}' ]( 
						${babylonVarName}, 
						${playersVarName}, 
						${myPlayerVarName}
					);

				${sceneVarName}.render()` )
				.replace( `function ${cullFuncName}`, `

					function ${cullFuncName}() {

						return true;

					}

				function someFunctionWhichWillNeverBeUsedNow` );

		}

		return super.response;

	}

};

const settings = {
	aimbotEnabled: true, 
	aimbotOnRightMouse: false, 
	espEnabled: true, 
	showLines: true, 
	createdBy: 'Zertalious', 
	showHelp() {

		dialogEl.style.display = dialogEl.style.display === '' ? 'none' : '';

	}
};

const keyToSetting = {
	'KeyB': 'aimbotEnabled', 
	'KeyV': 'espEnabled', 
	'KeyN': 'showLines', 
	'KeyL': 'aimbotOnRightMouse'
};

let gui, controllers;

function initGui() {

	const settingToKey = {};
	for ( const key in keyToSetting ) {

		settingToKey[ keyToSetting[ key ] ] = key;

	}

	gui = new lil.GUI();
	controllers = {};
	for ( const key in settings ) {

		let name = fromCamel( key );
		let shortKey = settingToKey[ key ];

		if ( shortKey ) {

			if ( shortKey.startsWith( 'Key' ) ) shortKey = shortKey.slice( 3 );
			name = `[${shortKey}] ${name}`;

		}

		controllers[ key ] = gui.add( settings, key ).name( name ).listen();

	}

	const titleEl = gui.domElement.querySelector( '.title' );
	titleEl.innerText = `[/] Controls`;

	gui.domElement.style.zIndex = '99999';
	controllers.createdBy.disable();

}

function fromCamel( text ) {

	const result = text.replace( /([A-Z])/g, ' $1' );
	return result.charAt( 0 ).toUpperCase() + result.slice( 1 );

}

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 temp = document.createElement( 'div' );

temp.innerHTML = `<style>

.info {
	position: absolute;
	left: 50%;
	top: 50%;
	padding: 20px;
	background: rgba(0, 0, 0, 0.8);
	border: 6px solid rgba(0, 0, 0, 0.2);
	color: #fff;
	transform: translate(-50%, -50%);
	text-align: center;
	z-index: 999999;
	font-weight: bolder;
}

.info * {
	color: #fff;
}

.close-icon {
	position: absolute;
	right: 5px;
	top: 5px;
	width: 20px;
	height: 20px;
	opacity: 0.5;
	cursor: pointer;
}

.close-icon:before, .close-icon:after {
	content: ' ';
	position: absolute;
	left: 50%;
	top: 50%;
	width: 100%;
	height: 20%;
	transform: translate(-50%, -50%) rotate(-45deg);
	background: #fff;
}

.close-icon:after {
	transform: translate(-50%, -50%) rotate(45deg);
}

.close-icon:hover {
	opacity: 1;
}

.btn {
	cursor: pointer;
	padding: 0.5em;
	background: red;
	border: 3px solid rgba(0, 0, 0, 0.2);
}

.btn:active {
	transform: scale(0.8);
}

.msg {
	position: absolute;
	left: 10px;
	bottom: 10px;
	color: #fff;
	background: rgba(0, 0, 0, 0.6);
	font-weight: bolder;
	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="msg" style="display: none;"></div>
<div class="info">${shouldShowAd ? `<big>Loading ad...</big>` : `<div class="close-icon" onclick="this.parentNode.style.display='none';"></div>
	<big>== Shellshock.IO Aimbot & ESP ==</big>
	<br>
	<br>
	[B] to toggle aimbot
	<br>
	[V] to toggle ESP
	<br>
	[N] to toggle ESP Lines
	<br>
	[L] to toggle aimbot on <br>right mouse hold
	<br>
	[H] to show/hide help
	<br>
	[/] to show/hide control panel
	<br>
	<br>
	By Zertalious
	<br>
	<br>
	<div style="display: grid; grid-template-columns: 1fr 1fr; grid-gap: 5px;">
		<div class="btn" onclick="window.open('https://discord.gg/K24Zxy88VM', '_blank')">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('http://greasyfork.icu/en/users/662330-zertalious', '_blank')">More scripts</div>
	</div>
	` }
</div>`;

const msgEl = temp.querySelector( '.msg' );
const dialogEl = temp.querySelector( '.info' );

window.addEventListener( 'DOMContentLoaded', async function () {

	initGui();

	while ( temp.children.length > 0 ) {

		document.body.appendChild( temp.children[ 0 ] );

	}

	if ( shouldShowAd ) {

		const url = new URL( window.location.href );

		url.searchParams.set( 'showAd', Date.now().toString( 16 ) );
		url.searchParams.set( 'scriptVersion', GM.info.script.version );

		window.location.href = 'https://zertalious.xyz?ref=' + new TextEncoder().encode( url.href ).toString();

	}

} );

let rightMouseDown = false;

function handleMouse( event ) {

	if ( event.button === 2 ) {

		rightMouseDown = event.type === 'pointerdown' ? true : false;

	}

}

window.addEventListener( 'pointerdown', handleMouse );
window.addEventListener( 'pointerup', handleMouse );


function toggleSetting( key ) {

	settings[ key ] = ! settings[ key ];
	showMsg( fromCamel( key ), settings[ key ] );

}

window.addEventListener( 'keyup', function ( event ) {

	if ( document.activeElement && document.activeElement.tagName === 'INPUT' ) return;

	if ( keyToSetting[ event.code ] ) {

		toggleSetting( keyToSetting[ event.code ] );

	}

	switch ( event.code ) {

		case 'KeyH':
			settings.showHelp();
			break;

		case 'Slash' :
			gui._hidden ? gui.show() : gui.hide();
			break;

	}

} );

function showMsg( name, bool ) {

	msgEl.innerText = name + ': ' + ( bool ? 'ON' : 'OFF' );

	msgEl.style.display = 'none';
	void msgEl.offsetWidth;
	msgEl.style.display = '';

}

let lineOrigin, linesArray;

const onUpdateFuncName = btoa( Math.random().toString( 32 ) );

window[ onUpdateFuncName ] = function ( BABYLON, players, myPlayer ) {

	if ( shouldShowAd !== false || ! myPlayer || isNaN( value ) ) return; 

	if ( ! lineOrigin ) {

		lineOrigin = new BABYLON[ keys.Vector3 ]();
		linesArray = [];

		console.log( lineOrigin );

	}

	lineOrigin.copyFrom( myPlayer[ keys.actor ][ keys.mesh ].position );

	const yaw = myPlayer[ keys.actor ][ keys.mesh ].rotation.y;

	lineOrigin.x += Math.sin( yaw );
	lineOrigin.z += Math.cos( yaw );
	lineOrigin.y += Math.sin( - myPlayer[ keys.pitch ] );

	for ( let i = 0; i < linesArray.length; i ++ ) {

		linesArray[ i ].playerExists = false;

	}

	for ( let i = 0; i < players.length; i ++ ) {

		const player = players[ i ];

		if ( ! player || player === myPlayer ) continue;

		if ( player.sphere === undefined ) {

			console.log( 'Adding sphere...' );

			const material = new BABYLON.StandardMaterial( 'myMaterial', player[ keys.actor ].scene );
			material.emissiveColor = material.diffuseColor = new BABYLON.Color3( 1, 0, 0 );
			material.wireframe = true;

			const sphere = BABYLON[ keys.MeshBuilder ][ keys.CreateBox ]( 'mySphere', { width: 0.5, height: 0.75, depth: 0.5 }, player[ keys.actor ].scene );
			sphere.material = material;
			sphere.position.y = 0.3;
			sphere.parent = player[ keys.actor ][ keys.mesh ];
			sphere.renderingGroupId = 1;

			player.sphere = sphere;

		}

		if ( player.lines === undefined ) {

			const options = {
				points: [ lineOrigin, player[ keys.actor ][ keys.mesh ].position ],
				updatable: true
			};

			const lines = options.instance = BABYLON[ keys.MeshBuilder ][ keys.CreateLines ]( 'lines', options, player[ keys.actor ].scene );
			lines.color = new BABYLON.Color3( 1, 0, 0 );
			lines.alwaysSelectAsActiveMesh = true;
			lines.renderingGroupId = 1;

			player.lines = lines;
			player.lineOptions = options;

			linesArray.push( lines );

			console.log( '%cAdding line...', 'color: green; background: black; font-size: 2em;' );

		}

		player.lines.playerExists = true;
		player.lines = BABYLON[ keys.MeshBuilder ][ keys.CreateLines ]( 'lines', player.lineOptions );

		const isEnemy = myPlayer.team === 0 || myPlayer.team !== player.team;
		player.sphere.visibility = settings.espEnabled && isEnemy;
		player.lines.visibility = settings.showLines && player[ keys.playing ] && isEnemy;

	}

	for ( let i = 0; i < linesArray.length; i ++ ) {

		if ( ! linesArray[ i ].playerExists ) {

			console.log( '%cRemoving line...', 'color: red; background: black; font-size: 2em;' );

			linesArray[ i ].dispose();
			linesArray.splice( i, 1 );

		}

	}

	if ( settings.aimbotEnabled && ( settings.aimbotOnRightMouse ? rightMouseDown : true ) && myPlayer[ keys.playing ] ) {

		let minDistance = Infinity;
		let targetPlayer;

		for ( let i = 0; i < players.length; i ++ ) {

			const player = players[ i ];

			if ( player && player !== myPlayer && player[ keys.playing ] && ( myPlayer.team === 0 || player.team !== myPlayer.team ) ) {

				const distance = Math.hypot( 
					getPos( player, 'x' ) - getPos( myPlayer, 'x' ), 
					getPos( player, 'y' ) - getPos( myPlayer, 'y' ), 
					getPos( player, 'z' ) - getPos( myPlayer, 'z' ) 
				);

				if ( distance < minDistance ) {

					minDistance = distance;
					targetPlayer = player;

				}

			}

		}

		if ( targetPlayer ) {

			const x = getPos( targetPlayer, 'x' ) - getPos( myPlayer, 'x' );
			const y = getPos( targetPlayer, 'y' ) - getPos( myPlayer, 'y' );
			const z = getPos( targetPlayer, 'z' ) - getPos( myPlayer, 'z' );

			myPlayer[ keys.yaw ] = Math.radAdd( Math.atan2( x, z ), 0 );
			myPlayer[ keys.pitch ] = - Math.atan2( y, Math.hypot( x, z ) ) % 1.5;

		}

	}

}

function getPos( player, component ) {

	return player[ keys.actor ][ keys.mesh ].position[ component ];

}

delete localStorage[ 'lastVersionPlayed' ];