like steroids for bloxd.io
目前為
// ==UserScript==
// @name melon client || bloxd.io cheats
// @namespace http://bloxd.io
// @version 2024-12-27
// @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==
const devmode = false;
(function () {
if (!devmode) {
'use strict';
const loggedScripts = new Set();
function extractPrefix(filename) {
const prefix = filename.split('.')[0];
return prefix;
}
function extractFilename(url) {
const urlObject = new URL(url);
const path = urlObject.pathname;
const filename = path.substring(path.lastIndexOf('/') + 1);
return filename;
}
function checkGitHubPrefix(prefix) {
fetch('https://api.github.com/repos/OfficiallyMelon/files-cdn/contents/bloxd_io/bloxd.io/static/js')
.then(response => response.json())
.then(data => {
let foundPrefix = false;
data.forEach(item => {
const filename = item.name;
if (filename.startsWith(prefix)) {
foundPrefix = true;
}
});
if (!foundPrefix) {
alert('Script Down: Please wait for an update!')
}
})
.catch(error => console.error('Error fetching data from GitHub API:', error));
}
function logBloxdScripts() {
const scripts = document.querySelectorAll('script[src]');
scripts.forEach((script) => {
if (
script.src.includes('bloxd.io') &&
!loggedScripts.has(script.src)
) {
loggedScripts.add(script.src);
const filename = extractFilename(script.src);
const prefix = extractPrefix(filename);
console.log('Bloxd.io script prefix:', prefix);
checkGitHubPrefix(prefix);
}
});
}
const observer = new MutationObserver((mutations) => {
mutations.forEach((mutation) => {
if (mutation.type === 'childList') {
mutation.addedNodes.forEach((node) => {
if (node.tagName === 'SCRIPT' && node.src.includes('bloxd.io')) {
logBloxdScripts();
}
});
}
});
});
observer.observe(document.body, { childList: true, subtree: true });
function waitForFirstScript() {
const firstScript = document.querySelector('script[src]');
if (firstScript) {
console.log('First script found:', firstScript.src);
logBloxdScripts();
} else {
setTimeout(waitForFirstScript, 500);
}
}
waitForFirstScript();
}
})();
(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', 'Infinite Jump'],
];
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);
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;
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(); // made by melon || update soon (:
})();