// ==UserScript==
// @name Advanced Sploop.io Enhhancements 2024!
// @namespace http://tampermonkey.net/
// @version 2.2
// @description Very useful (FPS, Real-time, help anti-clown, smart messages, playtime tracking, continuous spam messages, smart anti-ban, click effects, music playlist)
// @author khanhnguyen
// @match *://sploop.io/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
function showSuccessMessage() {
spawnSmartMessage('Script loaded successfully!');
}
showSuccessMessage();
let gameStartTime = null;
let gameEndTime = null;
let gameInterval = null;
const controlPanel = document.createElement('div');
controlPanel.style.position = 'fixed';
controlPanel.style.top = '10px';
controlPanel.style.left = '10px';
controlPanel.style.color = 'white';
controlPanel.style.backgroundColor = 'rgba(0, 0, 0, 0.7)';
controlPanel.style.padding = '10px';
controlPanel.style.borderRadius = '5px';
controlPanel.style.fontFamily = 'Arial, sans-serif';
controlPanel.style.zIndex = '1000';
controlPanel.style.display = 'none';
document.body.appendChild(controlPanel);
const timezoneSelect = document.createElement('select');
const timezones = [
'UTC', 'America/New_York', 'America/Los_Angeles', 'Europe/London', 'Europe/Berlin', 'Asia/Tokyo', 'Australia/Sydney', 'Asia/Ho_Chi_Minh', 'Asia/Singapore', 'Europe/Moscow', 'Pacific/Auckland'
];
timezones.forEach(tz => {
const option = document.createElement('option');
option.value = tz;
option.textContent = tz;
timezoneSelect.appendChild(option);
});
controlPanel.appendChild(timezoneSelect);
const fpsToggleLabel = document.createElement('label');
fpsToggleLabel.textContent = ' Show FPS';
const fpsToggleCheckbox = document.createElement('input');
fpsToggleCheckbox.type = 'checkbox';
fpsToggleCheckbox.checked = true;
fpsToggleLabel.prepend(fpsToggleCheckbox);
controlPanel.appendChild(fpsToggleLabel);
const antiClownToggleLabel = document.createElement('label');
antiClownToggleLabel.textContent = ' Anti-clown feature';
const antiClownToggleCheckbox = document.createElement('input');
antiClownToggleCheckbox.type = 'checkbox';
antiClownToggleCheckbox.checked = true;
antiClownToggleLabel.prepend(antiClownToggleCheckbox);
controlPanel.appendChild(antiClownToggleLabel);
const antiBanToggleLabel = document.createElement('label');
antiBanToggleLabel.textContent = ' Anti-ban feature';
const antiBanToggleCheckbox = document.createElement('input');
antiBanToggleCheckbox.type = 'checkbox';
antiBanToggleLabel.prepend(antiBanToggleCheckbox);
controlPanel.appendChild(antiBanToggleLabel);
const gameStartTimeDisplay = document.createElement('div');
gameStartTimeDisplay.textContent = 'Start Time: Not started';
gameStartTimeDisplay.style.color = 'white';
gameStartTimeDisplay.style.fontFamily = 'Arial, sans-serif';
controlPanel.appendChild(gameStartTimeDisplay);
const startButton = document.createElement('button');
startButton.textContent = 'Start';
startButton.style.marginTop = '10px';
controlPanel.appendChild(startButton);
const stopButton = document.createElement('button');
stopButton.textContent = 'Stop';
stopButton.style.marginTop = '10px';
stopButton.style.marginLeft = '5px';
controlPanel.appendChild(stopButton);
startButton.addEventListener('click', function() {
startGameTime();
});
stopButton.addEventListener('click', function() {
stopGameTime();
});
function startGameTime() {
gameStartTime = new Date();
if (gameInterval) clearInterval(gameInterval);
gameInterval = setInterval(updateGameTimeDisplay, 1000);
spawnSmartMessage('Started game time tracking.');
}
function stopGameTime() {
if (!gameStartTime) return;
gameEndTime = new Date();
clearInterval(gameInterval);
const elapsedTime = gameEndTime - gameStartTime;
const formattedTime = formatTime(elapsedTime);
spawnSmartMessage(`Played for: ${formattedTime}`);
gameStartTimeDisplay.textContent = `Played for: ${formattedTime}`;
gameStartTime = null;
}
function updateGameTimeDisplay() {
if (!gameStartTime) return;
const elapsedTime = new Date() - gameStartTime;
const formattedTime = formatTime(elapsedTime);
gameStartTimeDisplay.textContent = `Start Time: ${formattedTime}`;
}
function formatTime(ms) {
const seconds = Math.floor(ms / 1000);
const hours = Math.floor(seconds / 3600);
const minutes = Math.floor((seconds % 3600) / 60);
const remainingSeconds = seconds % 60;
return `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${remainingSeconds.toString().padStart(2, '0')}`;
}
const fpsDiv = document.createElement('div');
fpsDiv.style.position = 'fixed';
fpsDiv.style.top = '50px';
fpsDiv.style.right = '10px';
fpsDiv.style.color = 'white';
fpsDiv.style.backgroundColor = 'rgba(0, 0, 0, 0.5)';
fpsDiv.style.padding = '5px';
fpsDiv.style.fontFamily = 'Arial, sans-serif';
fpsDiv.style.zIndex = '1000';
document.body.appendChild(fpsDiv);
let lastFrameTime = performance.now();
let frameCount = 0;
let fps = 0;
function updateFPS() {
if (!fpsToggleCheckbox.checked) {
fpsDiv.style.display = 'none';
requestAnimationFrame(updateFPS);
return;
}
fpsDiv.style.display = 'block';
const now = performance.now();
frameCount++;
const delta = now - lastFrameTime;
if (delta >= 1000) {
fps = (frameCount / delta) * 1000;
frameCount = 0;
lastFrameTime = now;
fpsDiv.textContent = `FPS: ${fps.toFixed(2)}`;
}
requestAnimationFrame(updateFPS);
}
updateFPS();
const timeDiv = document.createElement('div');
timeDiv.style.position = 'fixed';
timeDiv.style.bottom = '10px';
timeDiv.style.right = '10px';
timeDiv.style.color = 'white';
timeDiv.style.backgroundColor = 'rgba(0, 0, 0, 0.5)';
timeDiv.style.padding = '5px';
timeDiv.style.fontFamily = 'Arial, sans-serif';
timeDiv.style.zIndex = '1000';
document.body.appendChild(timeDiv);
function updateTime() {
const now = new Date();
const options = {
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
hour12: false,
timeZone: timezoneSelect.value,
timeZoneName: 'short'
};
const formattedTime = new Intl.DateTimeFormat('en-US', options).format(now);
timeDiv.textContent = `Time: ${formattedTime}`;
setTimeout(updateTime, 1000);
}
updateTime();
document.addEventListener('keydown', function(event) {
if (event.key === 'F1') {
event.preventDefault();
controlPanel.style.display = controlPanel.style.display === 'none' ? 'block' : 'none';
}
});
document.addEventListener('keydown', function(event) {
if (event.key === 'F5') {
event.preventDefault();
soundControlDiv.style.display = soundControlDiv.style.display === 'none' ? 'block' : 'none';
}
});
let isDragging = false;
let dragStartX, dragStartY;
controlPanel.addEventListener('mousedown', function(event) {
isDragging = true;
dragStartX = event.clientX - controlPanel.offsetLeft;
dragStartY = event.clientY - controlPanel.offsetTop;
controlPanel.style.cursor = 'move';
});
document.addEventListener('mousemove', function(event) {
if (isDragging) {
controlPanel.style.left = `${event.clientX - dragStartX}px`;
controlPanel.style.top = `${event.clientY - dragStartY}px`;
}
});
document.addEventListener('mouseup', function() {
isDragging = false;
controlPanel.style.cursor = 'default';
});
function checkForBan() {
const playerActivities = getPlayerActivities();
const isBanned = detectSuspiciousActivity(playerActivities);
if (isBanned) {
alert('Warning: Potential ban activity detected!');
}
}
function getPlayerActivities() {
return {
actionsPerMinute: Math.floor(Math.random() * 100),
unusualPatterns: Math.random() < 0.1
};
}
function detectSuspiciousActivity(activities) {
return activities.actionsPerMinute > 80 || activities.unusualPatterns;
}
setInterval(() => {
if (antiBanToggleCheckbox.checked) {
checkForBan();
}
}, 5000);
function checkForClown() {
const isClownDetected = false;
if (isClownDetected) {
alert('Warning: Clown detected!');
}
}
setInterval(() => {
if (antiClownToggleCheckbox.checked) {
checkForClown();
}
}, 5000);
const soundControlDiv = document.createElement('div');
soundControlDiv.style.position = 'fixed';
soundControlDiv.style.bottom = '10px';
soundControlDiv.style.left = '10px';
soundControlDiv.style.color = 'white';
soundControlDiv.style.backgroundColor = 'rgba(0, 0, 0, 0.5)';
soundControlDiv.style.padding = '5px';
soundControlDiv.style.fontFamily = 'Arial, sans-serif';
soundControlDiv.style.zIndex = '1000';
soundControlDiv.style.display = 'none';
document.body.appendChild(soundControlDiv);
const soundUrlInput = document.createElement('input');
soundUrlInput.type = 'text';
soundUrlInput.placeholder = 'Enter sound URL';
soundControlDiv.appendChild(soundUrlInput);
const soundFileInput = document.createElement('input');
soundFileInput.type = 'file';
soundFileInput.accept = 'audio/*';
soundControlDiv.appendChild(soundFileInput);
const soundPlayButton = document.createElement('button');
soundPlayButton.textContent = 'Play';
soundControlDiv.appendChild(soundPlayButton);
const soundPauseButton = document.createElement('button');
soundPauseButton.textContent = 'Pause';
soundControlDiv.appendChild(soundPauseButton);
const soundRepeatButton = document.createElement('button');
soundRepeatButton.textContent = 'Repeat';
soundControlDiv.appendChild(soundRepeatButton);
const soundPlaylistDiv = document.createElement('div');
soundPlaylistDiv.style.marginTop = '10px';
soundControlDiv.appendChild(soundPlaylistDiv);
const audio = new Audio();
let isRepeating = false;
const playedFiles = [];
soundPlayButton.addEventListener('click', () => {
if (soundUrlInput.value) {
audio.src = soundUrlInput.value;
audio.play();
addToPlayedFiles(soundUrlInput.value);
} else if (soundFileInput.files.length > 0) {
const file = soundFileInput.files[0];
const fileURL = URL.createObjectURL(file);
audio.src = fileURL;
audio.play();
addToPlayedFiles(file.name);
}
});
soundPauseButton.addEventListener('click', () => {
audio.pause();
});
soundRepeatButton.addEventListener('click', () => {
isRepeating = !isRepeating;
soundRepeatButton.style.backgroundColor = isRepeating ? 'green' : '';
audio.loop = isRepeating;
});
function addToPlayedFiles(file) {
if (!playedFiles.includes(file)) {
playedFiles.push(file);
updatePlayedFiles();
}
}
function updatePlayedFiles() {
soundPlaylistDiv.innerHTML = '';
playedFiles.forEach(file => {
const fileButton = document.createElement('button');
fileButton.textContent = file;
fileButton.addEventListener('click', () => {
if (file.startsWith('http')) {
audio.src = file;
} else {
audio.src = URL.createObjectURL(new File([], file));
}
audio.play();
});
soundPlaylistDiv.appendChild(fileButton);
});
}
function applyRainbowColors(element) {
const colors = [
'red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet'
];
element.style.backgroundImage = `linear-gradient(135deg, ${colors.join(', ')})`;
}
applyRainbowColors(controlPanel);
document.addEventListener('click', function(event) {
const clickEffect = document.createElement('div');
clickEffect.style.position = 'absolute';
clickEffect.style.width = '20px';
clickEffect.style.height = '20px';
clickEffect.style.backgroundColor = 'transparent';
clickEffect.style.borderRadius = '50%';
clickEffect.style.pointerEvents = 'none';
clickEffect.style.border = '2px solid white';
clickEffect.style.boxShadow = '0 0 10px rgba(255, 255, 255, 0.5)';
clickEffect.style.top = `${event.clientY - 10}px`;
clickEffect.style.left = `${event.clientX - 10}px`;
document.body.appendChild(clickEffect);
setTimeout(() => {
clickEffect.remove();
}, 500);
applyRainbowColors(clickEffect);
});
function spawnSmartMessage(message) {
const messageDiv = document.createElement('div');
messageDiv.textContent = message;
messageDiv.style.position = 'fixed';
messageDiv.style.bottom = '50%';
messageDiv.style.left = '50%';
messageDiv.style.transform = 'translate(-50%, -50%)';
messageDiv.style.color = 'white';
messageDiv.style.backgroundColor = 'rgba(0, 0, 0, 0.8)';
messageDiv.style.padding = '10px';
messageDiv.style.borderRadius = '5px';
messageDiv.style.fontFamily = 'Arial, sans-serif';
messageDiv.style.zIndex = '1000';
document.body.appendChild(messageDiv);
setTimeout(() => {
messageDiv.remove();
}, 3000);
}
function handleChatMessage(event) {
const message = event.data;
if (message.startsWith('!spam')) {
const textToSpam = message.replace('!spam', '').trim();
spamContinuousMessages(textToSpam);
}
}
function spamContinuousMessages(text) {
spawnSmartMessage(text);
setTimeout(() => {
spamContinuousMessages(text);
}, 5000);
}
window.addEventListener('message', handleChatMessage);
const jsonControlDiv = document.createElement('div');
jsonControlDiv.style.position = 'fixed';
jsonControlDiv.style.bottom = '10px';
jsonControlDiv.style.right = '10px';
jsonControlDiv.style.color = 'white';
jsonControlDiv.style.backgroundColor = 'rgba(0, 0, 0, 0.5)';
jsonControlDiv.style.padding = '5px';
jsonControlDiv.style.fontFamily = 'Arial, sans-serif';
jsonControlDiv.style.zIndex = '1000';
jsonControlDiv.style.display = 'none';
document.body.appendChild(jsonControlDiv);
const jsonFileInput = document.createElement('input');
jsonFileInput.type = 'file';
jsonFileInput.accept = 'application/json';
jsonControlDiv.appendChild(jsonFileInput);
const jsonLoadButton = document.createElement('button');
jsonLoadButton.textContent = 'Load JSON';
jsonControlDiv.appendChild(jsonLoadButton);
const jsonSaveButton = document.createElement('button');
jsonSaveButton.textContent = 'Save JSON';
jsonControlDiv.appendChild(jsonSaveButton);
const jsonDeleteButton = document.createElement('button');
jsonDeleteButton.textContent = 'Delete JSON';
jsonControlDiv.appendChild(jsonDeleteButton);
let currentConfig = {};
jsonLoadButton.addEventListener('click', () => {
const file = jsonFileInput.files[0];
if (file) {
const reader = new FileReader();
reader.onload = (event) => {
try {
currentConfig = JSON.parse(event.target.result);
applyConfig(currentConfig);
spawnSmartMessage('JSON loaded successfully');
} catch (error) {
spawnSmartMessage('Error loading JSON');
}
};
reader.readAsText(file);
}
});
jsonSaveButton.addEventListener('click', () => {
const json = JSON.stringify(currentConfig, null, 2);
const blob = new Blob([json], { type: 'application/json' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = 'config.json';
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
spawnSmartMessage('JSON saved successfully');
});
jsonDeleteButton.addEventListener('click', () => {
currentConfig = {};
spawnSmartMessage('JSON deleted successfully');
});
function applyConfig(config) {
if (config.fpsEnabled !== undefined) {
fpsToggleCheckbox.checked = config.fpsEnabled;
}
if (config.antiClownEnabled !== undefined) {
antiClownToggleCheckbox.checked = config.antiClownEnabled;
}
if (config.antiBanEnabled !== undefined) {
antiBanToggleCheckbox.checked = config.antiBanEnabled;
}
}
})();