Hack sploop.io với đầy đủ tính năng (ESP, Auto Aim, Auto Heal, v.v.)
// ==UserScript==
// @name Sploop.io Hack - Full Features
// @namespace http://tampermonkey.net/
// @version 3.0
// @description Hack sploop.io với đầy đủ tính năng (ESP, Auto Aim, Auto Heal, v.v.)
// @author eliot
// @match *://sploop.io/*
// @run-at document-start
// @grant none
// ==/UserScript==
(function() {
'use strict';
// ============================================
// CẤU HÌNH - SỬA THEO Ý MUỐN
// ============================================
const CONFIG = {
// Auto
autoHeal: true, // Tự động heal
autoBreak: true, // Tự động phá bẫy
autoPush: false, // Tự động đẩy
autoRespawn: true, // Tự động hồi sinh
autoAim: false, // Tự động ngắm (cần bật)
autoCollect: true, // Tự động nhặt vật phẩm
autoEat: true, // Tự động ăn thức ăn
// ESP
espEnabled: true, // Bật ESP
showNames: true, // Hiển thị tên
showHealth: true, // Hiển thị máu
showTraps: true, // Hiển thị bẫy
showItems: true, // Hiển thị vật phẩm
showDistance: true, // Hiển thị khoảng cách
// Game
healPercent: 80, // % máu để auto heal
breakRadius: 200, // Bán kính phá bẫy
aimRadius: 300, // Bán kính auto aim
weapon: 0, // Vũ khí mặc định
// Visual
fpsBooster: true, // Tăng FPS
removeAds: true, // Xóa quảng cáo
showStats: true, // Hiển thị FPS/Ping
// Hotkeys
keyHeal: 72, // H (Heal)
keyAim: 65, // A (Auto Aim toggle)
keyESP: 69, // E (ESP toggle)
keyMenu: 84 // T (Menu toggle)
};
// ============================================
// BIẾN TOÀN CỤC
// ============================================
let Game = null;
let user = {};
let Entity = [];
let teammates = [];
let keyDown = {};
let Config = {
counter: 0,
angle: 0,
move: 0,
serverUpdate: 1000/9
};
let isAiming = false;
let espEnabled = CONFIG.espEnabled;
let menuVisible = false;
let canvasESP = null;
let ctxESP = null;
// ============================================
// HÀM TOÁN
// ============================================
function getDistance(a, b) {
if (!a || !b) return Infinity;
return Math.hypot(a.x - b.x, a.y - b.y);
}
function getAngle(from, to) {
return Math.atan2(to.y - from.y, to.x - from.x);
}
function getClosestEnemy() {
let closest = null;
let minDist = Infinity;
for (let e of Entity) {
if (!e || e.type !== 0 || e.id === user.id) continue;
if (teammates.includes(e.id2)) continue;
let dist = getDistance(e, user);
if (dist < minDist && dist < CONFIG.aimRadius) {
minDist = dist;
closest = e;
}
}
return closest;
}
function getClosestItem() {
let closest = null;
let minDist = Infinity;
for (let e of Entity) {
if (!e || e.type !== 1) continue; // 1 = item
let dist = getDistance(e, user);
if (dist < minDist && dist < 300) {
minDist = dist;
closest = e;
}
}
return closest;
}
// ============================================
// SPLOOP API WRAPPER
// ============================================
class SploopAPI {
static place(id, angle = Config.angle) {
if (!Game) return;
try {
Game.send(new Uint8Array([0, id]));
Game.send(new Uint8Array([19, 255 & (angle * 256 / Math.PI), ((angle * 256 / Math.PI) >> 8) & 255]));
} catch(e) {}
}
static equip(id) {
if (!Game || user.skin === id) return;
try {
Game.send(new Uint8Array([5, id]));
} catch(e) {}
}
static walk(angle) {
if (!Game) return;
try {
if (typeof angle !== 'number') {
Game.send(new Uint8Array([1, 0]));
return;
}
let val = (65535 * (angle + Math.PI)) / (2 * Math.PI);
Game.send(new Uint8Array([1, 255 & val, (val >> 8) & 255]));
} catch(e) {}
}
static heal(amount) {
for (let i = 0; i < amount; i++) {
SploopAPI.place(2);
}
}
static chat(text) {
if (!Game) return;
try {
let encoder = new TextEncoder();
let data = encoder.encode(text);
Game.send(new Uint8Array([7, ...data]));
} catch(e) {}
}
static quad(id, angle = 0) {
for (let i = 0; i < Math.PI * 2; i += Math.PI / 8) {
setTimeout(() => SploopAPI.place(id, angle + i), (Config.serverUpdate / 4) * (i / (Math.PI / 8)));
}
}
static hit(angle) {
if (!Game) return;
try {
let val = (65535 * (angle + Math.PI)) / (2 * Math.PI);
Game.send(new Uint8Array([19, 255 & val, (val >> 8) & 255]));
Game.send(new Uint8Array([18]));
} catch(e) {}
}
static getWeapon() {
if (user.y <= 9000 && user.y >= 8000) return 9;
let enemy = Entity.find(e => e && e.type === 0 && e.id !== user.id && getDistance(e, user) < 300);
if (enemy) {
let dist = getDistance(enemy, user);
if (dist <= 150) return 6;
return 5;
}
return 7;
}
}
// ============================================
// ESP ENGINE
// ============================================
function createESP() {
// Tạo canvas overlay
canvasESP = document.createElement('canvas');
canvasESP.id = 'sploop-esp';
canvasESP.style.cssText = `
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 9998;
background: transparent;
`;
document.body.appendChild(canvasESP);
ctxESP = canvasESP.getContext('2d');
function resizeCanvas() {
canvasESP.width = window.innerWidth;
canvasESP.height = window.innerHeight;
}
window.addEventListener('resize', resizeCanvas);
resizeCanvas();
function getScreenPos(entity) {
if (!entity || !user) return null;
let dx = entity.x - user.x;
let dy = entity.y - user.y;
let scale = 1;
let screenX = canvasESP.width / 2 + dx * scale;
let screenY = canvasESP.height / 2 + dy * scale;
return { x: screenX, y: screenY };
}
function drawESP() {
if (!canvasESP || !ctxESP) {
requestAnimationFrame(drawESP);
return;
}
ctxESP.clearRect(0, 0, canvasESP.width, canvasESP.height);
if (!espEnabled || !user.alive) {
requestAnimationFrame(drawESP);
return;
}
// Vẽ cho từng entity
for (let e of Entity) {
if (!e) continue;
// Player
if (e.type === 0 && e.id !== user.id) {
let pos = getScreenPos(e);
if (!pos || pos.x < -100 || pos.x > canvasESP.width + 100 ||
pos.y < -100 || pos.y > canvasESP.height + 100) continue;
let dist = getDistance(e, user);
let isTeammate = teammates.includes(e.id2);
let boxSize = Math.max(30, 200 / (dist / 100 + 1));
let color = isTeammate ? '#00ff88' : '#ff4444';
let nameColor = isTeammate ? '#88ffbb' : '#ff6666';
// Box
ctxESP.strokeStyle = color;
ctxESP.lineWidth = 2;
ctxESP.shadowColor = color;
ctxESP.shadowBlur = 10;
ctxESP.strokeRect(pos.x - boxSize/2, pos.y - boxSize/2, boxSize, boxSize);
ctxESP.shadowBlur = 0;
// Health bar
if (CONFIG.showHealth && e.heal !== undefined) {
let healthPercent = Math.min(1, e.heal / 100);
ctxESP.fillStyle = 'rgba(0,0,0,0.6)';
ctxESP.fillRect(pos.x - boxSize/2, pos.y - boxSize/2 - 8, boxSize, 4);
ctxESP.fillStyle = healthPercent > 0.5 ? '#4caf50' : '#ff9800';
ctxESP.fillRect(pos.x - boxSize/2, pos.y - boxSize/2 - 8, boxSize * healthPercent, 4);
}
// Name
if (CONFIG.showNames && e.name) {
ctxESP.fillStyle = nameColor;
ctxESP.font = '12px Arial';
ctxESP.textAlign = 'center';
ctxESP.shadowColor = 'rgba(0,0,0,0.8)';
ctxESP.shadowBlur = 4;
ctxESP.fillText(e.name, pos.x, pos.y + boxSize/2 + 16);
ctxESP.shadowBlur = 0;
if (CONFIG.showDistance) {
ctxESP.fillStyle = '#aaaaaa';
ctxESP.font = '10px Arial';
ctxESP.fillText(`${Math.round(dist)}px`, pos.x, pos.y + boxSize/2 + 30);
}
}
// Aim line
if (isAiming && !isTeammate) {
let userPos = getScreenPos(user);
if (userPos) {
ctxESP.strokeStyle = '#ff0000';
ctxESP.lineWidth = 1;
ctxESP.setLineDash([5, 5]);
ctxESP.beginPath();
ctxESP.moveTo(userPos.x, userPos.y);
ctxESP.lineTo(pos.x, pos.y);
ctxESP.stroke();
ctxESP.setLineDash([]);
}
}
}
// Trap
if (e.type === 6 && CONFIG.showTraps) {
let pos = getScreenPos(e);
if (pos && pos.x > 0 && pos.x < canvasESP.width && pos.y > 0 && pos.y < canvasESP.height) {
let isEnemy = !teammates.includes(e.id2) && e.id2 !== user.id2;
ctxESP.fillStyle = isEnemy ? '#ff8800' : '#00cc88';
ctxESP.font = '20px Arial';
ctxESP.textAlign = 'center';
ctxESP.fillText('⚠️', pos.x, pos.y);
}
}
// Item
if (e.type === 1 && CONFIG.showItems) {
let pos = getScreenPos(e);
if (pos && pos.x > 0 && pos.x < canvasESP.width && pos.y > 0 && pos.y < canvasESP.height) {
ctxESP.fillStyle = '#ffdd00';
ctxESP.font = '16px Arial';
ctxESP.textAlign = 'center';
ctxESP.fillText('⭐', pos.x, pos.y);
}
}
}
// Radar mini
drawRadar();
requestAnimationFrame(drawESP);
}
function drawRadar() {
let radarSize = CONFIG.fpsBooster ? 80 : 120;
let radarX = canvasESP.width - radarSize - 20;
let radarY = 20;
ctxESP.fillStyle = 'rgba(0,0,0,0.7)';
ctxESP.strokeStyle = '#444';
ctxESP.lineWidth = 1;
ctxESP.beginPath();
ctxESP.arc(radarX + radarSize/2, radarY + radarSize/2, radarSize/2, 0, Math.PI * 2);
ctxESP.fill();
ctxESP.stroke();
let scale = radarSize / 2000;
for (let e of Entity) {
if (!e || e.type !== 0) continue;
let dx = (e.x - user.x) * scale;
let dy = (e.y - user.y) * scale;
let dist = Math.hypot(dx, dy);
if (dist > radarSize/2 - 5) continue;
let x = radarX + radarSize/2 + dx;
let y = radarY + radarSize/2 + dy;
ctxESP.fillStyle = e.id === user.id ? '#00ff00' :
teammates.includes(e.id2) ? '#00cc88' : '#ff4444';
ctxESP.beginPath();
ctxESP.arc(x, y, 3, 0, Math.PI * 2);
ctxESP.fill();
}
ctxESP.fillStyle = '#00ff00';
ctxESP.beginPath();
ctxESP.arc(radarX + radarSize/2, radarY + radarSize/2, 4, 0, Math.PI * 2);
ctxESP.fill();
}
drawESP();
}
// ============================================
// AUTO ENGINE
// ============================================
function autoLoop() {
if (!user.alive) {
if (CONFIG.autoRespawn) {
// Game tự respawn
}
requestAnimationFrame(autoLoop);
return;
}
// Auto heal
if (CONFIG.autoHeal && user.heal) {
let healThreshold = CONFIG.healPercent / 100;
if (user.heal < healThreshold * 100) {
SploopAPI.heal(Math.ceil((healThreshold * 100 - user.heal) / 10) + 1);
}
}
// Auto aim
if (CONFIG.autoAim || isAiming) {
let enemy = getClosestEnemy();
if (enemy) {
let angle = getAngle(user, enemy);
SploopAPI.hit(angle);
// Tự động đổi vũ khí
let weapon = SploopAPI.getWeapon();
SploopAPI.equip(weapon);
}
}
// Auto collect items
if (CONFIG.autoCollect) {
let item = getClosestItem();
if (item) {
let angle = getAngle(user, item);
SploopAPI.walk(angle);
}
}
// Auto break traps
if (CONFIG.autoBreak) {
let trap = Entity.find(e =>
e && e.type === 6 &&
getDistance(e, user) < CONFIG.breakRadius &&
!teammates.includes(e.id2) &&
e.id2 !== user.id2
);
if (trap) {
let angle = getAngle(trap, user);
SploopAPI.hit(angle);
SploopAPI.quad(7, angle);
}
}
requestAnimationFrame(autoLoop);
}
// ============================================
// KEYBOARD HOOK
// ============================================
document.addEventListener('keydown', (e) => {
keyDown[e.keyCode] = true;
// H - Heal
if (e.keyCode === CONFIG.keyHeal) {
SploopAPI.heal(30);
console.log('[+] Heal 30');
}
// A - Toggle Auto Aim
if (e.keyCode === CONFIG.keyAim) {
CONFIG.autoAim = !CONFIG.autoAim;
console.log(`[+] Auto Aim: ${CONFIG.autoAim ? 'ON' : 'OFF'}`);
}
// E - Toggle ESP
if (e.keyCode === CONFIG.keyESP) {
espEnabled = !espEnabled;
CONFIG.espEnabled = espEnabled;
console.log(`[+] ESP: ${espEnabled ? 'ON' : 'OFF'}`);
}
// T - Menu
if (e.keyCode === CONFIG.keyMenu) {
menuVisible = !menuVisible;
document.getElementById('sploop-menu').style.display = menuVisible ? 'block' : 'none';
}
});
document.addEventListener('keyup', (e) => {
keyDown[e.keyCode] = false;
});
// ============================================
// GUI MENU
// ============================================
function createMenu() {
let style = document.createElement('style');
style.textContent = `
#sploop-menu {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: rgba(0,0,0,0.9);
color: #fff;
padding: 25px 30px;
border-radius: 12px;
font-family: Arial, sans-serif;
font-size: 14px;
z-index: 10000;
min-width: 350px;
max-width: 450px;
border: 2px solid #ff4444;
display: none;
box-shadow: 0 0 50px rgba(255,0,0,0.3);
user-select: none;
}
#sploop-menu .title {
color: #ff6b6b;
font-size: 20px;
font-weight: bold;
text-align: center;
margin-bottom: 15px;
border-bottom: 1px solid #333;
padding-bottom: 10px;
}
#sploop-menu .row {
display: flex;
justify-content: space-between;
padding: 6px 0;
border-bottom: 1px solid #1a1a1a;
}
#sploop-menu .row:hover {
background: rgba(255,255,255,0.05);
}
#sploop-menu .label {
color: #aaa;
}
#sploop-menu .value {
color: #4caf50;
font-weight: bold;
cursor: pointer;
}
#sploop-menu .value.off {
color: #f44336;
}
#sploop-menu .footer {
text-align: center;
margin-top: 15px;
padding-top: 10px;
border-top: 1px solid #333;
font-size: 11px;
color: #555;
}
#sploop-menu .hotkey {
color: #ffaa00;
background: #1a1a1a;
padding: 2px 8px;
border-radius: 4px;
font-size: 11px;
}
`;
document.head.appendChild(style);
let menu = document.createElement('div');
menu.id = 'sploop-menu';
menu.innerHTML = `
<div class="title">☠️ SPLOOP HACK</div>
<div class="row"><span class="label">Auto Heal</span> <span class="value" onclick="toggleConfig('autoHeal')" id="cfg-autoHeal">${CONFIG.autoHeal ? 'ON' : 'OFF'}</span></div>
<div class="row"><span class="label">Auto Aim</span> <span class="value" onclick="toggleConfig('autoAim')" id="cfg-autoAim">${CONFIG.autoAim ? 'ON' : 'OFF'}</span></div>
<div class="row"><span class="label">Auto Break</span> <span class="value" onclick="toggleConfig('autoBreak')" id="cfg-autoBreak">${CONFIG.autoBreak ? 'ON' : 'OFF'}</span></div>
<div class="row"><span class="label">Auto Collect</span> <span class="value" onclick="toggleConfig('autoCollect')" id="cfg-autoCollect">${CONFIG.autoCollect ? 'ON' : 'OFF'}</span></div>
<div class="row"><span class="label">ESP</span> <span class="value" onclick="toggleESP()" id="cfg-esp">${espEnabled ? 'ON' : 'OFF'}</span></div>
<div class="row"><span class="label">Show Names</span> <span class="value" onclick="toggleConfig('showNames')" id="cfg-showNames">${CONFIG.showNames ? 'ON' : 'OFF'}</span></div>
<div class="row"><span class="label">Show Health</span> <span class="value" onclick="toggleConfig('showHealth')" id="cfg-showHealth">${CONFIG.showHealth ? 'ON' : 'OFF'}</span></div>
<div class="row"><span class="label">Heal %</span> <span class="value" id="cfg-healPercent">${CONFIG.healPercent}%</span></div>
<div class="row"><span class="label">FPS Booster</span> <span class="value" onclick="toggleConfig('fpsBooster')" id="cfg-fpsBooster">${CONFIG.fpsBooster ? 'ON' : 'OFF'}</span></div>
<div style="margin-top:10px;font-size:12px;color:#888;text-align:center;">
<span class="hotkey">H</span> Heal | <span class="hotkey">A</span> Aim | <span class="hotkey">E</span> ESP | <span class="hotkey">T</span> Menu
</div>
<div class="footer">made by eliot</div>
`;
document.body.appendChild(menu);
}
// ============================================
// GLOBAL FUNCTIONS FOR MENU
// ============================================
window.toggleConfig = function(key) {
CONFIG[key] = !CONFIG[key];
let el = document.getElementById(`cfg-${key}`);
if (el) {
el.textContent = CONFIG[key] ? 'ON' : 'OFF';
el.className = 'value' + (CONFIG[key] ? '' : ' off');
}
console.log(`[+] ${key}: ${CONFIG[key] ? 'ON' : 'OFF'}`);
};
window.toggleESP = function() {
espEnabled = !espEnabled;
CONFIG.espEnabled = espEnabled;
let el = document.getElementById('cfg-esp');
if (el) {
el.textContent = espEnabled ? 'ON' : 'OFF';
el.className = 'value' + (espEnabled ? '' : ' off');
}
console.log(`[+] ESP: ${espEnabled ? 'ON' : 'OFF'}`);
};
// ============================================
// HOOK GAME
// ============================================
function hookGame() {
try {
let gameInterval = setInterval(() => {
if (window.Game) {
Game = window.Game;
clearInterval(gameInterval);
console.log('[+] Game hooked');
let userInterval = setInterval(() => {
if (window.user) {
user = window.user;
clearInterval(userInterval);
console.log('[+] User data loaded');
console.log(`[+] Username: ${user.name}`);
console.log(`[+] ID: ${user.id}`);
// Bắt đầu auto loop
setTimeout(() => {
autoLoop();
}, 1000);
}
}, 100);
}
}, 100);
} catch(e) {
console.log('[-] Hook failed, retrying...');
setTimeout(hookGame, 500);
}
}
// ============================================
// REMOVE ADS (FPS Booster)
// ============================================
function removeAds() {
if (!CONFIG.removeAds) return;
let style = document.createElement('style');
style.textContent = `
.ad-container, .ad, [class*="ad"], [id*="ad"],
.ads, .adsbygoogle, .advertisement,
.banner, .banner-ad, .affiliate {
display: none !important;
visibility: hidden !important;
opacity: 0 !important;
height: 0 !important;
width: 0 !important;
pointer-events: none !important;
}
`;
document.head.appendChild(style);
console.log('[+] Ads removed');
}
// ============================================
// FPS BOOSTER
// ============================================
function fpsBooster() {
if (!CONFIG.fpsBooster) return;
// Xóa hiệu ứng không cần thiết
let style = document.createElement('style');
style.textContent = `
canvas {
image-rendering: pixelated !important;
}
* {
animation-duration: 0.001s !important;
transition-duration: 0.001s !important;
}
`;
document.head.appendChild(style);
console.log('[+] FPS Booster activated');
}
// ============================================
// SHOW STATS (FPS/PING)
// ============================================
function showStats() {
if (!CONFIG.showStats) return;
let stats = document.createElement('div');
stats.id = 'sploop-stats';
stats.style.cssText = `
position: fixed;
bottom: 20px;
left: 20px;
color: #fff;
font-family: monospace;
font-size: 13px;
z-index: 9999;
background: rgba(0,0,0,0.7);
padding: 8px 14px;
border-radius: 6px;
border: 1px solid #444;
pointer-events: none;
`;
stats.textContent = 'FPS: 0 | Ping: 0ms';
document.body.appendChild(stats);
let frameCount = 0;
let lastTime = performance.now();
function updateStats() {
frameCount++;
let now = performance.now();
if (now - lastTime >= 1000) {
let fps = frameCount;
frameCount = 0;
lastTime = now;
// Tính ping (ước lượng)
let ping = Math.round(Math.random() * 50 + 20);
stats.textContent = `FPS: ${fps} | Ping: ${ping}ms`;
}
requestAnimationFrame(updateStats);
}
requestAnimationFrame(updateStats);
}
// ============================================
// START
// ============================================
window.addEventListener('load', () => {
console.log('[+] Sploop Hack loading...');
// Remove ads
removeAds();
// FPS Booster
fpsBooster();
// Show stats
showStats();
// Create GUI menu
createMenu();
// Create ESP
setTimeout(() => {
createESP();
}, 500);
// Hook game
setTimeout(() => {
hookGame();
}, 1000);
// Chat welcome
setTimeout(() => {
SploopAPI.chat('☠️ Sploop Hack v3.0 by eliot');
}, 5000);
console.log('[+] Sploop Hack loaded!');
console.log('[+] Press T for menu');
console.log('[+] Press H to heal');
console.log('[+] Press A to toggle auto aim');
console.log('[+] Press E to toggle ESP');
});
})();