melon client || bloxd.io cheats

like steroids for bloxd.io

当前为 2024-12-20 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         melon client || bloxd.io cheats
// @namespace    http://bloxd.io
// @version      2024-12-20
// @description  like steroids for bloxd.io
// @author       officiallymelon
// @match        https://bloxd.io/
// @icon         https://github.com/OfficiallyMelon/files-cdn/blob/main/bloxd_io/melon.png?raw=true
// @grant        none
// @run-at       document-start
// @license GPL-3.0-or-later
// ==/UserScript==

(function() {
    (() => {
        const img = document.createElement('img');
        img.src = 'https://github.com/OfficiallyMelon/files-cdn/blob/main/Credits.png?raw=true';
        img.style.position = 'fixed';
        img.style.bottom = '10px';
        img.style.right = '10px';
        img.style.width = '350px';
        img.style.height = 'auto';
        img.style.zIndex = '10000';
        document.body.appendChild(img);
    })();

    const loadGoogleFont = (fontName) => {
        const link = document.createElement('link');
        link.href = `https://fonts.googleapis.com/css2?family=${fontName.replace(/ /g, '+')}`;
        link.rel = 'stylesheet';
        document.head.appendChild(link);
    };
    loadGoogleFont('Roboto');

    const MelonMenu = () => {
        alert('Thank you for using Melon Client (cheats), we require local overrides to be added for this cheat to work, you can find more info on the greasyfork description.')
        const menu = document.createElement('div');
        menu.style.position = 'fixed';
        menu.style.top = '20px';
        menu.style.left = '20px';
        menu.style.width = '500px';
        menu.style.backgroundColor = '#F7B2BD';
        menu.style.border = '2px solid #ffffff';
        menu.style.color = '#ffffff';
        menu.style.fontFamily = "'Roboto', Arial, sans-serif";
        menu.style.fontSize = '14px';
        menu.style.boxShadow = '0 0 10px rgba(0, 0, 0, 0.5)';
        menu.style.borderRadius = '8px';
        menu.style.zIndex = '10000';
        menu.style.padding = '10px';
        menu.style.cursor = 'move';

        const tabs = ['Combat', 'Player', 'Movement'];
        const tabContainer = document.createElement('div');
        tabContainer.style.display = 'flex';
        tabContainer.style.justifyContent = 'space-around';
        tabContainer.style.backgroundColor = '#E34A6F';
        tabContainer.style.padding = '5px';
        tabContainer.style.borderRadius = '5px 5px 0 0';
        tabContainer.style.marginBottom = '10px';

        tabs.forEach((tab) => {
            const tabElement = document.createElement('div');
            tabElement.textContent = tab;
            tabElement.style.color = '#ffffff';
            tabElement.style.cursor = 'pointer';
            tabElement.style.padding = '5px 10px';
            tabElement.style.fontWeight = 'bold';
            tabElement.style.borderRadius = '4px';
            tabElement.style.transition = 'background-color 0.3s';
            tabElement.style.fontFamily = "'Roboto', Arial, sans-serif";
            tabContainer.appendChild(tabElement);
        });

        menu.appendChild(tabContainer);

        const columnsContainer = document.createElement('div');
        columnsContainer.style.display = 'flex';
        columnsContainer.style.justifyContent = 'space-between';
        columnsContainer.style.gap = '10px';

        const columnData = [
            ['Anti Knockback', 'Anti Cam Shake', 'Reach', 'Auto Clicker'],
            ['Scaffold', 'Account Gen'],
            ['Speed', 'High Jump', 'Infinite Jump', 'Secure Edge'],
        ];

        const loadButtonStates = () => {
            return JSON.parse(localStorage.getItem('buttonStates') || '{}');
        };

        const saveButtonStates = (states) => {
            localStorage.setItem('buttonStates', JSON.stringify(states));
        };

        const buttonStates = loadButtonStates();
        const buttonsMap = {};

        columnData.forEach((columnItems) => {
            const column = document.createElement('div');
            column.style.flex = '1';
            column.style.backgroundColor = '#F7B2BD';
            column.style.padding = '0px';
            column.style.borderRadius = '0px';

            columnItems.forEach((item) => {
                const itemElement = document.createElement('div');
                itemElement.textContent = item;
                itemElement.style.backgroundColor = buttonStates[item] ? '#4E954F' : '#F7B2BD';
                itemElement.style.margin = '0px 0';
                itemElement.style.padding = '5px';
                itemElement.style.borderRadius = '0px';
                itemElement.style.textAlign = 'center';
                itemElement.style.cursor = 'pointer';
                itemElement.style.transition = 'background-color 0.1s';
                itemElement.style.fontFamily = "'Roboto', Arial, sans-serif";

                let isSelected = !!buttonStates[item];

                itemElement.onmouseover = () => {
                    if (!isSelected) itemElement.style.backgroundColor = '#4E954F';
                };
                itemElement.onmouseout = () => {
                    if (!isSelected) itemElement.style.backgroundColor = '#F7B2BD';
                };

                itemElement.onclick = () => {
                    isSelected = !isSelected;
                    itemElement.style.backgroundColor = isSelected ? '#4E954F' : '#F7B2BD';
                    buttonStates[item] = isSelected;
                    saveButtonStates(buttonStates);

                    // Apply the button actions based on saved state
                    if (item === 'Account Gen') {
                        document.cookie.split(';').forEach((cookie) => {
                            if (cookie.trim().startsWith('___Secure-3PSIDMC=')) {
                                document.cookie = cookie.split('=')[0] + '=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/';
                            }
                        });
                        location.reload();
                    }
                    if (item === 'Speed') {
                        window.GlobalSpeed = isSelected ? 7.5 : 5;
                    }
                    if (item === 'Infinite Jump') {
                        window.AirJump = isSelected ? 999999999999 : 0;
                    }
                    if (item === 'High Jump') {
                        window.JumpAmount = isSelected ? 3 : 0;
                    }
                    if (item === 'Reach') {
                        window.reach = isSelected ? 25 : 1;
                    }
                    if (item === 'Scaffold') {
                        window.scaffold = isSelected ? true : false;
                    }
                    if (item == 'Anti Knockback') {
                        window.antiknock = isSelected ? true : false;
                    }
                    if (item == 'Anti Cam Shake') {
                        window.camshake = isSelected ? true : false;
                    }
                    if (item == 'Secure Edge') {
                        window.preventfalloff = isSelected ? true : false;
                    }
                    if (item == 'Auto Clicker') {
                        window.autoclick = isSelected ? true : false
                    }
                };

                column.appendChild(itemElement);
                buttonsMap[item] = itemElement;

                // Apply initial button state to global variables when the page loads
                if (buttonStates[item]) {
                    itemElement.click();
                }
            });

            columnsContainer.appendChild(column);
        });

        menu.appendChild(columnsContainer);

        let isDragging = false;
        let offsetX, offsetY;

        menu.addEventListener('mousedown', (e) => {
            isDragging = true;
            offsetX = e.clientX - menu.offsetLeft;
            offsetY = e.clientY - menu.offsetTop;
            menu.style.transition = 'none';
        });

        document.addEventListener('mousemove', (e) => {
            if (isDragging) {
                menu.style.left = `${e.clientX - offsetX}px`;
                menu.style.top = `${e.clientY - offsetY}px`;
            }
        });

        document.addEventListener('mouseup', () => {
            isDragging = false;
        });

        document.body.appendChild(menu);

        document.addEventListener('keydown', (e) => {
            if (e.ctrlKey && e.key.toLowerCase() === 'c') {
                const scaffoldButton = buttonsMap['Scaffold'];
                if (scaffoldButton) {
                    scaffoldButton.click();
                }
            }
        });
    };
    MelonMenu();
})();