// ==UserScript==
// @name DSC.GG/143X ULTIMATE MOD MENU - NEWEST UPDATE SIMPLIFIED MENU
// @namespace http://tampermonkey.net/
// @version 9.8
// @description DSC.GG/143X MOD MENU
// @author GITHUB.COM/DXXTHLY - HTTPS://DSC.GG/143X dxxthly. | waynesg
// @match http://slither.io/
// @match https://slither.io/
// @match http://slither.com/io
// @match https://slither.com/io
// @grant none
// @downloadURL none
// ==/UserScript==
(function () {
'use strict';
// === CONFIG ===
const config = {
menuPosition: 'right',
defaultCircleRadius: 150,
circleRadiusStep: 20,
minCircleRadius: 50,
maxCircleRadius: 300,
deathSoundURL: 'https://www.myinstants.com/media/sounds/minecraft-death-sound.mp3',
godModeVideoURL: 'https://youtu.be/ghAap5IWu1Y',
defaultMenuName: 'DSC.GG/143X',
defaultMenuColor: '#4CAF50'
};
// === STATE ===
const state = {
features: {
circleRestriction: false,
autoCircle: false,
performanceMode: 1,
deathSound: true,
fpsDisplay: false,
autoBoost: false,
showServer: false,
},
menuVisible: true,
zoomFactor: 1.0,
circleRadius: config.defaultCircleRadius,
fps: 0,
fpsFrames: 0,
fpsLastCheck: Date.now(),
deathSound: new Audio(config.deathSoundURL),
isInGame: false,
boosting: false,
autoCircleAngle: 0,
ping: 0,
server: '',
leaderboard: [],
lastSnakeAlive: true,
boostingInterval: null,
menuName: localStorage.getItem('modMenuName') || config.defaultMenuName,
menuColor: localStorage.getItem('modMenuColor') || config.defaultMenuColor,
showCustomization: sessionStorage.getItem('showCustomization') === 'false' ? false : true,
simplified: sessionStorage.getItem('modMenuSimplified') === 'true'
};
let autoCircleRAF = null;
// === Helper: Hex to RGBA ===
function hexToRgba(hex, alpha = 1) {
let c = hex.replace('#', '');
if (c.length === 3) c = c[0]+c[0]+c[1]+c[1]+c[2]+c[2];
const num = parseInt(c, 16);
return `rgba(${(num>>16)&255},${(num>>8)&255},${num&255},${alpha})`;
}
// === MENU CREATION ===
const menu = document.createElement('div');
menu.id = 'mod-menu';
menu.style.position = 'fixed';
menu.style.top = '50px';
menu.style.background = 'rgba(17, 17, 17, 0.92)';
menu.style.border = `2px solid ${state.menuColor}`;
menu.style.borderRadius = '10px';
menu.style.padding = '20px';
menu.style.zIndex = '9999';
menu.style.color = '#fff';
menu.style.fontFamily = 'Arial, sans-serif';
menu.style.fontSize = '14px';
menu.style.width = '460px';
menu.style.boxShadow = '0 0 15px rgba(0,0,0,0.7)';
menu.style.backdropFilter = 'blur(5px)';
menu.style.transition = 'all 0.3s ease';
menu.style.userSelect = "text";
if (config.menuPosition === 'left') {
menu.style.left = '50px';
} else if (config.menuPosition === 'center') {
menu.style.left = '50%';
menu.style.transform = 'translateX(-50%)';
} else {
menu.style.right = '50px';
}
document.body.appendChild(menu);
// FPS display
const fpsDisplay = document.createElement('div');
fpsDisplay.id = 'fps-display';
fpsDisplay.style.position = 'fixed';
fpsDisplay.style.bottom = '10px';
fpsDisplay.style.right = '10px';
fpsDisplay.style.color = '#fff';
fpsDisplay.style.fontFamily = 'Arial, sans-serif';
fpsDisplay.style.fontSize = '14px';
fpsDisplay.style.zIndex = '9999';
fpsDisplay.style.display = 'none';
fpsDisplay.style.background = 'rgba(0,0,0,0.5)';
fpsDisplay.style.padding = '5px 10px';
fpsDisplay.style.borderRadius = '5px';
document.body.appendChild(fpsDisplay);
// Ping display
const pingDisplay = document.createElement('div');
pingDisplay.id = 'ping-display';
pingDisplay.style.position = 'fixed';
pingDisplay.style.bottom = '35px';
pingDisplay.style.right = '10px';
pingDisplay.style.color = '#fff';
pingDisplay.style.fontFamily = 'Arial, sans-serif';
pingDisplay.style.fontSize = '14px';
pingDisplay.style.zIndex = '9999';
pingDisplay.style.display = 'block';
pingDisplay.style.background = 'rgba(0,0,0,0.5)';
pingDisplay.style.padding = '5px 10px';
pingDisplay.style.borderRadius = '5px';
document.body.appendChild(pingDisplay);
// Circle restriction visual
const circleVisual = document.createElement('div');
circleVisual.id = 'circle-visual';
circleVisual.style.position = 'fixed';
circleVisual.style.border = `2px dashed ${hexToRgba(state.menuColor, 0.7)}`;
circleVisual.style.borderRadius = '50%';
circleVisual.style.pointerEvents = 'none';
circleVisual.style.transform = 'translate(-50%, -50%)';
circleVisual.style.zIndex = '9998';
circleVisual.style.display = 'none';
circleVisual.style.transition = 'all 0.2s ease';
document.body.appendChild(circleVisual);
// === MENU CONTENT ===
function updateMenu() {
menu.style.border = `2px solid ${state.menuColor}`;
const color = state.menuColor;
circleVisual.style.border = `2px dashed ${hexToRgba(state.menuColor, 0.7)}`;
const arrow = state.showCustomization ? '▼' : '▶';
if (state.simplified) {
menu.style.width = '320px';
menu.innerHTML = `
Status
Zoom: ${Math.round(100 / state.zoomFactor)}%
Ping: ${state.ping} ms
FPS: ${state.fps}
Server: ${state.features.showServer ? (state.server || 'N/A') : 'Hidden'}
DSC.GG/143X | Made by: dxxthly. & waynesg on Discord
`;
setTimeout(() => {
const btn = document.getElementById('default-menu-btn');
if (btn) {
btn.onclick = () => {
state.simplified = false;
sessionStorage.setItem('modMenuSimplified', 'false');
menu.style.width = '460px';
updateMenu();
};
}
}, 0);
return;
}
menu.style.width = '460px';
menu.innerHTML = `
${arrow} Menu Customization
MOVEMENT
K: Circle Restriction: ${state.features.circleRestriction ? 'ON' : 'OFF'}
J/L: Circle Size: ${state.circleRadius}px
A: Auto Circle (left): ${state.features.autoCircle ? 'ON' : 'OFF'}
B: Auto Boost: ${state.features.autoBoost ? 'ON' : 'OFF'}
ZOOM
Z: Zoom In
X: Zoom Out
C: Reset Zoom
VISUALS
1-3: Performance Mode ${['Low: Minimal','Medium: Balanced','High: Quality'][state.features.performanceMode-1] || 'Off'}
F: FPS Display: ${state.features.fpsDisplay ? 'ON' : 'OFF'}
V: Death Sound: ${state.features.deathSound ? 'ON' : 'OFF'}
T: Show Server IP: ${state.features.showServer ? 'ON' : 'OFF'}
LINKS
G: GitHub
D: Discord
Y: GodMode
STATUS
Game State: ${state.isInGame ? 'In Game' : 'Menu'}
Zoom: ${Math.round(100 / state.zoomFactor)}%
Ping: ${state.ping} ms
FPS: ${state.fps}
EXTRA
Server: ${state.features.showServer ? (state.server || 'N/A') : 'Hidden'}
Leaderboard:
${state.leaderboard.length ? state.leaderboard.map((x,i)=>`${i+1}. ${x}`).join('
') : 'N/A'}
Press M to hide/show menu | DSC.GG/143X | P Screenshot
Made by: dxxthly. & waynesg on Discord
`;
setTimeout(() => {
const simplifyBtn = document.getElementById('simplify-menu-btn');
if (simplifyBtn) {
simplifyBtn.onclick = () => {
state.simplified = true;
sessionStorage.setItem('modMenuSimplified', 'true');
updateMenu();
};
}
const toggle = document.getElementById('customization-toggle');
if (toggle) {
toggle.onclick = () => {
state.showCustomization = !state.showCustomization;
sessionStorage.setItem('showCustomization', state.showCustomization);
updateMenu();
};
}
const nameInput = document.getElementById('mod-menu-name-input');
const nameBtn = document.getElementById('mod-menu-name-btn');
const colorInput = document.getElementById('mod-menu-color-input');
if (nameBtn && nameInput) {
nameBtn.onclick = () => {
const val = nameInput.value.trim();
if (val.length > 0) {
state.menuName = val;
localStorage.setItem('modMenuName', val);
updateMenu();
}
};
nameInput.onkeydown = (e) => {
if (e.key === 'Enter') nameBtn.click();
};
}
if (colorInput) {
colorInput.oninput = (e) => {
state.menuColor = colorInput.value;
localStorage.setItem('modMenuColor', colorInput.value);
updateMenu();
};
}
}, 0);
}
updateMenu();
// === GAME STATE DETECTION ===
function checkGameState() {
const gameCanvas = document.querySelector('canvas');
const loginForm = document.getElementById('login');
state.isInGame = !!(gameCanvas && gameCanvas.style.display !== 'none' && (!loginForm || loginForm.style.display === 'none'));
setTimeout(checkGameState, 1000);
}
checkGameState();
// === CIRCLE RESTRICTION VISUAL ===
function drawCircleRestriction() {
if (state.features.circleRestriction && state.isInGame) {
const centerX = window.innerWidth / 2;
const centerY = window.innerHeight / 2;
circleVisual.style.left = `${centerX}px`;
circleVisual.style.top = `${centerY}px`;
circleVisual.style.width = `${state.circleRadius * 2}px`;
circleVisual.style.height = `${state.circleRadius * 2}px`;
circleVisual.style.display = 'block';
} else {
circleVisual.style.display = 'none';
}
requestAnimationFrame(drawCircleRestriction);
}
drawCircleRestriction();
// === KEYBINDS ===
document.addEventListener('keydown', function (e) {
if (document.activeElement && (
document.activeElement.tagName === 'INPUT' ||
document.activeElement.tagName === 'TEXTAREA' ||
document.activeElement.isContentEditable
)) return;
switch (e.key.toLowerCase()) {
case 'm':
state.menuVisible = !state.menuVisible;
menu.style.display = state.menuVisible ? 'block' : 'none';
break;
case 'k':
state.features.circleRestriction = !state.features.circleRestriction;
updateMenu();
break;
case 'j':
state.circleRadius = Math.max(config.minCircleRadius, state.circleRadius - config.circleRadiusStep);
updateMenu();
break;
case 'l':
state.circleRadius = Math.min(config.maxCircleRadius, state.circleRadius + config.circleRadiusStep);
updateMenu();
break;
case 'a':
state.features.autoCircle = !state.features.autoCircle;
if (state.features.autoCircle) {
autoCircleRAF = requestAnimationFrame(autoCircle);
} else if (autoCircleRAF) {
cancelAnimationFrame(autoCircleRAF);
autoCircleRAF = null;
}
updateMenu();
break;
case 'b':
state.features.autoBoost = !state.features.autoBoost;
updateMenu();
break;
case 'f':
state.features.fpsDisplay = !state.features.fpsDisplay;
fpsDisplay.style.display = state.features.fpsDisplay ? 'block' : 'none';
updateMenu();
break;
case 'v':
state.features.deathSound = !state.features.deathSound;
updateMenu();
break;
case 't':
state.features.showServer = !state.features.showServer;
updateMenu();
break;
case 'z':
state.zoomFactor = Math.max(0.1, state.zoomFactor - 0.1);
updateMenu();
break;
case 'x':
state.zoomFactor = Math.min(2, state.zoomFactor + 0.1);
updateMenu();
break;
case 'c':
state.zoomFactor = 1.0;
updateMenu();
break;
case '1':
state.features.performanceMode = 1;
applyPerformanceMode();
break;
case '2':
state.features.performanceMode = 2;
applyPerformanceMode();
break;
case '3':
state.features.performanceMode = 3;
applyPerformanceMode();
break;
case 'g':
window.open('https://github.com/dxxthly', '_blank');
break;
case 'd':
window.open('https://dsc.gg/143x', '_blank');
break;
case 'y':
window.open(config.godModeVideoURL, '_blank');
break;
}
});
// === AUTO CIRCLE ===
function autoCircle() {
if (!state.features.autoCircle || !state.isInGame) return;
state.autoCircleAngle += 0.04;
const centerX = window.innerWidth / 2;
const centerY = window.innerHeight / 2;
const radius = state.circleRadius * 0.8;
const moveX = centerX + Math.cos(state.autoCircleAngle) * radius;
const moveY = centerY + Math.sin(state.autoCircleAngle) * radius;
const canvas = document.querySelector('canvas');
if (canvas) {
const event = new MouseEvent('mousemove', {
clientX: moveX,
clientY: moveY,
bubbles: true
});
canvas.dispatchEvent(event);
}
autoCircleRAF = requestAnimationFrame(autoCircle);
}
// === AUTO BOOST ===
function autoBoost() {
if (!state.features.autoBoost || !state.isInGame) {
if (state.boosting) {
state.boosting = false;
if (typeof window.setAcceleration === 'function') window.setAcceleration(0);
document.dispatchEvent(new KeyboardEvent('keyup', { key: ' ' }));
}
return;
}
if (!state.boosting) {
state.boosting = true;
if (typeof window.setAcceleration === 'function') window.setAcceleration(1);
document.dispatchEvent(new KeyboardEvent('keydown', { key: ' ' }));
}
}
function autoBoostLoop() {
autoBoost();
setTimeout(autoBoostLoop, 100);
}
autoBoostLoop();
// === FPS COUNTER ===
function fpsCounter() {
state.fpsFrames++;
const now = Date.now();
if (now - state.fpsLastCheck >= 1000) {
state.fps = state.fpsFrames;
state.fpsFrames = 0;
state.fpsLastCheck = now;
if (state.features.fpsDisplay) {
fpsDisplay.textContent = `FPS: ${state.fps}`;
}
}
requestAnimationFrame(fpsCounter);
}
fpsCounter();
// === DEATH SOUND ===
function deathSoundObserver() {
let lastState = true;
setInterval(() => {
if (!state.features.deathSound) return;
if (window.snake && lastState && !window.snake.alive) {
state.deathSound.pause();
state.deathSound.currentTime = 0;
state.deathSound.play();
}
const died = document.getElementById('died');
if (died && died.style.display !== 'none' && lastState) {
state.deathSound.pause();
state.deathSound.currentTime = 0;
state.deathSound.play();
}
lastState = window.snake ? window.snake.alive : false;
}, 100);
}
state.deathSound.preload = 'auto';
state.deathSound.load();
state.deathSound.addEventListener('ended', () => {
state.deathSound.currentTime = 0;
});
deathSoundObserver();
// === PERFORMANCE MODES ===
function applyPerformanceMode() {
if (typeof window !== "undefined") {
switch (state.features.performanceMode) {
case 1:
window.want_quality = 0;
window.high_quality = false;
window.render_mode = 1;
break;
case 2:
window.want_quality = 1;
window.high_quality = false;
window.render_mode = 2;
break;
case 3:
window.want_quality = 2;
window.high_quality = true;
window.render_mode = 2;
break;
default:
break;
}
}
updateMenu();
}
applyPerformanceMode();
// === ZOOM LOCK ===
function zoomLockLoop() {
if (typeof window.gsc !== 'undefined') {
window.gsc = state.zoomFactor;
}
requestAnimationFrame(zoomLockLoop);
}
zoomLockLoop();
// === PING DISPLAY ===
function pingLoop() {
let ping = 0;
if (window.lagging && typeof window.lagging === "number") {
ping = Math.round(window.lagging);
} else if (window.lag && typeof window.lag === "number") {
ping = Math.round(window.lag);
}
state.ping = ping;
pingDisplay.textContent = `Ping: ${ping} ms`;
const pingValue = document.getElementById("ping-value");
if (pingValue) pingValue.textContent = `${ping} ms`;
setTimeout(pingLoop, 500);
}
pingLoop();
// === SCREENSHOT BUTTON (P) ===
document.addEventListener('keydown', function (e) {
if (e.key.toLowerCase() === 'p' && state.isInGame) {
try {
const canvas = document.querySelector('canvas');
if (canvas) {
const dataURL = canvas.toDataURL();
const link = document.createElement('a');
link.href = dataURL;
link.download = `slither_screenshot_${Date.now()}.png`;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}
} catch (err) {
alert('Screenshot failed: ' + err);
}
}
});
// === SERVER & LEADERBOARD UPDATES ===
function updateServerAndLeaderboard() {
if (window.bso && window.bso && window.bso.ip) {
state.server = window.bso.ip;
}
if (window.lb && Array.isArray(window.lb)) {
state.leaderboard = window.lb.map(x => x ? (x.nk || x.name || 'Unknown') : 'Unknown');
}
setTimeout(updateServerAndLeaderboard, 1000);
}
updateServerAndLeaderboard();
// === INITIAL MENU VISIBILITY ===
menu.style.display = state.menuVisible ? 'block' : 'none';
// === INITIAL FPS DISPLAY ===
fpsDisplay.style.display = state.features.fpsDisplay ? 'block' : 'none';
// === INITIAL PING DISPLAY ===
pingDisplay.style.display = 'block';
// === INITIAL CIRCLE VISUAL COLOR ===
circleVisual.style.border = `2px dashed ${hexToRgba(state.menuColor, 0.7)}`;
})();