god mode, instant kill, inf kills and coins, ect
// ==UserScript==
// @name OpenSource BrutalMania
// @namespace http://tampermonkey.net/
// @version 25.1
// @description god mode, instant kill, inf kills and coins, ect
// @author You
// @match *://brutalmania.io/*
// @grant none
// @run-at document-idle
// ==/UserScript==
(function() {
'use strict';
const Config = {
godMode: false,
superSpeed: false,
instantKill: false,
bringBots: false,
scatterBots: false,
orbMultiplier: 1,
safeMaxHP: 99999,
infiniteValue: 99999
};
setInterval(() => {
if (typeof cr_getC2Runtime !== 'function' || !cr_getC2Runtime()) return;
const runtime = cr_getC2Runtime();
if (Config.instantKill) {
runtime.timescale = 3.0;
} else {
runtime.timescale = 1.0;
}
// 1. ISOLATED PLAYER SCAN (Runs first and separately to prevent bot-to-bot snapping)
let truePlayerX = 0;
let truePlayerY = 0;
try {
if (runtime.types["t5"] && runtime.types["t5"].instances.length > 0) {
let p = runtime.types["t5"].instances[0];
if (p && p.x !== 0 && p.y !== 0) {
truePlayerX = p.x;
truePlayerY = p.y;
}
}
// Strict verification check if tracking using shared structures
if (truePlayerX === 0 && runtime.types["t11"]) {
for (let i = 0; i < runtime.types["t11"].instances.length; i++) {
let p = runtime.types["t11"].instances[i];
if (p.instance_vars && p.instance_vars[13] !== "aggressive") {
truePlayerX = p.x;
truePlayerY = p.y;
if (Config.godMode) {
p.instance_vars[5] = Config.safeMaxHP;
p.instance_vars[7] = Config.safeMaxHP;
p.instance_vars[8] = Config.safeMaxHP;
}
break; // Stop immediately once the true player identity is locked
}
}
}
} catch(e) {}
// 2. DEPENDENT BOT LOOP (Only executes relative to isolated player coordinates)
try {
["t11", "t152"].forEach(type => {
if (runtime.types[type]) {
runtime.types[type].instances.forEach(inst => {
if (!inst.instance_vars) return;
const isBot = inst.instance_vars[13] === "aggressive";
if (isBot) {
// FIXED ATTACK REMOVAL: Wipes weapon actions, aggressive target locks, and swing animations instantly
if (Config.godMode) {
if (inst.instance_vars[10] !== undefined) inst.instance_vars[10] = 0; // Resets attack status flags
if (inst.instance_vars[11] !== undefined) inst.instance_vars[11] = 0; // Clears active combat tracking vectors
if (inst.instance_vars[12] !== undefined) inst.instance_vars[12] = 0; // Resets targeting focus indices
if (inst.instance_vars[14] !== undefined) inst.instance_vars[14] = 0; // Forces permanent swing cooldown time
}
// FIXED POSITION FORCING: No tracking shortcuts, snaps exclusively to verified player location
if (Config.bringBots && truePlayerX !== 0 && truePlayerY !== 0) {
inst.x = truePlayerX + (Math.random() * 10 - 5);
inst.y = truePlayerY + (Math.random() * 10 - 5);
inst.set_bbox_changed();
}
if (Config.scatterBots) {
inst.x += (Math.random() * 400 - 200);
inst.y += (Math.random() * 400 - 200);
inst.set_bbox_changed();
}
}
});
}
});
} catch(e) {}
if (Config.superSpeed && runtime.types["t15"]) {
try {
runtime.types["t15"].instances.forEach(i => {
i.instance_vars[0] = 9999;
i.instance_vars[1] = 9999;
});
} catch(e) {}
}
}, 30);
setInterval(() => {
if (typeof cr_getC2Runtime !== 'function' || !cr_getC2Runtime()) return;
const runtime = cr_getC2Runtime();
try {
for (let key in runtime.types) {
if (key.toLowerCase().includes("orb") || key === "t10") {
let type = runtime.types[key];
if (type.instances) {
type.instances.forEach(orb => {
if (orb.instance_vars && orb.instance_vars[0] !== undefined) {
if (!orb.scaled_flag) {
orb.instance_vars[0] *= Config.orbMultiplier;
orb.scaled_flag = true;
}
}
});
}
}
}
} catch(e) {}
}, 1000);
var checkExist = setInterval(function() {
if (typeof cr_getC2Runtime === 'function' && cr_getC2Runtime()) {
clearInterval(checkExist);
initInterface();
}
}, 1000);
function initInterface() {
const panel = document.createElement('div');
panel.style = `
position: fixed; top: 12px; left: 12px; z-index: 1000000;
background: rgba(14, 14, 18, 0.96); color: #f3f4f6; padding: 10px;
border-radius: 8px; font-family: system-ui, sans-serif;
border: 1px solid #00ffcc; width: 230px; box-shadow: 0 10px 20px rgba(0,0,0,0.5);
`;
panel.innerHTML = `
<div style="display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid #27272a; padding-bottom:4px; margin-bottom:8px;">
<span style="font-weight:700; font-size:11px; color:#00ffcc;">OPENSOURCE BRUTALMANIA</span>
<span id="p-close" style="cursor:pointer; color:#71717a; font-weight:bold; font-size:11px;">[HIDE]</span>
</div>
`;
function createInputRow(placeholder, btnText, color, onAction) {
const row = document.createElement('div');
row.style = "display: flex; gap: 4px; margin-bottom: 6px;";
row.innerHTML = `
<input type="number" placeholder="${placeholder}" style="width: 55%; background:#18181b; color:#fff; border:1px solid #27272a; padding:4px 6px; font-size:11px; border-radius:4px;">
<button style="width: 45%; background:${color}; color:#fff; border:none; padding:4px 6px; border-radius:4px; font-size:10px; font-weight:600; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;">${btnText}</button>
`;
row.querySelector('button').onclick = () => {
const val = parseInt(row.querySelector('input').value);
onAction(isNaN(val) ? null : val);
};
panel.appendChild(row);
}
function createToggle(label, configKey, activeBg) {
const btn = document.createElement('button');
btn.style = `width:100%; padding:6px; margin:2px 0; background:#18181b; color:#d1d5db; border:1px solid #27272a; border-radius:4px; cursor:pointer; font-size:11px; text-align:left;`;
const updateVisual = () => {
btn.innerHTML = `<span style="color:${Config[configKey] ? '#00ffcc' : '#71717a'}; margin-right:5px;">${Config[configKey] ? '●' : '○'}</span> ${label}`;
btn.style.background = Config[configKey] ? activeBg : "#18181b";
btn.style.color = Config[configKey] ? "#fff" : "#d1d5db";
};
btn.onclick = () => {
Config[configKey] = !Config[configKey];
updateVisual();
};
updateVisual();
panel.appendChild(btn);
}
function createOrbSelector() {
const row = document.createElement('div');
row.style = "display: flex; align-items: center; justify-content: space-between; margin: 4px 0; background:#18181b; border:1px solid #27272a; border-radius:4px; padding: 4px 6px;";
row.innerHTML = `
<span style="font-size:11px; color:#d1d5db;">Orb Spawn Rate</span>
<select style="background:#111; color:#00ffcc; border:1px solid #27272a; font-size:11px; border-radius:4px; cursor:pointer;">
<option value="1">1x</option>
<option value="2">2x</option>
<option value="3">3x</option>
<option value="4">4x</option>
<option value="5">5x</option>
</select>
`;
row.querySelector('select').onchange = (e) => {
Config.orbMultiplier = parseInt(e.target.value);
};
panel.appendChild(row);
}
createInputRow("Coins...", "Set Coins", "#0f766e", (val) => {
const targetVal = val !== null ? val : Config.infiniteValue;
const runtime = cr_getC2Runtime();
for (let key in runtime.types) {
if (runtime.types[key].instances) {
runtime.types[key].instances.forEach(i => {
if (i.instance_vars) {
i.instance_vars.forEach((cv, idx) => {
if (idx === 3 && (key === "t111" || key === "t101")) i.instance_vars[idx] = targetVal;
});
}
});
}
}
});
createInputRow("Kills...", "Set Kills", "#1e3a8a", (val) => {
if (val === null) return;
try {
cr_getC2Runtime().types["t111"].instances.forEach(i => {
if (i.instance_vars) { i.instance_vars[8] = val; i.instance_vars[9] = val; }
});
} catch(e) {}
});
createInputRow("Score...", "Set Score", "#b45309", (val) => {
if (val === null) return;
try {
const runtime = cr_getC2Runtime();
if (runtime.types["t5"]) {
runtime.types["t5"].instances.forEach(p => {
if (p.instance_vars) p.instance_vars[1] = val;
});
}
} catch(e) {}
});
createToggle("Bring Bots", "bringBots", "#15803d");
createToggle("Scatter Bots", "scatterBots", "#a21caf");
createToggle("God Mode", "godMode", "#065f46");
createToggle("Instant Kill", "superSpeed", "#1e40af");
createToggle("Max Speed", "instantKill", "#b45309");
createOrbSelector();
document.body.appendChild(panel);
document.getElementById('p-close').onclick = () => {
panel.style.display = 'none';
const openTab = document.createElement('div');
openTab.innerText = "⚙️ OS Menu";
openTab.style = "position:fixed; top:12px; left:12px; z-index:1000000; background:#111116; color:#00ffcc; padding:6px 10px; border-radius:6px; border:1px solid #27272a; cursor:pointer; font-size:11px; font-weight:600;";
openTab.onclick = () => { panel.style.display = 'block'; openTab.remove(); };
document.body.appendChild(openTab);
};
}
})();