Advanced Sploop.io Enhancements 2024

Very useful(FPS, Real time, help anti-clown 35%(beta), smart messages, playtime tracking, music control with repeat and click effects, JSON import)

目前為 2024-06-21 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Advanced Sploop.io Enhancements 2024
// @namespace    http://tampermonkey.net/
// @version      0.5
// @description  Very useful(FPS, Real time, help anti-clown 35%(beta), smart messages, playtime tracking, music control with repeat and click effects, JSON import)
// @author       avoidFPS
// @match        *://sploop.io/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    function showSuccessMessage() {
        spawnSmartMessage('Script tải thành công!');
    }

    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'
    ];
    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 = ' Hiển thị 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 = ' Tính năng Anti-clown';
    const antiClownToggleCheckbox = document.createElement('input');
    antiClownToggleCheckbox.type = 'checkbox';
    antiClownToggleCheckbox.checked = true;
    antiClownToggleLabel.prepend(antiClownToggleCheckbox);
    controlPanel.appendChild(antiClownToggleLabel);


    const gameStartTimeDisplay = document.createElement('div');
    gameStartTimeDisplay.textContent = 'Thời gian bắt đầu: Chưa có';
    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('Bắt đầu tính thời gian chơi.');
    }


    function stopGameTime() {
        if (!gameStartTime) return;

        gameEndTime = new Date();
        clearInterval(gameInterval);
        const elapsedTime = gameEndTime - gameStartTime;
        const formattedTime = formatTime(elapsedTime);
        spawnSmartMessage(`Đã chơi trong khoảng: ${formattedTime}`);
        gameStartTimeDisplay.textContent = `Đã chơi trong khoảng: ${formattedTime}`;
        gameStartTime = null;
    }


    function updateGameTimeDisplay() {
        if (!gameStartTime) return;

        const elapsedTime = new Date() - gameStartTime;
        const formattedTime = formatTime(elapsedTime);
        gameStartTimeDisplay.textContent = `Thời gian bắt đầu: ${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 isBanned = false;

        if (isBanned) {
            alert('Warning: Potential ban activity detected!');
        }
    }

    setInterval(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 audio = new Audio();

    soundPlayButton.addEventListener('click', () => {
        if (soundUrlInput.value) {
            audio.src = soundUrlInput.value;
            audio.play();
        } else if (soundFileInput.files.length > 0) {
            const file = soundFileInput.files[0];
            const fileURL = URL.createObjectURL(file);
            audio.src = fileURL;
            audio.play();
        }
    });

    soundPauseButton.addEventListener('click', () => {
        audio.pause();
    });

    soundRepeatButton.addEventListener('click', () => {
        audio.loop = !audio.loop;
        soundRepeatButton.style.backgroundColor = audio.loop ? 'green' : '';
    });


    function applyRainbowColors(element) {
        const colors = [
            'red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet'
        ];
        element.style.backgroundImage = `linear-gradient(135deg, ${colors.join(', ')})`;
    }

    applyRainbowColors(controlPanel);


    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('!spawn')) {
            const itemsToSpawn = message.replace('!spawn', '').trim();
            spawnContinuousMessages(itemsToSpawn);
        }
    }


    function spawnContinuousMessages(items) {
        const itemArray = items.split(',');

        itemArray.forEach(item => {
            spawnSmartMessage(`Spawning: ${item}`);
        });

        setTimeout(() => {
            spawnContinuousMessages(items);
        }, 5000);
    }


    window.addEventListener('message', handleChatMessage);


    document.addEventListener('click', (event) => {
        const clickEffect = document.createElement('div');
        clickEffect.style.position = 'absolute';
        clickEffect.style.width = '10px';
        clickEffect.style.height = '10px';
        clickEffect.style.backgroundColor = 'white';
        clickEffect.style.borderRadius = '50%';
        clickEffect.style.left = `${event.clientX}px`;
        clickEffect.style.top = `${event.clientY}px`;
        clickEffect.style.pointerEvents = 'none';
        clickEffect.style.zIndex = '1000';
        document.body.appendChild(clickEffect);

        setTimeout(() => {
            clickEffect.style.transform = 'scale(10)';
            clickEffect.style.opacity = '0';
            setTimeout(() => {
                clickEffect.remove();
            }, 300);
        }, 0);
    });


    const jsonFileInput = document.createElement('input');
    jsonFileInput.type = 'file';
    jsonFileInput.accept = 'application/json';
    jsonFileInput.style.marginTop = '10px';
    controlPanel.appendChild(jsonFileInput);

    jsonFileInput.addEventListener('change', (event) => {
        const file = event.target.files[0];
        if (file) {
            const reader = new FileReader();
            reader.onload = function(e) {
                const jsonData = e.target.result;
                localStorage.setItem('uploadedJson', jsonData);
                alert('JSON file saved. The page will now reload.');
                location.reload();
            };
            reader.readAsText(file);
        }
    });
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址