Advanced aimbot and ESP for Shell Shockers. Press B to toggle aimbot, V to toggle ESP, N to toggle ESP lines, L to toggle aimbot on right click
Size
26.7 KB
Version
1.1.1
Created
Oct 31, 2025
Updated
14 days ago
1// ==UserScript==
2// @name Shell Shockers Aimbot & ESP Hack
3// @description Advanced aimbot and ESP for Shell Shockers. Press B to toggle aimbot, V to toggle ESP, N to toggle ESP lines, L to toggle aimbot on right click
4// @version 1.1.1
5// @match https://*.shellshock.io/*
6// @icon https://shellshock.io/favicon.ico
7// @grant none
8// @run-at document-start
9// ==/UserScript==
10(function() {
11 'use strict';
12
13 console.log('[Shell Shockers Hack] Initializing advanced hack...');
14
15 // Configuration
16 const config = {
17 aimbot: {
18 enabled: true,
19 onRightClick: false,
20 smoothing: 0.2,
21 fov: 180,
22 targetBone: 'head',
23 bulletRedirection: true // Auto-hit even with bad aim
24 },
25 esp: {
26 enabled: true,
27 showLines: true,
28 showBoxes: true,
29 showNames: true,
30 showHealth: true,
31 showDistance: true,
32 enemyColor: '#ff0000',
33 teamColor: '#00ff00',
34 lineWidth: 2
35 },
36 adBlock: {
37 enabled: true
38 }
39 };
40
41 // Game variables
42 let gameVars = {
43 BABYLON: null,
44 players: null,
45 myPlayer: null,
46 scene: null,
47 canvas: null
48 };
49
50 // ESP Canvas
51 let espCanvas = null;
52 let espCtx = null;
53
54 // Ad Blocking - Remove ads immediately
55 function blockAds() {
56 if (!config.adBlock.enabled) return;
57
58 console.log('[Shell Shockers Hack] Blocking ads...');
59
60 // Hide ad containers
61 const adSelectors = [
62 '#display-ad-header-home',
63 '#display-ad-left',
64 '#display-ad-right',
65 '#display-ad-footer',
66 '.ad-container',
67 '.advertisement',
68 '[id*="ad-"]',
69 '[class*="ad-"]',
70 'iframe[src*="ads"]',
71 'iframe[src*="doubleclick"]',
72 'iframe[src*="googlesyndication"]'
73 ];
74
75 adSelectors.forEach(selector => {
76 const elements = document.querySelectorAll(selector);
77 elements.forEach(el => {
78 el.style.display = 'none';
79 el.remove();
80 });
81 });
82
83 // Block ad scripts
84 const observer = new MutationObserver((mutations) => {
85 mutations.forEach((mutation) => {
86 mutation.addedNodes.forEach((node) => {
87 if (node.tagName === 'IFRAME' || node.tagName === 'INS') {
88 if (node.src && (node.src.includes('ad') || node.src.includes('doubleclick'))) {
89 node.remove();
90 }
91 }
92 if (node.id && node.id.includes('ad')) {
93 node.remove();
94 }
95 });
96 });
97 });
98
99 observer.observe(document.body, {
100 childList: true,
101 subtree: true
102 });
103
104 console.log('[Shell Shockers Hack] Ads blocked!');
105 }
106
107 // Intercept XMLHttpRequest to inject code into game script
108 const originalOpen = XMLHttpRequest.prototype.open;
109 const originalSend = XMLHttpRequest.prototype.send;
110
111 XMLHttpRequest.prototype.open = function(method, url) {
112 this._url = url;
113 return originalOpen.apply(this, arguments);
114 };
115
116 XMLHttpRequest.prototype.send = function() {
117 if (this._url && this._url.includes('shellshock')) {
118 console.log('[Shell Shockers Hack] Intercepting game script:', this._url);
119
120 const originalOnLoad = this.onload;
121 this.onload = function() {
122 if (this.responseText && this.responseText.length > 10000) {
123 console.log('[Shell Shockers Hack] Injecting hack code...');
124
125 let code = this.responseText;
126
127 try {
128 // Find BABYLON variable
129 const babylonMatch = /new ([a-zA-Z_$][a-zA-Z0-9_$]*)\.Vector3/.exec(code);
130 const babylonVar = babylonMatch ? babylonMatch[1] : 'BABYLON';
131
132 // Find players array
133 const playersMatch = /([a-zA-Z_$][a-zA-Z0-9_$]*)\s*=\s*\[\]\s*,\s*\{\}/.exec(code);
134 const playersVar = playersMatch ? playersMatch[1] : null;
135
136 // Find myPlayer variable
137 const myPlayerMatch = /"fire"[:\s]*document\.pointerLockElement\s*&&\s*([a-zA-Z_$][a-zA-Z0-9_$]*)/.exec(code);
138 const myPlayerVar = myPlayerMatch ? myPlayerMatch[1] : null;
139
140 // Find scene variable
141 const sceneMatch = /([a-zA-Z_$][a-zA-Z0-9_$]*)\.activeCamera/.exec(code);
142 const sceneVar = sceneMatch ? sceneMatch[1] : null;
143
144 console.log('[Shell Shockers Hack] Found variables:', {
145 babylon: babylonVar,
146 players: playersVar,
147 myPlayer: myPlayerVar,
148 scene: sceneVar
149 });
150
151 // Inject code to expose game variables and hook bullet firing
152 const injectionCode = `
153 ;(function() {
154 try {
155 window.gameHack = {
156 BABYLON: typeof ${babylonVar} !== 'undefined' ? ${babylonVar} : null,
157 players: typeof ${playersVar} !== 'undefined' ? ${playersVar} : [],
158 myPlayer: null,
159 scene: typeof ${sceneVar} !== 'undefined' ? ${sceneVar} : null,
160 getMyPlayer: function() {
161 return typeof ${myPlayerVar} !== 'undefined' ? ${myPlayerVar} : null;
162 },
163 originalFire: null,
164 bulletRedirection: true
165 };
166
167 // Hook into bullet firing to redirect bullets
168 const hookBulletFire = () => {
169 const myPlayer = window.gameHack.getMyPlayer();
170 if (!myPlayer || !myPlayer.weapon) return;
171
172 // Store original fire method
173 if (!window.gameHack.originalFire && myPlayer.weapon.fire) {
174 window.gameHack.originalFire = myPlayer.weapon.fire;
175
176 // Override fire method
177 myPlayer.weapon.fire = function(...args) {
178 if (window.gameHack.bulletRedirection) {
179 // Find closest enemy
180 const players = window.gameHack.players;
181 const me = window.gameHack.getMyPlayer();
182
183 if (me && players && players.length > 0) {
184 let closestEnemy = null;
185 let minDist = Infinity;
186
187 for (let i = 0; i < players.length; i++) {
188 const p = players[i];
189 if (!p || p === me || !p.playing) continue;
190 if (!p.actor || !p.actor.mesh) continue;
191
192 const isEnemy = p.team === undefined || p.team !== me.team;
193 if (!isEnemy) continue;
194
195 if (me.actor && me.actor.mesh) {
196 const dx = p.actor.mesh.position.x - me.actor.mesh.position.x;
197 const dy = p.actor.mesh.position.y - me.actor.mesh.position.y;
198 const dz = p.actor.mesh.position.z - me.actor.mesh.position.z;
199 const dist = Math.sqrt(dx*dx + dy*dy + dz*dz);
200
201 if (dist < minDist) {
202 minDist = dist;
203 closestEnemy = p;
204 }
205 }
206 }
207
208 // Redirect aim to closest enemy
209 if (closestEnemy && closestEnemy.actor && closestEnemy.actor.mesh) {
210 const target = closestEnemy.actor.mesh.position;
211 const myPos = me.actor.mesh.position;
212
213 const dx = target.x - myPos.x;
214 const dy = target.y - myPos.y + 0.5; // Aim at head
215 const dz = target.z - myPos.z;
216
217 const yaw = Math.atan2(dx, dz);
218 const dist = Math.sqrt(dx*dx + dz*dz);
219 const pitch = -Math.atan2(dy, dist);
220
221 // Set aim directly
222 if (me.actor.mesh.rotation) {
223 me.actor.mesh.rotation.y = yaw;
224 }
225 if (me.pitch !== undefined) {
226 me.pitch = pitch;
227 }
228 }
229 }
230 }
231
232 // Call original fire method
233 return window.gameHack.originalFire.apply(this, args);
234 };
235 }
236 };
237
238 // Try to hook every second
239 setInterval(hookBulletFire, 1000);
240
241 console.log('[Shell Shockers Hack] Game variables exposed and bullet hook installed');
242 } catch(e) {
243 console.error('[Shell Shockers Hack] Error exposing variables:', e);
244 }
245 })();
246 `;
247
248 code = code + injectionCode;
249
250 // Override the response
251 Object.defineProperty(this, 'responseText', {
252 writable: true,
253 value: code
254 });
255 Object.defineProperty(this, 'response', {
256 writable: true,
257 value: code
258 });
259
260 } catch(e) {
261 console.error('[Shell Shockers Hack] Error injecting code:', e);
262 }
263 }
264
265 if (originalOnLoad) {
266 originalOnLoad.apply(this, arguments);
267 }
268 };
269 }
270 return originalSend.apply(this, arguments);
271 };
272
273 // Create ESP overlay
274 function createESPCanvas() {
275 espCanvas = document.createElement('canvas');
276 espCanvas.id = 'esp-overlay';
277 espCanvas.style.position = 'fixed';
278 espCanvas.style.top = '0';
279 espCanvas.style.left = '0';
280 espCanvas.style.width = '100%';
281 espCanvas.style.height = '100%';
282 espCanvas.style.pointerEvents = 'none';
283 espCanvas.style.zIndex = '9999';
284 espCanvas.width = window.innerWidth;
285 espCanvas.height = window.innerHeight;
286 document.body.appendChild(espCanvas);
287 espCtx = espCanvas.getContext('2d');
288
289 console.log('[Shell Shockers Hack] ESP canvas created');
290
291 window.addEventListener('resize', () => {
292 espCanvas.width = window.innerWidth;
293 espCanvas.height = window.innerHeight;
294 });
295 }
296
297 // World to screen projection
298 function worldToScreen(position, camera) {
299 try {
300 if (!gameVars.BABYLON || !camera || !position) return null;
301
302 const engine = camera.getEngine();
303 const viewport = camera.viewport.toGlobal(
304 engine.getRenderWidth(),
305 engine.getRenderHeight()
306 );
307
308 const worldMatrix = gameVars.BABYLON.Matrix.Identity();
309 const transformMatrix = camera.getTransformationMatrix();
310
311 const screenPos = gameVars.BABYLON.Vector3.Project(
312 position,
313 worldMatrix,
314 transformMatrix,
315 viewport
316 );
317
318 if (screenPos.z < 0 || screenPos.z > 1) return null;
319
320 return {
321 x: screenPos.x,
322 y: screenPos.y,
323 z: screenPos.z
324 };
325 } catch(err) {
326 return null;
327 }
328 }
329
330 // Draw ESP
331 function drawESP() {
332 if (!config.esp.enabled || !espCtx || !gameVars.scene) return;
333
334 try {
335 espCtx.clearRect(0, 0, espCanvas.width, espCanvas.height);
336
337 const camera = gameVars.scene.activeCamera;
338 if (!camera) return;
339
340 const myPlayer = window.gameHack ? window.gameHack.getMyPlayer() : null;
341 const players = window.gameHack ? window.gameHack.players : [];
342
343 if (!players || players.length === 0) return;
344
345 for (let i = 0; i < players.length; i++) {
346 const player = players[i];
347
348 if (!player || player === myPlayer || !player.playing) continue;
349 if (!player.actor || !player.actor.mesh || !player.actor.mesh.position) continue;
350
351 const isEnemy = !myPlayer || player.team === undefined || player.team !== myPlayer.team;
352 const color = isEnemy ? config.esp.enemyColor : config.esp.teamColor;
353
354 const position = player.actor.mesh.position;
355 const screenPos = worldToScreen(position, camera);
356
357 if (!screenPos) continue;
358
359 const x = screenPos.x;
360 const y = screenPos.y;
361
362 let distance = 0;
363 if (myPlayer && myPlayer.actor && myPlayer.actor.mesh) {
364 const dx = position.x - myPlayer.actor.mesh.position.x;
365 const dy = position.y - myPlayer.actor.mesh.position.y;
366 const dz = position.z - myPlayer.actor.mesh.position.z;
367 distance = Math.sqrt(dx * dx + dy * dy + dz * dz);
368 }
369
370 if (config.esp.showLines) {
371 espCtx.strokeStyle = color;
372 espCtx.lineWidth = config.esp.lineWidth;
373 espCtx.beginPath();
374 espCtx.moveTo(espCanvas.width / 2, espCanvas.height);
375 espCtx.lineTo(x, y);
376 espCtx.stroke();
377 }
378
379 if (config.esp.showBoxes) {
380 const boxHeight = 2000 / distance;
381 const boxWidth = boxHeight / 2;
382
383 espCtx.strokeStyle = color;
384 espCtx.lineWidth = config.esp.lineWidth;
385 espCtx.strokeRect(
386 x - boxWidth / 2,
387 y - boxHeight / 2,
388 boxWidth,
389 boxHeight
390 );
391 }
392
393 let textY = y - 40;
394 espCtx.font = 'bold 14px Arial';
395 espCtx.textAlign = 'center';
396 espCtx.strokeStyle = '#000000';
397 espCtx.lineWidth = 3;
398 espCtx.fillStyle = color;
399
400 if (config.esp.showNames && player.name) {
401 espCtx.strokeText(player.name, x, textY);
402 espCtx.fillText(player.name, x, textY);
403 textY += 18;
404 }
405
406 if (config.esp.showHealth && player.health !== undefined) {
407 const healthText = `HP: ${Math.round(player.health)}`;
408 espCtx.strokeText(healthText, x, textY);
409 espCtx.fillText(healthText, x, textY);
410 textY += 18;
411 }
412
413 if (config.esp.showDistance) {
414 const distText = `${Math.round(distance)}m`;
415 espCtx.strokeText(distText, x, textY);
416 espCtx.fillText(distText, x, textY);
417 }
418 }
419 } catch(err) {
420 console.error('[Shell Shockers Hack] ESP error:', err);
421 }
422 }
423
424 // Aimbot function
425 function aimbot() {
426 if (!config.aimbot.enabled) return;
427 if (config.aimbot.onRightClick && !isRightMouseDown) return;
428
429 try {
430 const myPlayer = window.gameHack ? window.gameHack.getMyPlayer() : null;
431 const players = window.gameHack ? window.gameHack.players : [];
432
433 if (!myPlayer || !myPlayer.actor || !myPlayer.actor.mesh) return;
434 if (!players || players.length === 0) return;
435
436 let closestPlayer = null;
437 let minDistance = Infinity;
438
439 for (let i = 0; i < players.length; i++) {
440 const player = players[i];
441
442 if (!player || player === myPlayer || !player.playing) continue;
443 if (!player.actor || !player.actor.mesh || !player.actor.mesh.position) continue;
444
445 const isEnemy = player.team === undefined || player.team !== myPlayer.team;
446 if (!isEnemy) continue;
447
448 const dx = player.actor.mesh.position.x - myPlayer.actor.mesh.position.x;
449 const dy = player.actor.mesh.position.y - myPlayer.actor.mesh.position.y;
450 const dz = player.actor.mesh.position.z - myPlayer.actor.mesh.position.z;
451 const distance = Math.sqrt(dx * dx + dy * dy + dz * dz);
452
453 if (distance < minDistance) {
454 minDistance = distance;
455 closestPlayer = player;
456 }
457 }
458
459 if (closestPlayer && closestPlayer.actor && closestPlayer.actor.mesh) {
460 const targetPos = closestPlayer.actor.mesh.position.clone();
461
462 if (config.aimbot.targetBone === 'head') {
463 targetPos.y += 0.5;
464 }
465
466 const dx = targetPos.x - myPlayer.actor.mesh.position.x;
467 const dy = targetPos.y - myPlayer.actor.mesh.position.y;
468 const dz = targetPos.z - myPlayer.actor.mesh.position.z;
469
470 const yaw = Math.atan2(dx, dz);
471 const distance = Math.sqrt(dx * dx + dz * dz);
472 const pitch = -Math.atan2(dy, distance);
473
474 if (myPlayer.actor.mesh.rotation) {
475 const currentYaw = myPlayer.actor.mesh.rotation.y;
476 const newYaw = currentYaw + (yaw - currentYaw) * config.aimbot.smoothing;
477 myPlayer.actor.mesh.rotation.y = newYaw;
478 }
479
480 if (myPlayer.pitch !== undefined) {
481 const currentPitch = myPlayer.pitch;
482 const newPitch = currentPitch + (pitch - currentPitch) * config.aimbot.smoothing;
483 myPlayer.pitch = newPitch;
484 }
485 }
486 } catch(err) {
487 console.error('[Shell Shockers Hack] Aimbot error:', err);
488 }
489 }
490
491 // Track right mouse button
492 let isRightMouseDown = false;
493 document.addEventListener('mousedown', (e) => {
494 if (e.button === 2) isRightMouseDown = true;
495 });
496 document.addEventListener('mouseup', (e) => {
497 if (e.button === 2) isRightMouseDown = false;
498 });
499
500 // Main loop
501 function mainLoop() {
502 try {
503 if (window.gameHack) {
504 gameVars.BABYLON = window.gameHack.BABYLON;
505 gameVars.players = window.gameHack.players;
506 gameVars.scene = window.gameHack.scene;
507
508 // Sync bullet redirection setting
509 window.gameHack.bulletRedirection = config.aimbot.bulletRedirection;
510 }
511
512 aimbot();
513 drawESP();
514 } catch(err) {
515 console.error('[Shell Shockers Hack] Main loop error:', err);
516 }
517
518 requestAnimationFrame(mainLoop);
519 }
520
521 // Keyboard controls
522 document.addEventListener('keydown', (e) => {
523 switch(e.key.toLowerCase()) {
524 case 'b':
525 config.aimbot.enabled = !config.aimbot.enabled;
526 console.log('[Shell Shockers Hack] Aimbot:', config.aimbot.enabled ? 'ON' : 'OFF');
527 showNotification('Aimbot: ' + (config.aimbot.enabled ? 'ON' : 'OFF'));
528 break;
529 case 'v':
530 config.esp.enabled = !config.esp.enabled;
531 console.log('[Shell Shockers Hack] ESP:', config.esp.enabled ? 'ON' : 'OFF');
532 showNotification('ESP: ' + (config.esp.enabled ? 'ON' : 'OFF'));
533 if (!config.esp.enabled && espCtx) {
534 espCtx.clearRect(0, 0, espCanvas.width, espCanvas.height);
535 }
536 break;
537 case 'n':
538 config.esp.showLines = !config.esp.showLines;
539 console.log('[Shell Shockers Hack] ESP Lines:', config.esp.showLines ? 'ON' : 'OFF');
540 showNotification('ESP Lines: ' + (config.esp.showLines ? 'ON' : 'OFF'));
541 break;
542 case 'l':
543 config.aimbot.onRightClick = !config.aimbot.onRightClick;
544 console.log('[Shell Shockers Hack] Aimbot on Right Click:', config.aimbot.onRightClick ? 'ON' : 'OFF');
545 showNotification('Aimbot on Right Click: ' + (config.aimbot.onRightClick ? 'ON' : 'OFF'));
546 break;
547 case 'm':
548 config.aimbot.bulletRedirection = !config.aimbot.bulletRedirection;
549 console.log('[Shell Shockers Hack] Auto-Hit:', config.aimbot.bulletRedirection ? 'ON' : 'OFF');
550 showNotification('Auto-Hit: ' + (config.aimbot.bulletRedirection ? 'ON' : 'OFF'));
551 break;
552 }
553 });
554
555 // Show notification
556 function showNotification(message) {
557 const notification = document.createElement('div');
558 notification.textContent = message;
559 notification.style.cssText = `
560 position: fixed;
561 top: 20px;
562 right: 20px;
563 background: rgba(0, 0, 0, 0.9);
564 color: #00ff00;
565 padding: 15px 25px;
566 border-radius: 5px;
567 font-family: Arial, sans-serif;
568 font-size: 16px;
569 font-weight: bold;
570 z-index: 10000;
571 border: 2px solid #00ff00;
572 box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
573 `;
574 document.body.appendChild(notification);
575
576 setTimeout(() => {
577 notification.style.transition = 'opacity 0.5s';
578 notification.style.opacity = '0';
579 setTimeout(() => notification.remove(), 500);
580 }, 2000);
581 }
582
583 // Initialize
584 function init() {
585 console.log('[Shell Shockers Hack] Waiting for game to load...');
586
587 // Block ads immediately
588 blockAds();
589
590 const checkCanvas = setInterval(() => {
591 const canvas = document.getElementById('canvas');
592 if (canvas) {
593 clearInterval(checkCanvas);
594 console.log('[Shell Shockers Hack] Game canvas found, initializing...');
595
596 createESPCanvas();
597
598 setTimeout(() => {
599 mainLoop();
600 console.log('[Shell Shockers Hack] Hack activated!');
601 showNotification('Shell Shockers Hack Loaded!');
602 setTimeout(() => {
603 showNotification('B: Aimbot | V: ESP | N: Lines | L: Right Click | M: Auto-Hit');
604 }, 2500);
605 }, 2000);
606 }
607 }, 500);
608
609 // Keep blocking ads
610 setInterval(blockAds, 5000);
611 }
612
613 if (document.readyState === 'loading') {
614 document.addEventListener('DOMContentLoaded', init);
615 } else {
616 init();
617 }
618
619})();