Steroids for bloxd.io
当前为
// ==UserScript==
// @name Click Boost for Bloxd.io (With UI & Account Creator)
// @namespace https://bloxd.io
// @version 1.0.2
// @description Steroids for bloxd.io
// @author MakeItOrBreakIt
// @match https://staging.bloxd.io/*
// @license MIT
// @grant none
// ==/UserScript==
(function() {
const LEFT_CLICK_TOGGLE_KEY = 'KeyR'; // Press 'R' for Left Click
const RIGHT_CLICK_TOGGLE_KEY = 'KeyF'; // Press 'F' for Right Click
let minCPS = 10, maxCPS = 15;
const TARGET_SELECTOR = "#noa-canvas";
let autoLeftClickEnabled = false;
let autoRightClickEnabled = false;
let autoLeftClickInterval;
let autoRightClickInterval;
console.log("Click Boost loaded. Press 'R' for Left Click, 'F' for Right Click.");
function randomInterval() {
return 1000 / (Math.random() * (maxCPS - minCPS) + minCPS);
}
function toggleAutoLeftClick() {
if (autoRightClickEnabled) stopRightClicker();
autoLeftClickEnabled ? stopLeftClicker() : startLeftClicker();
}
function startLeftClicker() {
autoLeftClickEnabled = true;
console.log("Left Click Boost ENABLED");
autoLeftClickInterval = setInterval(() => simulateClick(0), randomInterval());
}
function stopLeftClicker() {
clearInterval(autoLeftClickInterval);
autoLeftClickEnabled = false;
console.log("Left Click Boost DISABLED");
}
function toggleAutoRightClick() {
if (autoLeftClickEnabled) stopLeftClicker();
autoRightClickEnabled ? stopRightClicker() : startRightClicker();
}
function startRightClicker() {
autoRightClickEnabled = true;
console.log("Right Click Boost ENABLED");
autoRightClickInterval = setInterval(() => simulateClick(2), randomInterval());
}
function stopRightClicker() {
clearInterval(autoRightClickInterval);
autoRightClickEnabled = false;
console.log("Right Click Boost DISABLED");
}
function simulateClick(button) {
let element = document.querySelector(TARGET_SELECTOR);
if (!element) return;
element.dispatchEvent(new MouseEvent("mousedown", { button, bubbles: true, cancelable: true, view: window }));
element.dispatchEvent(new MouseEvent("mouseup", { button, bubbles: true, cancelable: true, view: window }));
if (button === 0) element.dispatchEvent(new MouseEvent("click", { button, bubbles: true, cancelable: true, view: window }));
if (button === 2) element.dispatchEvent(new MouseEvent("contextmenu", { button, bubbles: true, cancelable: true, view: window }));
}
function createPopupUI() {
// Open a new popup window
let popup = window.open("", "ClickBoostPopup", "width=300,height=350,top=100,left=100");
if (!popup) {
console.error("Popup could not be opened.");
return;
}
popup.document.body.style.fontFamily = "Arial, sans-serif";
popup.document.body.style.padding = "10px";
popup.document.body.style.backgroundColor = "#222";
popup.document.body.style.color = "white";
popup.document.body.innerHTML = `
<h3 style="color: #ffcc00; text-align: center;">Click Boost</h3>
<button id="leftClickToggle">Left Click Boost</button><br>
<button id="rightClickToggle">Right Click Boost</button><br><br>
<label>Min CPS: <input type="number" id="minCPS" value="10" min="1" max="50"></label><br>
<label>Max CPS: <input type="number" id="maxCPS" value="15" min="1" max="50"></label><br>
<input type="range" id="cpsSlider" min="1" max="50" value="15" style="width: 100%;"><br><br>
`;
// Setup actions for the popup UI elements
popup.document.getElementById("leftClickToggle").onclick = toggleAutoLeftClick;
popup.document.getElementById("rightClickToggle").onclick = toggleAutoRightClick;
popup.document.getElementById("minCPS").onchange = (e) => minCPS = parseInt(e.target.value);
popup.document.getElementById("maxCPS").onchange = (e) => maxCPS = parseInt(e.target.value);
popup.document.getElementById("cpsSlider").oninput = (e) => {
maxCPS = parseInt(e.target.value);
popup.document.getElementById("maxCPS").value = maxCPS;
};
}
// Create popup UI when the script runs
createPopupUI();
// Keybind for Left Click
window.addEventListener("keydown", (event) => {
if (event.code === LEFT_CLICK_TOGGLE_KEY) {
toggleAutoLeftClick();
}
});
// Keybind for Right Click
window.addEventListener("keydown", (event) => {
if (event.code === RIGHT_CLICK_TOGGLE_KEY) {
toggleAutoRightClick();
}
});
})();