The only mod you will need for minefun.From hacking to chattranslation or shaders.It has it all along with 2xfps booster.DOWNLOAD NOW!!!!
// ==UserScript==
// @name ZeraMine Hacks
// @description The only mod you will need for minefun.From hacking to chattranslation or shaders.It has it all along with 2xfps booster.DOWNLOAD NOW!!!!
// @version 5.0.0
// @author DiamondGolem(aka zera or pkmn)
// @match https://*.minefun.io/*
// @match *://minefun.io/*
// @grant none
// @namespace https://greasyfork.org/users/1578757
// ==/UserScript==
(() => {
"use strict";
var e = {
679: (e, t, n) => {
n.d(t, {
A: () => r
});
var s = n(601),
o = n.n(s),
i = n(314),
a = n.n(i)()(o());
a.push([e.id, `@font-face {\n font-family: \"Product Sans\";\n src: url(https://fonts.gstatic.com/s/productsans/v19/pxiDypQkot1TnFhsFMOfGShVF9eO.woff2);\n}\n\n:root {
/* Zeraora's Signature Electric Cyan and Yellow */
--ZeraMine-accent-color: linear-gradient(90deg, #00f2ff 0%, #70e1ff 100%);
--zeraora-yellow: linear-gradient(90deg, rgba(112, 225, 255, 1) 0%, rgba(255, 251, 0, 1) 100%);
--zeraora-dark-fur: #2c2c2c;
/* UI Overwrites */
--button-color: rgba(30, 30, 30, 0.9);
--hover-color: rgba(60, 60, 60, 0.9);
--panel-bg: rgba(20, 20, 20, 0.9);
--text-color: #ffffff;
/* Text Sizes */
--header-text-size: 25px;
--button-text-size: 20px;
--setting-text-size: 15px;
}\n\n.gui-panel {\nborder: 1px solid;\nborder-image-source: var(--zeraora-yellow);\nborder-image-slice: 1; \n position: fixed;\n z-index: 1000;\n width: 200px;\n border-radius: 8px;\n background-color: var(--panel-bg);\n box-shadow: 0 4px 8px rgba(0,0,0,0.3);\n font-family: 'Product Sans', sans-serif;\n color: var(--text-color);\n overflow: hidden;\n}\n\n.gui-header {\n background: var(--zeraora-yellow);\n height: 40px;\n font-weight: 900;\ncolor: #000000;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--header-text-size);\n cursor: grab;\nborder-bottom: 2px solid #00f2ff; /* Cyan lightning accent */\n}\n\n.gui-header:active {\n cursor: grabbing;\n}\n\n.gui-button {\n height: 35px;\n display: flex;\n align-items: center;\n padding-left: 10px;\n box-sizing: border-box;\n cursor: pointer;\n border-radius: 0;\n transition: all 0.3s;\n font-size: var(--button-text-size);\n font-weight: 200;\n outline: none;\n background: var(--button-color);\n color: var(--text-color);\n}\n\n.gui-button.enabled {\n background: var(--ZeraMine-accent-color);\nbox-shadow: 0 0 10px rgba(0, 242, 255, 0.5); /* Cyan Glow */\ncolor: #000; /* Makes text pop on the bright cyan */\n}\n\n.gui-button:not(.enabled):hover {\n background: var(--hover-color);\n}\n\n.gui-background {\n position: absolute;\n left: 0;\n top: 0;\n z-index: 999;\n height: 100%;\n width: 100%;\n backdrop-filter: blur(15px);\n background: rgba(0, 0, 0, 0.3);\n}\n\n.gui-setting-container {\n display: flex;\n align-items: center;\n justify-content: space-between;\n background-color: var(--panel-bg);\n padding: 2px;\n}\n\n.gui-setting-label {\n font-size: var(--setting-text-size);\n margin-left: 10px;\n font-weight: 300;\n color: var(--text-color);\n}\n\n.gui-checkbox {\n width: 15px;\n height: 15px;\n border-radius: 4px;\n background: var(--button-color);\n position: relative;\n margin: 8px;\n cursor: pointer;\n transition: background 0.3s;\n}\n\n.gui-checkbox.enabled {\n background: var(--ZeraMine-accent-color);\nbox-shadow: 0 0 10px rgba(0, 242, 255, 0.5);\ncolor: #000;\n}\n\n.gui-color-picker {\n width: 15px;\n height: 15px;\n border-radius: 4px;\n position: relative;\n margin: 8px;\n cursor: pointer;\n}\n\n.gui-color-input {\n width: 20px;\n height: 20px;\n opacity: 0;\n cursor: pointer;\n}\n\n.gui-button-container {\n background-color: var(--panel-bg);\n display: flex;\n flex-direction: column;\n}\n\n.gui-text-input {\n background: var(--button-color);\n border: none;\n color: var(--text-color);\n font-family: 'Product Sans', sans-serif;\n font-size: var(--setting-text-size);\n width: 40px;\n border-radius: 4px;\n outline: none;\n transition: background 0.3s;\n text-align: center;\n margin: 5px;\n margin-right: 10px;\n}\n\n.gui-text-input:hover {\n background: var(--hover-color);\n}\n\n.gui-text-input:focus {\n background: var(--hover-color);\n}\n\n.with-animations .gui-panel {\n animation: fadeInScale 0.3s ease-out;\n}\n\n@keyframes fadeInScale {\n from {\n opacity: 0;\n transform: scale(0.9);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n.with-animations .gui-background {\n animation: fadeIn 0.3s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n.with-animations .gui-button {\n transition: transform 0.2s ease, background 0.2s ease;\n}\n\n.with-animations .gui-button:hover {\n transform: scale(1.01);\n}\n\n.with-animations .gui-setting-container {\n will-change: transform, opacity;\n transform-origin: top;\n animation: slideDown 0.25s ease-out forwards;\n}\n\n@keyframes slideDown {\n from {\n opacity: 0;\n transform: scaleY(0.8);\n }\n to {\n opacity: 1;\n transform: scaleY(1);\n }\n}\n`, ""]);
const r = a
},
314: e => {
e.exports = function(e) {
var t = [];
return t.toString = function() {
return this.map((function(t) {
var n = "",
s = void 0 !== t[5];
return t[4] && (n += "@supports (".concat(t[4], ") {")), t[2] && (n += "@media ".concat(t[2], " {")), s && (n += "@layer".concat(t[5].length > 0 ? " ".concat(t[5]) : "", " {")), n += e(t), s && (n += "}"), t[2] && (n += "}"), t[4] && (n += "}"), n
})).join("")
}, t.i = function(e, n, s, o, i) {
"string" == typeof e && (e = [
[null, e, void 0]
]);
var a = {};
if (s)
for (var r = 0; r < this.length; r++) {
var l = this[r][0];
null != l && (a[l] = !0)
}
for (var d = 0; d < e.length; d++) {
var c = [].concat(e[d]);
s && a[c[0]] || (void 0 !== i && (void 0 === c[5] || (c[1] = "@layer".concat(c[5].length > 0 ? " ".concat(c[5]) : "", " {").concat(c[1], "}")), c[5] = i), n && (c[2] ? (c[1] = "@media ".concat(c[2], " {").concat(c[1], "}"), c[2] = n) : c[2] = n), o && (c[4] ? (c[1] = "@supports (".concat(c[4], ") {").concat(c[1], "}"), c[4] = o) : c[4] = "".concat(o)), t.push(c))
}
}, t
}
},
601: e => {
e.exports = function(e) {
return e[1]
}
},
72: e => {
var t = [];
function n(e) {
for (var n = -1, s = 0; s < t.length; s++)
if (t[s].identifier === e) {
n = s;
break
} return n
}
function s(e, s) {
for (var i = {}, a = [], r = 0; r < e.length; r++) {
var l = e[r],
d = s.base ? l[0] + s.base : l[0],
c = i[d] || 0,
p = "".concat(d, " ").concat(c);
i[d] = c + 1;
var u = n(p),
h = {
css: l[1],
media: l[2],
sourceMap: l[3],
supports: l[4],
layer: l[5]
};
if (-1 !== u) t[u].references++, t[u].updater(h);
else {
var m = o(h, s);
s.byIndex = r, t.splice(r, 0, {
identifier: p,
updater: m,
references: 1
})
}
a.push(p)
}
return a
}
function o(e, t) {
var n = t.domAPI(t);
return n.update(e),
function(t) {
if (t) {
if (t.css === e.css && t.media === e.media && t.sourceMap === e.sourceMap && t.supports === e.supports && t.layer === e.layer) return;
n.update(e = t)
} else n.remove()
}
}
e.exports = function(e, o) {
var i = s(e = e || [], o = o || {});
return function(e) {
e = e || [];
for (var a = 0; a < i.length; a++) {
var r = n(i[a]);
t[r].references--
}
for (var l = s(e, o), d = 0; d < i.length; d++) {
var c = n(i[d]);
0 === t[c].references && (t[c].updater(), t.splice(c, 1))
}
i = l
}
}
},
659: e => {
var t = {};
e.exports = function(e, n) {
var s = function(e) {
if (void 0 === t[e]) {
var n = document.querySelector(e);
if (window.HTMLIFrameElement && n instanceof window.HTMLIFrameElement) try {
n = n.contentDocument.head
} catch (e) {
n = null
}
t[e] = n
}
return t[e]
}(e);
if (!s) throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
s.appendChild(n)
}
},
540: e => {
e.exports = function(e) {
var t = document.createElement("style");
return e.setAttributes(t, e.attributes), e.insert(t, e.options), t
}
},
56: (e, t, n) => {
e.exports = function(e) {
var t = n.nc;
t && e.setAttribute("nonce", t)
}
},
825: e => {
e.exports = function(e) {
if ("undefined" == typeof document) return {
update: function() {},
remove: function() {}
};
var t = e.insertStyleElement(e);
return {
update: function(n) {
! function(e, t, n) {
var s = "";
n.supports && (s += "@supports (".concat(n.supports, ") {")), n.media && (s += "@media ".concat(n.media, " {"));
var o = void 0 !== n.layer;
o && (s += "@layer".concat(n.layer.length > 0 ? " ".concat(n.layer) : "", " {")), s += n.css, o && (s += "}"), n.media && (s += "}"), n.supports && (s += "}");
var i = n.sourceMap;
i && "undefined" != typeof btoa && (s += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i)))), " */")), t.styleTagTransform(s, e, t.options)
}(t, e, n)
},
remove: function() {
! function(e) {
if (null === e.parentNode) return !1;
e.parentNode.removeChild(e)
}(t)
}
}
}
},
113: e => {
e.exports = function(e, t) {
if (t.styleSheet) t.styleSheet.cssText = e;
else {
for (; t.firstChild;) t.removeChild(t.firstChild);
t.appendChild(document.createTextNode(e))
}
}
}
},
t = {};
function n(s) {
var o = t[s];
if (void 0 !== o) return o.exports;
var i = t[s] = {
id: s,
exports: {}
};
return e[s](i, i.exports, n), i.exports
}
n.n = e => {
var t = e && e.__esModule ? () => e.default : () => e;
return n.d(t, {
a: t
}), t
}, n.d = (e, t) => {
for (var s in t) n.o(t, s) && !n.o(e, s) && Object.defineProperty(e, s, {
enumerable: !0,
get: t[s]
})
}, n.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), n.nc = void 0;
const s = {
listeners: {},
activeKeys: new Set,
on: function(e, t) {
this.listeners[e] || (this.listeners[e] = []), this.listeners[e].push(t)
},
remove: function(e, t) {
this.listeners[e] && (this.listeners[e] = this.listeners[e].filter((e => e !== t)))
},
emit: function(e, t) {
this.listeners[e] && this.listeners[e].forEach((e => e(t)))
},
trackKey: function(e, t, n) {
"keydown" === e && moduleManager.handleKeyPress(n), "keydown" !== e || this.activeKeys.has(t) || (this.activeKeys.add(t), this.emit("keyPress", {
key: t,
code: n
})), "keyup" === e && this.activeKeys.has(t) && (this.activeKeys.delete(t), this.emit("keyRelease", {
key: t,
code: n
}))
}
};
class o {
constructor(e, t, n, s) {
this.name = e, this.category = t, this.options = n, this.keybind = s, this.waitingForBind = !1, this.isEnabled = !1, this.toggle = this.toggle.bind(this)
}
onEnable() {}
onDisable() {}
onRender() {}
onSettingUpdate() {}
enable() {
this.isEnabled = !0, s.emit("module.update", this), this.onEnable()
}
disable() {
this.isEnabled = !1, s.emit("module.update", this), this.onDisable()
}
toggle() {
this.isEnabled ? this.disable() : this.enable()
}
}
class i extends o {
constructor() {
super("Arraylist", "Visual"), this.namesMap = {}, this.arraylistContainer = null, this.initialized = !1
}
update(e, t) {
if (t) {
if (!this.namesMap[e]) {
let t = document.createElement("div");
t.style.backgroundColor = "rgba(10, 10, 10, 0.7)", t.style.color = "white", t.style.padding = "2px 10px 2px 10px", t.style.display = "flex", t.style.alignItems = "center", t.style.boxSizing = "border-box", t.style.margin = "0", t.style.fontFamily = "'Product Sans', sans-serif", t.style.boxShadow = "rgb(0, 0, 0, 0.05) -5px 1px", t.style.transition = "max-height 0.2s ease-in-out, opacity 0.2s ease-in-out", t.style.overflow = "hidden", t.style.maxHeight = "0", t.style.opacity = "0";
let n = document.createElement("span");
n.style.fontWeight = "800", n.style.fontSize = "16px", n.style.backgroundImage = "linear-gradient(90deg, #FFFF00, #00FFFF)", n.style.color = "transparent", n.style.backgroundClip = "text", n.innerHTML = e, t.appendChild(n), this.arraylistContainer.appendChild(t), setTimeout((() => {
t.style.maxHeight = "50px", t.style.opacity = "1"
}), 1), this.namesMap[e] = t
}
} else if (this.namesMap[e]) {
const t = this.namesMap[e];
t.style.maxHeight = "0", t.style.opacity = "0", setTimeout((() => {
this.arraylistContainer.removeChild(t), delete this.namesMap[e]
}), 5)
}
const n = Object.values(this.namesMap).sort(((e, t) => this.measureElementWidth(t) - this.measureElementWidth(e)));
this.arraylistContainer.innerHTML = "", n.forEach((e => {
this.arraylistContainer.appendChild(e)
}))
}
onEnable() {
this.initialized ? this.arraylistContainer.style.opacity = "1" : (this.arraylistContainer = document.createElement("div"), this.arraylistContainer.style.flexDirection = "column", this.arraylistContainer.style.position = "absolute", this.arraylistContainer.style.zIndex = "1000", this.arraylistContainer.style.display = "flex", this.arraylistContainer.style.right = "5px", this.arraylistContainer.style.top = "5px", this.arraylistContainer.style.alignItems = "flex-end", this.arraylistContainer.style.pointerEvents = "none", this.arraylistContainer.style.textTransform = "lowercase", this.arraylistContainer.style.border = "2px solid transparent", this.arraylistContainer.style.borderImage = "var(--ZeraMine-accent-color)", this.arraylistContainer.style.borderImageSlice = "1", this.arraylistContainer.style.borderBottom = "0", this.arraylistContainer.style.borderLeft = "0", document.body.appendChild(this.arraylistContainer), s.on("module.update", (e => {
this.update(e.name, e.isEnabled)
})), this.initialized = !0)
}
measureElementWidth(e) {
return e.getBoundingClientRect().width
}
onDisable() {
this.arraylistContainer.style.opacity = "0"
}
}
const a = {
get stores() {
if (this._stores) return this._stores;
{
let e = app._vnode.component.appContext.provides,
t = e[Object.getOwnPropertySymbols(e).find((t => e[t]._s))];
return this._stores = t._s
}
},
get gameWorld() {
return this.stores.get("gameState").gameWorld
}
};
const ZeraExtraStyles = document.createElement("style");
ZeraExtraStyles.textContent = `
/* --- ZeraMine Modular UI Styles --- */
:root {
/* Re-using Zera Core Variables for consistency */
--zera-modal-bg: rgba(20, 20, 20, 0.95);
--zera-modal-border: 1px solid var(--zeraora-yellow);
--zera-input-bg: rgba(30, 30, 30, 0.8);
--zera-input-hover: rgba(50, 50, 50, 0.9);
}
.zera-modal {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 450px;
max-height: 80vh;
background: var(--zera-modal-bg);
border: 1px solid #00f2ff;
box-shadow: 0 0 20px rgba(0, 242, 255, 0.2), 0 10px 30px rgba(0,0,0,0.8);
border-radius: 8px;
z-index: 100000;
display: none; /* Hidden by default */
flex-direction: column;
font-family: 'Product Sans', sans-serif;
backdrop-filter: blur(10px);
overflow: hidden;
}
.zera-modal-header {
height: 40px;
background: var(--zeraora-yellow);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 15px;
color: #000;
font-weight: 900;
font-size: 18px;
border-bottom: 2px solid #00f2ff;
user-select: none;
}
.zera-modal-body {
padding: 20px;
overflow-y: auto;
color: #fff;
display: flex;
flex-direction: column;
gap: 15px;
}
.zera-modal-body::-webkit-scrollbar {
width: 6px;
}
.zera-modal-body::-webkit-scrollbar-thumb {
background: #00f2ff;
border-radius: 3px;
}
.zera-modal-body::-webkit-scrollbar-track {
background: rgba(0,0,0,0.3);
}
.zera-setting-row {
display: flex;
justify-content: space-between;
align-items: center;
}
.zera-label {
font-size: 14px;
color: #ddd;
font-weight: 500;
}
.zera-input, .zera-select {
background: var(--zera-input-bg);
border: 1px solid rgba(255,255,255,0.1);
color: white;
padding: 5px 10px;
border-radius: 4px;
outline: none;
font-family: 'Product Sans', sans-serif;
}
.zera-input:focus, .zera-select:focus {
border-color: #00f2ff;
}
.zera-btn {
background: linear-gradient(90deg, #00f2ff, #70e1ff);
border: none;
padding: 8px 16px;
border-radius: 4px;
color: #000;
font-weight: bold;
cursor: pointer;
transition: transform 0.1s;
}
.zera-btn:active { transform: scale(0.98); }
/* Mac Close Button */
.zera-close-btn {
width: 14px;
height: 14px;
background: #ff5f57;
border-radius: 50%;
cursor: pointer;
position: relative;
transition: all 0.2s;
}
.zera-close-btn:hover { background: #ff3b30; }
.zera-close-btn::before {
content: '×';
position: absolute;
top: 50%; left: 50%;
transform: translate(-50%, -50%);
color: rgba(80,0,0,0.8);
font-size: 12px;
opacity: 0;
transition: opacity 0.2s;
}
.zera-close-btn:hover::before { opacity: 1; }
/* --- Specific Module Styles --- */
/* Crosshair */
#zera-crosshair-preview {
width: 100px; height: 100px;
background: rgba(0,0,0,0.5);
border: 1px solid #444;
margin: 0 auto;
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.zera-crosshair-overlay {
position: absolute;
pointer-events: none;
}
/* Keystrokes */
.zera-keystrokes {
position: fixed;
bottom: 10px;
left: 10px;
display: flex;
flex-direction: column;
gap: 5px;
z-index: 9999;
user-select: none;
}
.zera-key-row { display: flex; gap: 5px; justify-content: center; }
.zera-key {
width: 40px; height: 40px;
background: rgba(0,0,0,0.7);
border: 1px solid rgba(0, 242, 255, 0.3);
border-radius: 6px;
color: #fff;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 14px;
font-weight: bold;
font-family: 'Product Sans', sans-serif;
transition: all 0.1s;
}
.zera-key.active {
background: rgba(0, 242, 255, 0.3);
border-color: #00f2ff;
box-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
transform: scale(0.95);
}
.zera-cps-text { font-size: 10px; color: #00f2ff; }
.zera-key.wide { width: 70px; }
.zera-key.space { width: 120px; }
/* War Utils K/D */
.zera-kd-display {
background: linear-gradient(135deg, rgba(0, 242, 255, 0.2), rgba(0,0,0,0.8));
border: 1px solid #00f2ff;
padding: 5px 10px;
border-radius: 5px;
color: #fff;
font-weight: 800;
text-shadow: 0 0 5px #00f2ff;
margin-left: 10px;
}
/* Better Chests */
.zera-chest-boost {
box-shadow: 0 0 15px rgba(0, 242, 255, 0.3) !important;
border: 1px solid rgba(0, 242, 255, 0.5) !important;
}
/* Update or add this to your CSS block */
.zera-input[type="file"] {
width: 110px !important;
font-size: 11px !important;
padding: 2px 5px !important;
height: auto !important;
}
`;
document.head.appendChild(ZeraExtraStyles);
class r extends o {
constructor() {
super("Watermark", "Visual", {
Text: "ZeraMine"
})
}
onSettingUpdate() {
let e = document.querySelector(".ZeraMine-overlay-title");
e && (e.textContent = this.options.Text)
}
onEnable() {
let e = document.querySelector(".ZeraMine-overlay-title");
e || (e = document.createElement("div"), e.className = "ZeraMine-overlay-title", e.textContent = this.options.Text, e.style.position = "absolute", e.style.top = "0", e.style.left = "0", e.style.padding = "0.5em", e.style.userSelect = "none", e.style.display = "none", e.style.zIndex = "1000", e.style.textShadow = "var(--ZeraMine-accent-color) 0px 0px 10px", e.style.fontFamily = "'Product Sans', sans-serif", e.style.fontSize = "24px", e.style.background = "linear-gradient(90deg, #FFFF00, #00FFFF)", e.style.backgroundClip = "text", e.style.webkitFontSmoothing = "antialiased", e.style.webkitTextFillColor = "transparent", document.body.appendChild(e)), document.querySelector(".ZeraMine-overlay-title").style.display = "flex"
}
onDisable() {
document.querySelector(".ZeraMine-overlay-title").style.display = "none"
}
}
class l {
constructor(e, t) {
this.module = e, this.container = t, this.components = [], this.initialized = !1, this.isOpen = !1
}
initialize() {
!this.initialized && this.module?.options && (Object.keys(this.module.options).forEach((e => {
const t = this.module.options[e],
n = typeof t;
e.toLowerCase().includes("color") ? this.addColorPicker(e) : "boolean" === n || "true" === t || "false" === t ? this.addCheckbox(e) : "string" === n ? this.addStringInput(e) : this.addNumberInput(e)
})), this.components.forEach((e => e.style.display = "none")), this.initialized = !0)
}
toggle() {
this.isOpen = !this.isOpen, this.components.forEach((e => {
e.style.display = this.isOpen ? "flex" : "none", this.isOpen ? this.container.style.marginBottom = "5px" : this.container.style.marginBottom = "0px"
}))
}
addNumberInput(e) {
const t = document.createElement("div");
t.className = "gui-setting-container";
const n = document.createElement("span");
n.className = "gui-setting-label", n.textContent = e;
const o = document.createElement("input");
o.type = "text", o.className = "gui-text-input", o.value = this.module.options[e];
let i = o.value;
o.addEventListener("input", (() => {
const t = o.value.trim();
isNaN(t) || "" === t || (i = t, this.module.options[e] = t, s.emit("setting.update", this.module))
})), o.addEventListener("blur", (() => {
(isNaN(o.value) || "" === o.value.trim()) && (o.value = i)
})), o.addEventListener("keydown", (e => {
"Enter" === e.key && o.blur()
})), t.appendChild(n), t.appendChild(o), this.container.appendChild(t), this.components.push(t)
}
addStringInput(e) {
const t = document.createElement("div");
t.className = "gui-setting-container";
const n = document.createElement("span");
n.className = "gui-setting-label", n.textContent = e;
const o = document.createElement("input");
o.type = "text", o.className = "gui-text-input", o.value = this.module.options[e], o.addEventListener("input", (() => {
const t = o.value.trim();
this.module.options[e] = t, s.emit("setting.update", this.module)
})), t.appendChild(n), t.appendChild(o), this.container.appendChild(t), this.components.push(t)
}
addCheckbox(e) {
const t = document.createElement("div");
t.className = "gui-setting-container";
const n = document.createElement("span");
n.className = "gui-setting-label", n.textContent = e;
const o = document.createElement("div");
o.className = "gui-checkbox", o.classList.toggle("enabled", !0 === this.module.options[e] || "true" === this.module.options[e]), o.addEventListener("click", (() => {
const t = o.classList.contains("enabled");
o.classList.toggle("enabled"), this.module.options[e] = (!t).toString(), s.emit("setting.update", this.module)
})), t.appendChild(n), t.appendChild(o), this.container.appendChild(t), this.components.push(t)
}
addColorPicker(e) {
const t = document.createElement("div");
t.className = "gui-setting-container";
const n = document.createElement("span");
n.className = "gui-setting-label", n.textContent = e;
const o = document.createElement("div");
o.className = "gui-color-picker", o.style.background = this.module.options[e];
const i = document.createElement("input");
i.type = "color", i.className = "gui-color-input", o.appendChild(i), i.addEventListener("input", (t => {
o.style.background = t.target.value, this.module.options[e] = t.target.value, s.emit("setting.update", this.module)
})), t.appendChild(n), t.appendChild(o), this.container.appendChild(t), this.components.push(t)
}
}
class d {
constructor(e, t = {
top: "200px",
left: "200px"
}) {
this.panel = document.createElement("div"), this.panel.className = "gui-panel", this.panel.style.top = t.top, this.panel.style.left = t.left, this.header = document.createElement("div"), this.header.className = "gui-header", this.header.textContent = e, this.panel.appendChild(this.header), document.body.appendChild(this.panel), this.buttons = [], this.setupDragHandling()
}
setupDragHandling() {
let e = !1,
t = {
x: 0,
y: 0
};
this.header.addEventListener("mousedown", (n => {
e = !0, t.x = n.clientX - this.panel.offsetLeft, t.y = n.clientY - this.panel.offsetTop
})), document.addEventListener("mousemove", (n => {
e && (this.panel.style.left = n.clientX - t.x + "px", this.panel.style.top = n.clientY - t.y + "px")
})), document.addEventListener("mouseup", (() => e = !1))
}
addButton(e) {
const t = document.createElement("div");
t.className = "gui-button-container";
const n = document.createElement("div");
n.className = "gui-button " + (e.isEnabled ? "enabled" : ""), n.textContent = e.name;
const s = new l(e, t);
return n.addEventListener("mousedown", (t => {
0 === t.button && (e.toggle(), n.classList.toggle("enabled", e.isEnabled)), 1 === t.button && (n.textContent = "waiting for bind..", e.waitingForBind = !0)
})), n.addEventListener("contextmenu", (e => {
e.preventDefault(), s.initialize(), s.toggle()
})), n.setAttribute("tabindex", -1), n.addEventListener("keydown", (t => {
n.textContent = e.name, e.waitingForBind && (t.preventDefault(), t.stopPropagation(), t.stopImmediatePropagation(), "Escape" === t.key ? e.keybind = null : e.keybind = String(t.code), e.waitingForBind = !1)
})), t.appendChild(n), this.panel.appendChild(t), this.buttons.push(n), n
}
show() {
this.panel.style.display = "block"
}
hide() {
this.panel.style.display = "none"
}
}
var c = n(72),
p = n.n(c),
u = n(825),
h = n.n(u),
m = n(659),
y = n.n(m),
g = n(56),
f = n.n(g),
v = n(540),
b = n.n(v),
x = n(113),
S = n.n(x),
E = n(679),
C = {};
C.styleTagTransform = S(), C.setAttributes = f(), C.insert = y().bind(null, "head"), C.domAPI = h(), C.insertStyleElement = b(), p()(E.A, C), E.A && E.A.locals && E.A.locals;
class k extends o {
constructor() {
super("ClickGUI", "Visual", {
"Accent Color 1": "rgb(64, 190, 255)",
"Accent Color 2": "rgb(129, 225, 255)",
"Button Color": "rgb(40, 40, 40, 0.9)",
"Hover Color": "rgb(50, 50, 50, 0.9)",
"Header Color": "rgb(0, 0, 0, 0.85)",
"Panel Color": "rgb(18 18 18)",
"Text Color": "#ffffff",
"Enable Animations": !0
}, "ShiftRight"), this.GUILoaded = !1, this.panels = [], this.blurredBackground = null, this.updateColors()
}
updateAnimations() {
this.options["Enable Animations"] ? document.body.classList.add("with-animations") : document.body.classList.remove("with-animations")
}
updateColors() {
document.body.style.setProperty("--ZeraMine-accent-color", `linear-gradient(90deg, ${this.options["Accent Color 1"]} 0%, ${this.options["Accent Color 2"]} 100%)`), document.body.style.setProperty("--button-color", this.options["Button Color"]), document.body.style.setProperty("--hover-color", this.options["Hover Color"]), document.body.style.setProperty("--header-bg", this.options["Header Color"]), document.body.style.setProperty("--panel-bg", this.options["Panel Color"]), document.body.style.setProperty("--text-color", this.options["Text Color"])
}
onEnable() {
document.pointerLockElement && document.exitPointerLock(), this.GUILoaded ? (this.showGUI(), this.updateAnimations()) : (this.setupBackground(), this.createPanels(), this.setupEventListeners(), this.GUILoaded = !0, this.updateAnimations())
}
setupBackground() {
this.blurredBackground = document.createElement("div"), this.blurredBackground.className = "gui-background", document.body.appendChild(this.blurredBackground)
}
createPanels() {
this.panels.forEach((e => {
e.panel && e.panel.parentNode && e.panel.parentNode.removeChild(e.panel)
})), this.panels = [], [{
title: "Combat",
position: {
top: "100px",
left: "50px"
}
}, {
title: "Movement",
position: {
top: "100px",
left: "270px"
}
}, {
title: "Visual",
position: {
top: "100px",
left: "490px"
}
}, {
title: "Resources",
position: {
top: "100px",
left: "710px"
}
},{
title: "World",
position: {
top: "100px",
left: "930px"
}
}, {
title: "Utils",
position: {
top: "100px",
left: "1150px"
}
}].forEach((e => {
const t = new d(e.title, e.position);
this.panels.push(t)
}));
const e = {};
Object.values(ee.modules).forEach((t => {
e[t.category] || (e[t.category] = []), e[t.category].push(t)
})), Object.entries(e).forEach((([e, t]) => {
const n = this.panels.find((t => t.header.textContent === e));
n && (t.sort(((e, t) => t.name.length - e.name.length)), t.forEach((e => n.addButton(e))))
}))
}
setupEventListeners() {
s.on("module.update", (e => {
const t = this.panels.find((t => t.header.textContent === e.category));
if (!t) return;
const n = t.buttons.find((t => t.textContent === e.name));
n && n.classList.toggle("enabled", e.isEnabled)
}))
}
showGUI() {
this.panels.forEach((e => e.show())), this.blurredBackground.style.display = "block"
}
onDisable() {
this.panels.forEach((e => e.hide())), this.blurredBackground.style.display = "none"
}
onSettingUpdate() {
this.updateColors(), this.updateAnimations()
}
}
class M extends o {
constructor() {
super("Airjump", "Movement", null)
}
onRender() {
a?.gameWorld?.player && (a.gameWorld.player.collision.isGrounded = !0)
}
}
class W extends o {
constructor() {
super("Instabreak", "World", null), this.originalHardness = new Map
}
onEnable() {
Object.values(a.gameWorld.items).forEach((e => {
e?.destruction && (this.originalHardness.has(e) || this.originalHardness.set(e, e.destruction.durability), e.destruction.durability = 0)
}))
}
onDisable() {
Object.values(a.gameWorld.items).forEach((e => {
e?.destruction && this.originalHardness.has(e) && (e.destruction.durability = this.originalHardness.get(e))
}))
}
}
class w extends o {
constructor() {
super("Nuker", "World", {
Radius: 3,
"Chunk Interval": 1e3
}), this.lastExecutionTime = 0
}
onRender() {
if (!a?.gameWorld?.player) return;
let e = this.options.Radius;
const t = this.options["Chunk Interval"],
n = Date.now();
if (n - this.lastExecutionTime >= t) {
this.lastExecutionTime = n;
let t = Object.values(a.gameWorld.player.position).splice(0, 3).map(Math.floor);
for (let n = -e; n <= e; n++)
for (let s = -e; s <= e; s++)
for (let o = -e; o <= e; o++) {
const [e, i, r] = [t[0] + n, t[1] + s, t[2] + o];
0 !== a.gameWorld.chunkManager.getBlock(e, i, r) && a.gameWorld.chunkManager.setBlock(e, i, r, 0, !0, !0)
}
}
}
}
class _ extends o {
constructor() {
super("AdBypass", "Resources")
}
onEnable() {
this._reward = this._reward || a.stores.get("adsStore").rewardCommercialVideoWrapper, a.stores.get("adsStore").rewardCommercialVideoWrapper = () => !0
}
onDisable() {
a.stores.get("adsStore").rewardCommercialVideoWrapper = () => this._reward
}
}
class P extends o {
constructor() {
super("Fly", "Movement", {
"Vertical Speed": 5
})
}
onRender() {
a?.gameWorld?.player && (a.gameWorld.player.velocity.gravity = 0, a?.gameWorld?.player?.inputs.jump ? a.gameWorld.player.velocity.velVec3.y = this.options["Vertical Speed"] : a?.gameWorld?.player?.inputs.crouch ? a.gameWorld.player.velocity.velVec3.y = -this.options["Vertical Speed"] : a.gameWorld.player.velocity.velVec3.y = 0)
}
onDisable() {
a.gameWorld.player.velocity.gravity = 23
}
}
class I extends o {
constructor() {
super("Speed", "Movement", {
Speed: 15
})
}
onRender() {
a?.gameWorld?.player && (a.gameWorld.player.velocity.moveSpeed = this.options.Speed, a.gameWorld.player.velocity.fastMoveSpeed = this.options.Speed)
}
onDisable() {
a.gameWorld.player.velocity.moveSpeed = 4.5, a.gameWorld.player.velocity.fastMoveSpeed = 6.4
}
}
class B extends o {
constructor() {
super("FreeHeadcoins", "Resources")
}
async onEnable() {
let e = await a.network.get("users/freeSpinner");
a.stores.get("userState").user.balance.headcoins += e.data.amount, ee.modules.FreeHeadcoins.disable()
}
}
class A extends o {
constructor() {
super("Fill", "World", {
Radius: 4,
"Block ID": 652,
"Chunk Interval": 500
}), this.lastExecutionTime = 0
}
onRender() {
if (!a?.gameWorld?.player) return;
let e = this.options.Radius;
const t = this.options["Chunk Interval"],
n = Date.now();
if (n - this.lastExecutionTime >= t) {
this.lastExecutionTime = n;
let t = Object.values(a.gameWorld.player.position).splice(0, 3).map(Math.floor);
for (let n = -e; n <= e; n++)
for (let s = -e; s <= e; s++)
for (let o = -e; o <= e; o++) {
const [e, i, r] = [t[0] + n, t[1] + s, t[2] + o];
0 == a.gameWorld.chunkManager.getBlock(e, i, r) && a.gameWorld.chunkManager.setBlock(e, i, r, this.options["Block ID"], !0, !0)
}
}
}
}
class T extends o {
constructor() {
super("Chams", "Visual", null)
}
onRender() {
a?.gameWorld?.player && a.gameWorld.server.players.forEach((e => {
e.playerMaterial.depthTest = !1, e.playerMaterial.wireframe = !0
}))
}
onDisable() {
a.gameWorld.server.players.forEach((e => {
e.playerMaterial.depthTest = !0, e.playerMaterial.wireframe = !1
}))
}
}
class N extends o {
constructor() {
super("FOVChanger", "Visual", {
FOV: 120
})
}
onRender() {
let e = a?.gameWorld?.threeScene?.camera || null;
e?.updateProjectionMatrix && e.fov !== parseFloat(this.options.FOV) && (e.fov = parseFloat(this.options.FOV), e.updateProjectionMatrix(), a.gameWorld.player.settings.__defineGetter__("fov", (() => parseFloat(this.options.FOV))))
}
onDisable() {
a.gameWorld.threeScene.camera = 70, a.gameWorld.threeScene.camera.updateProjectionMatrix(), delete a.gameWorld.player.settings.fov, a.gameWorld.player.settings.fov = 70
}
}
class R extends o {
constructor() {
super("Scaffold", "Movement", null)
}
onRender() {
if (!a?.gameWorld?.player) return;
let e = Object.values(a.gameWorld.player.position).splice(0, 3).map(Math.floor);
e[1]--;
let t = a.gameWorld.player.currentInventoryItemId,
n = a.gameWorld.chunkManager.getBlock(...e),
s = a.gameWorld.items[n]?.replaceable || !1;
(0 == n || s) && t && a.gameWorld.chunkManager.setBlock(...e, t, !0, !0)
}
}
const z = {
normalizeVector(e) {
const t = e.x * e.x + e.y * e.y + e.z * e.z;
if (t > 0) {
const n = 1 / Math.sqrt(t);
return [e.x * n, e.y * n, e.z * n]
}
return e
},
distanceBetween(e, t) {
const n = t.x - e.x,
s = t.y - e.y,
o = t.z - e.z;
return n * n + s * s + o * o
},
distanceBetweenSqrt(e, t) {
return Math.sqrt(this.distanceBetween(e, t))
},
calculateDistance: (e, t) => Math.hypot(t.x - e.x, t.y - e.y, t.z - e.z),
calculateDistanceArr: (e, t) => Math.hypot(t[0] - e[0], t[1] - e[1], t[2] - e[2])
},
D = {
getClosestPlayer() {
let e = a.gameWorld.player.position,
t = a.gameWorld.server.players,
n = [];
return t.forEach((function(t, s) {
let o = z.distanceBetween(e, {
x: t._model.position.x,
y: t._model.position.y,
z: t._model.position.z
});
t.id = s, n.push({
player: t,
distance: o
})
})), n.sort(((e, t) => e.distance - t.distance)), n.map((e => e.player))[0]
},
hexToRgb(e) {
var t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
return t ? {
r: parseInt(t[1], 16),
g: parseInt(t[2], 16),
b: parseInt(t[3], 16)
} : null
}
};
class O extends o {
constructor() {
super("Killaura", "Combat", {
"Y Offset": 1.62,
Reach: 4,
Delay: 120
}), this.lastExecutionTime = null
}
onRender() {
const e = Date.now();
a?.gameWorld?.player && e - this.lastExecutionTime >= this.options.Delay && (this.lastExecutionTime = e, this.tryKill())
}
tryKill() {
let e = this.options.Reach,
t = this.options["Y Offset"],
n = D.getClosestPlayer();
var s = {
x: a.gameWorld.player.position.x,
y: a.gameWorld.player.position.y + t,
z: a.gameWorld.player.position.z
},
o = n._model.position,
i = {
x: s.x - o.x,
y: s.y - o.y,
z: s.z - o.z
},
r = Math.sqrt(i.x * i.x + i.y * i.y + i.z * i.z);
0 !== r && (i.x /= r, i.y /= r, i.z /= r), i.x = -i.x, i.y = -i.y, i.z = -i.z;
var l = Math.sqrt(Math.pow(s.x - o.x, 2) + Math.pow(s.y - o.y, 2) + Math.pow(s.z - o.z, 2));
l < e && a.gameWorld.server.sendData(13, [a.gameWorld.time.localServerTimeMs, s.x, s.y, s.z, i.x, i.y, i.z, l, n.id])
}
}
class L extends o {
constructor() {
super("GunModifier", "Combat", {
Spread: .5,
"Bullets per shot": 100,
"Firerate (ms)": 1,
"Bullet distance": 1e3,
"Reload Time": 1,
Recoil: !1
})
}
get gunSystem() {
return a.gameWorld.systemsManager.activeSystems.find((e => e?.bulletsSystem))
}
onEnable() {
let e = this.gunSystem.playerShooter.currPlayerWeaponSpec;
e.bulletsPerShot = this.options["Bullets per shot"], e.firerateMs = this.options["Firerate (ms)"], e.distance = this.options["Bullet distance"], e.startSpread = this.options.Spread, e.reloadTimeMs = this.options["Reload Time"], this.options.Recoil || (e.recoilAttackY = 0, e.recoilAttackY = 0)
}
}
class F extends o {
constructor() {
super("Aimbot", "Combat", {
"On Aim": "true",
"On Shoot": "true",
"Y Offset": .5
}), this.lastExecutionTime = null
}
getClosestEnemy(e, t) {
let n = null,
s = 1 / 0;
return t.forEach((t => {
if (t?.model?.position && t.isAlive) {
let o = z.calculateDistance(e.position, t.model.position);
o < s && (s = o, n = t)
}
})), n
}
aimAtEnemy() {
let e = a.gameWorld.player,
t = a.gameWorld.server.players;
if (!e || !t) return;
let n = this.getClosestEnemy(e, t);
if (n) {
let t = n.model.position,
s = e.position,
o = {
x: t.x - s.x,
z: t.z - s.z
},
i = Math.atan2(o.x, o.z),
a = parseFloat(this.options["Y Offset"]),
r = t.y + a - s.y,
l = Math.hypot(o.x, o.z),
d = Math.atan2(r, l);
d = Math.max(Math.min(d, Math.PI / 2), -Math.PI / 2);
let c = (i + Math.PI) % (2 * Math.PI);
e.rotation.y = c, e.rotation.x = d
}
}
onRender() {
a?.gameWorld?.server && ("true" == this.options["On Aim"] && a.gameWorld.player.inputs.rightMB || "true" == this.options["On Shoot"] && a.gameWorld.player.inputs.leftMB || "true" !== this.options["On Shoot"] && "true" !== this.options["On Aim"]) && this.aimAtEnemy()
}
}
class H extends o {
constructor() {
super("NoClip", "Movement")
}
get playerPhysicsSystem() {
return a.gameWorld.systemsManager.activeSystems.find((e => e?.playerPhysicsSystem)).playerPhysicsSystem
}
onRender() {
a?.gameWorld?.player && (this._og = this._og || this.playerPhysicsSystem.resolveBlockCollision, this.playerPhysicsSystem.resolveBlockCollision == this._og && (this.playerPhysicsSystem.resolveBlockCollision = () => {}))
}
onDisable() {
this.playerPhysicsSystem.resolveBlockCollision = this._og
}
}
class U extends o {
constructor() {
super("Timer", "Movement", {
Multiplier: 1.2
}), this.interval = null
}
onEnable() {
this.interval && clearInterval(this.interval), this.interval = setInterval((() => {
a.gameWorld.time.elapsedTimeMs += 20 * this.options.Multiplier
}), 20)
}
onDisable() {
this.interval && clearInterval(this.interval)
}
}
const j = {
toServer: {
TIME_STEP_INFO: 1,
REQUEST_RESPAWN: 4,
GOT_DAMAGE: 27,
PARKOUR_REQUEST_RESPAWN: 1004,
ONE_BLOCK_REQUEST_RESPAWN: 1552,
BED_WARS_REQUEST_RESPAWN: 1600,
SANDBOX_REQUEST_RESPAWN: 1700
},
listeners: {},
packetListener(e, t) {
Object.values(this.listeners).forEach((n => {
let s = n(e, t);
null != s && (t = s)
})), a.gameWorld.server.msgsToSend.push(e, t)
},
init() {
s.on("render", (() => {
a?.gameWorld?.server?.sendData && (a.gameWorld.server.sendData = this.packetListener.bind(this))
}))
}
};
class K extends o {
constructor() {
super("NoFall", "Movement", null)
}
onEnable() {
j.listeners.NoFall = function(e, t) {
if (e == j.toServer.TIME_STEP_INFO && t.lp) {
let e = t.lp[3];
e > 0 && (t.lp[3] *= .01), e < 0 && (t.lp[3] = -.01), 0 == e && (t.lp[3] = -.01)
}
}
}
onDisable() {
delete j.listeners.NoFall
}
}
class V extends o {
constructor() {
super("HighJump", "Movement", {
"Jump Height": 25
})
}
onRender() {
a.gameWorld.player.velocity.jumpSpeed = parseFloat(this.options["Jump Height"])
}
onDisable() {
a.gameWorld.player.velocity.jumpSpeed = 8.285714285714286
}
}
class G extends o {
constructor() {
super("NoHunger", "Resources", null)
}
onEnable() {
j.listeners.NoHunger = function(e, t) {
e == j.toServer.TIME_STEP_INFO && (t.m && delete t.m, t.s && delete t.s, t.j && delete t.j)
}
}
onDisable() {
delete j.listeners.NoHunger
}
}
class q extends o {
constructor() {
super("NoDrown", "Resources", null)
}
get damageListener() {
return a.gameWorld.eventEmitter._events.get(48).values().next().value
}
onRender() {
a?.gameWorld?.eventEmitter?._events && this.damageListener.callback.toString().includes("damageToApply") && (this.damageListener.callback = () => {})
}
onDisable() {
a?.gameWorld?.eventEmitter?._events && (this.damageListener.callback = e => {
this.damageToApply += e
})
}
}
class Y extends o {
constructor() {
super("GroundSpeed", "Movement", {
Speed: 15
})
}
get playerPhysicsSystem() {
return a.gameWorld.systemsManager.activeSystems.find((e => e?.playerPhysicsSystem)).playerPhysicsSystem
}
resetMovementSpeed() {
a.gameWorld.player.velocity.moveSpeed = 4.5, a.gameWorld.player.velocity.fastMoveSpeed = 6.4
}
onRender() {
a?.gameWorld?.player && (a.gameWorld.player.collision.isGrounded ? (a.gameWorld.player.velocity.moveSpeed = this.options.Speed, a.gameWorld.player.velocity.fastMoveSpeed = this.options.Speed) : this.resetMovementSpeed())
}
onEnable() {
let e = 0,
t = 0;
this.playerPhysicsSystem.BB.min.__defineGetter__("y", (() => e - .1)), this.playerPhysicsSystem.BB.max.__defineGetter__("y", (() => t - .1)), this.playerPhysicsSystem.BB.min.__defineSetter__("y", (t => {
e = t
})), this.playerPhysicsSystem.BB.max.__defineSetter__("y", (e => {
t = e
}))
}
onDisable() {
this.resetMovementSpeed(), delete this.playerPhysicsSystem.BB.min.y, delete this.playerPhysicsSystem.BB.max.y
}
}
class Q extends o {
constructor() {
super("InstantRespawn", "World")
}
get gamemode() {
return location.pathname.replace("/match/", "")
}
onRender() {
if (a.gameWorld?.player.isAlive) return;
let e = !1;
switch (this.gamemode) {
case "one-block":
a.gameWorld.server.sendData(j.toServer.ONE_BLOCK_REQUEST_RESPAWN, !0), e = !0;
case "parkour":
a.gameWorld.server.sendData(j.toServer.PARKOUR_REQUEST_RESPAWN, !0), e = !0;
case "bedwars":
a.gameWorld.server.sendData(j.toServer.BED_WARS_REQUEST_RESPAWN, !0), e = !0;
case "survival":
a.gameWorld.server.sendData(j.toServer.SANDBOX_REQUEST_RESPAWN, !0), e = !0
}
e && a.stores.get("gameState").setLayoutState(0)
}
}
class Z extends o {
constructor() {
super("ShopAnywhere", "Resources")
}
get npcSystem() {
return a?.gameWorld?.systemsManager?.activeSystems.find((e => e?.isPlayerInShoppingZone))
}
onRender() {
this?.npcSystem?.isPlayerInShoppingZone && (this._og = this._og || this.npcSystem.isPlayerInShoppingZone, this.npcSystem.isPlayerInShoppingZone == this._og && (this.npcSystem.isPlayerInShoppingZone = () => !0))
}
onDisable() {
this.npcSystem.isPlayerInShoppingZone = this._og
}
}
class $ extends o {
constructor() {
super("SelfHarm", "World", {
Amount: 10
})
}
onEnable() {
a.gameWorld.server.msgsToSend.push(j.toServer.GOT_DAMAGE, parseFloat(this.options.Amount)), this.disable()
}
}
class X extends o {
constructor() {
super("BlockFinder", "Resources", {
"Search Radius": 16,
"Block ID": 581
}), this.CHUNK_SIZE = 16, this.CHUNK_CHECK_MS = 200, this.foundBlocks = [], this.lastChunkKey = "", this.chunkInterval = null, this.raf = null, this.ui = null, this.listEl = null
}
getPlayerChunk() {
const e = a.gameWorld.player.position;
return [Math.floor(e.x / this.CHUNK_SIZE), Math.floor(e.y / this.CHUNK_SIZE), Math.floor(e.z / this.CHUNK_SIZE)]
}
createUI() {
if (this.ui) return;
const e = document.createElement("div");
e.style.cssText = "\n position:fixed;\n top:80px;\n left:80px;\n width:260px;\n background:#111;\n color:#ddd;\n font:11px system-ui, sans-serif;\n border-radius:6px;\n box-shadow:0 6px 20px rgba(0,0,0,.4);\n z-index:99999;\n user-select:none;\n ", e.innerHTML = '\n <div class="bf-head" style="\n padding:6px 8px;\n cursor:move;\n opacity:.85;\n ">\n Block Finder\n </div>\n <div class="bf-list" style="\n max-height:260px;\n overflow:auto;\n padding:4px 8px 8px;\n font-family:monospace;\n white-space:pre;\n "></div>\n ', document.body.appendChild(e), this.ui = e, this.listEl = e.querySelector(".bf-list");
let t = !1,
n = 0,
s = 0;
e.querySelector(".bf-head").onmousedown = o => {
t = !0, n = o.clientX - e.offsetLeft, s = o.clientY - e.offsetTop
}, document.addEventListener("mousemove", this._dragMove = o => {
t && (e.style.left = o.clientX - n + "px", e.style.top = o.clientY - s + "px")
}), document.addEventListener("mouseup", this._dragUp = () => {
t = !1
})
}
destroyUI() {
this.ui && (this.ui.remove(), this.ui = null, this.listEl = null, document.removeEventListener("mousemove", this._dragMove), document.removeEventListener("mouseup", this._dragUp))
}
scanChunks() {
const e = 0 | this.options["Search Radius"],
t = 0 | this.options["Block ID"],
n = a.gameWorld.chunkManager,
s = this.getPlayerChunk();
this.foundBlocks.length = 0;
for (let o = -e; o <= e; o++)
for (let i = -e; i <= e; i++)
for (let r = -e; r <= e; r++) {
const e = s[0] + o,
l = s[1] + i,
d = s[2] + r,
c = n.getChunkArray(e, l, d);
if (c)
for (let n = 0; n < c.length; n++) {
if (c[n] !== t) continue;
const s = (e << 4) + (15 & n),
o = (l << 4) + (n >> 4 & 15),
i = (d << 4) + (n >> 8);
a.gameWorld.chunkManager.getBlock(s, o, i) === t && this.foundBlocks.push([s, o, i])
}
}
}
renderDistances = () => {
if (!this.listEl) return;
const e = [...a.gameWorld.player.position];
0 === this.foundBlocks.length ? this.listEl.textContent = "none nearby" : this.listEl.textContent = this.foundBlocks.map((t => ({
pos: t,
d: z.calculateDistanceArr(e, t)
}))).sort(((e, t) => e.d - t.d)).map((e => `${e.pos[0]}, ${e.pos[1]}, ${e.pos[2]} ${e.d.toFixed(1)}m`)).join("\n"), this.raf = requestAnimationFrame(this.renderDistances)
};
onEnable() {
this.createUI(), this.scanChunks(), this.renderDistances(), this.chunkInterval = setInterval((() => {
const e = this.getPlayerChunk().join(",");
e !== this.lastChunkKey && (this.lastChunkKey = e, this.scanChunks())
}), this.CHUNK_CHECK_MS)
}
onDisable() {
clearInterval(this.chunkInterval), cancelAnimationFrame(this.raf), this.chunkInterval = null, this.raf = null, this.foundBlocks.length = 0, this.lastChunkKey = "", this.destroyUI()
}
}
class J extends o {
constructor() {
super("Spider", "Movement", {
Speed: 5
})
}
get playerPhysicsSystem() {
return a.gameWorld.systemsManager.activeSystems.find((e => e?.playerPhysicsSystem)).playerPhysicsSystem
}
get upAgainstWall() {
return 0 == this.playerPhysicsSystem.playerVelVec3.x || 0 == this.playerPhysicsSystem.playerVelVec3.z
}
onRender() {
a?.gameWorld?.player && a?.gameWorld?.player?.inputs.jump && this.upAgainstWall && (a.gameWorld.player.velocity.velVec3.y = this.options.Speed)
}
}
class LineFiller extends o {
constructor() {
super("LineFiller", "World", {
X1: 0, Y1: 0, Z1: 0,
X2: 0, Y2: 0, Z2: 0,
"Use Player As Start": "false",
"Use Player As End": "false",
"Speed (ms)": 50, // Delay between blocks
Execute: "false"
});
}
get playerPos() {
const p = a?.gameWorld?.player?.position;
if (!p) return null;
return [Math.floor(p.x), Math.floor(p.y), Math.floor(p.z)];
}
onSettingUpdate() {
// Force strings to booleans/checks
const isTrue = (val) => val === "true" || val === true;
if (isTrue(this.options["Use Player As Start"])) {
const pos = this.playerPos;
if (pos) {
this.options.X1 = pos[0]; this.options.Y1 = pos[1]; this.options.Z1 = pos[2];
}
this.options["Use Player As Start"] = "false";
}
if (isTrue(this.options["Use Player As End"])) {
const pos = this.playerPos;
if (pos) {
this.options.X2 = pos[0]; this.options.Y2 = pos[1]; this.options.Z2 = pos[2];
console.log("Point B (End) Locked:", pos);
}
this.options["Use Player As End"] = "false";
}
if (isTrue(this.options.Execute)) {
this.fillLine();
this.options.Execute = "false";
}
}
async fillLine() {
const world = a?.gameWorld;
if (!world || !world.player) return;
// Store original position to return after building
const startPos = {
x: world.player.position.x,
y: world.player.position.y,
z: world.player.position.z
};
const x1 = Number(this.options.X1), y1 = Number(this.options.Y1), z1 = Number(this.options.Z1);
const x2 = Number(this.options.X2), y2 = Number(this.options.Y2), z2 = Number(this.options.Z2);
let blockId = world.player?.inventory?.getSelectedBlock?.() || 1;
const dx = x2 - x1, dy = y2 - y1, dz = z2 - z1;
const steps = Math.max(Math.abs(dx), Math.abs(dy), Math.abs(dz));
const delay = Number(this.options["Speed (ms)"]);
console.log(`LineFiller: Moving and building ${steps + 1} blocks...`);
for (let i = 0; i <= steps; i++) {
const t = i / steps;
const px = Math.floor(x1 + (t * dx) + 0.5);
const py = Math.floor(y1 + (t * dy) + 0.5);
const pz = Math.floor(z1 + (t * dz) + 0.5);
// 1. Update Player Position (Teleport to block)
// We set y to py + 1.6 to simulate the player standing on/near the block
world.player.position.x = px;
world.player.position.y = py + 2;
world.player.position.z = pz;
// 2. Place the block
// The 'true, true' flags usually force a network update
world.chunkManager.setBlock(px, py, pz, blockId, true, true);
// 3. Wait for server synchronization
await new Promise(res => setTimeout(res, delay));
}
// Optional: Return to original position
world.player.position.x = startPos.x;
world.player.position.y = startPos.y;
world.player.position.z = startPos.z;
console.log("LineFiller: Complete and returned to start.");
}
}
class MagicWandPaste extends o {
constructor() {
super("MagicWandPaste", "World", {
"Range": 3,
"Delay (ms)": 50, // Small delay to prevent server kick
"Blocks Per Step": 1, // How many blocks to place before waiting
"Auto-Paste": "true",
"Activation Key": "KeyV", // Now uses a key instead of LeftMB
"Manual X": 0,
"Manual Y": 0,
"Manual Z": 0,
"Copy/Paste": "Copy"
});
this.pendingBlocks = new Map();
this.isPasting = false; // Prevents overlapping loops
this.initHook();
}
initHook() {
const self = this;
const originalLog = console.log;
console.log = function(...args) {
if (args[0] && typeof args[0] === "string" && args[0].includes("Blocks was pasted:")) {
const data = args[1];
for (const [coords, id] of Object.entries(data)) {
self.pendingBlocks.set(coords, id);
}
originalLog.apply(console, ["Wand Data Captured:", self.pendingBlocks.size, "blocks."]);
}
originalLog.apply(console, args);
};
}
// Triggered every frame
onRender() {
if (!this.isEnabled || !a?.gameWorld?.player || this.pendingBlocks.size === 0) return;
// If clicking and not already running the loop, start pasting
if (a.gameWorld.player.inputs.rightMB && !this.isPasting) {
this.runPasteLoop();
}
}
async runPasteLoop() {
this.isPasting = true;
const world = a.gameWorld;
const delay = Number(this.options["Delay (ms)"]);
const perStep = Number(this.options["Blocks Per Step"]);
const range = Number(this.options["Range"]);
let batchCount = 0;
const coords = Array.from(this.pendingBlocks.keys());
for (const coordStr of coords) {
const p = world.player.position;
const px = Math.floor(p.x);
const py = Math.floor(p.y);
const pz = Math.floor(p.z);
const [bx, by, bz] = coordStr.split(',').map(Number);
const dx = Math.abs(bx - px);
const dy = Math.abs(by - py);
const dz = Math.abs(bz - pz);
if (dx <= range && dy <= range && dz <= range) {
const blockId = this.pendingBlocks.get(coordStr);
world.chunkManager.setBlock(bx, by, bz, blockId, true, true);
this.pendingBlocks.delete(coordStr);
batchCount++;
if (batchCount >= perStep) {
await new Promise(res => setTimeout(res, delay));
batchCount = 0;
}
} else {
console.log("Out of range:", coordStr);
}
}
this.isPasting = false;
}
}
class DiamondThrower extends o {
constructor() {
super("63DiamondThrower", "World", { "Item ID": "862" }, "KeyT");
}
onEnable() {
this._handler = (event) => {
if (this.isEnabled && event.code === "KeyT") {
this.throwStack();
}
};
window.addEventListener("keydown", this._handler);
}
onDisable() {
window.removeEventListener("keydown", this._handler);
}
throwStack() {
try {
const gameState = a.stores.get("gameState");
const inventory = a.stores.get("inventory");
const server = gameState.networkController;
if (server && inventory) {
// Using the exact array format from your code snippet:
// [StoreType, Quantity, SlotIndex]
// W.POCKET is usually 0, and selectedItem is the current slot
const slot = inventory.selectedItem;
// V.THROW_OUT_ITEM is the packet key for dropping
server.sendData(V.THROW_OUT_ITEM, [W.POCKET, 63, slot]);
console.log("%c[Exploit] Threw 63x Stack from slot " + slot, "color: cyan");
}
} catch (err) {
console.error("Stack Throw Error:", err);
}
}
}
class Treeclean extends o {
constructor() {
super("CleanABlockTree", "World", {
Radius: 3,
"Chunk Interval": 1e3,
"Target Blocks": "471, 502, 474, 501, 610"
}), this.lastExecutionTime = 0
}
onRender() {
if (!a?.gameWorld?.player) return;
let e = this.options.Radius;
const t = this.options["Chunk Interval"],
n = Date.now();
if (n - this.lastExecutionTime >= t) {
this.lastExecutionTime = n;
let t = Object.values(a.gameWorld.player.position).splice(0, 3).map(Math.floor);
const targetBlocks = this.options["Target Blocks"]
.split(',') // Split by comma
.map(id => parseInt(id.trim())) // Remove whitespace and convert to Number
.filter(id => !isNaN(id)); // Remove any entries that aren't valid numbers
for (let n = -e; n <= e; n++)
for (let s = -e; s <= e; s++)
for (let o = -e; o <= e; o++) {
const [e, i, r] = [t[0] + n, t[1] + s, t[2] + o];
const currentBlock = a.gameWorld.chunkManager.getBlock(e, i, r);
// Check if the current block is in our target list
if (targetBlocks.includes(currentBlock)) {
a.gameWorld.chunkManager.setBlock(e, i, r, 0, !0, !0);
}
}
}
}
}
class minestone extends o {
constructor() {
super("MineExceptOres", "World", {
Radius: 3,
"Chunk Interval": 1e3,
"Min Y": 6,
"Target Blocks": "581, 691 ,830, 571, 652, 616"
}), this.lastExecutionTime = 0
}
onRender() {
if (!a?.gameWorld?.player) return;
let e = this.options.Radius;
const minY = this.options["Min Y"];
const t = this.options["Chunk Interval"],
n = Date.now();
if (n - this.lastExecutionTime >= t) {
this.lastExecutionTime = n;
let t = Object.values(a.gameWorld.player.position).splice(0, 3).map(Math.floor);
const inputBlocks = this.options["Target Blocks"].split(',').map(id => parseInt(id.trim())).filter(id => !isNaN(id));
const targetBlocks = [...new Set([0, ...inputBlocks])];
for (let n = -e; n <= e; n++)
for (let s = -e; s <= e; s++)
for (let o = -e; o <= e; o++) {
const [e, i, r] = [t[0] + n, t[1] + s, t[2] + o];
if (i < minY) continue;
const currentBlock = a.gameWorld.chunkManager.getBlock(e, i, r);
// Check if the current block is in our target list
if (!targetBlocks.includes(currentBlock)) {
a.gameWorld.chunkManager.setBlock(e, i, r, 0, !0, !0);
}
}
}
}
}
class CopyBuild extends o {
constructor() {
super("CopyBuild", "World", {
"Set Point A": "false",
"Set Point B": "false",
"Copy Now": "false",
"Copied Data": "None"
});
this.pointA = null;
this.pointB = null;
}
onSettingUpdate() {
// Accessing player position safely
const p = a?.gameWorld?.player?.position;
if (!p) return;
const curPos = [Math.floor(p.x), Math.floor(p.y), Math.floor(p.z)];
if (this.options["Set Point A"] === "true") {
this.pointA = [...curPos]; // Create a copy of the array
console.log("%c[CopyBuild] Point A set:", "color: yellow", this.pointA);
this.options["Set Point A"] = "false";
}
if (this.options["Set Point B"] === "true") {
this.pointB = [...curPos];
console.log("%c[CopyBuild] Point B set:", "color: yellow", this.pointB);
this.options["Set Point B"] = "false";
}
if (this.options["Copy Now"] === "true") {
this.performCopy();
this.options["Copy Now"] = "false";
}
}
performCopy() {
if (!this.pointA || !this.pointB) {
console.error("Points not set! Stand at corner 1 and click Set A, then corner 2 and click Set B.");
return;
}
const world = a.gameWorld;
const result = {};
let count = 0;
// Boundaries
const xRange = [Math.min(this.pointA[0], this.pointB[0]), Math.max(this.pointA[0], this.pointB[0])];
const yRange = [Math.min(this.pointA[1], this.pointB[1]), Math.max(this.pointA[1], this.pointB[1])];
const zRange = [Math.min(this.pointA[2], this.pointB[2]), Math.max(this.pointA[2], this.pointB[2])];
console.log(`%c[CopyBuild] Scanning from ${xRange[0]},${yRange[0]},${zRange[0]} to ${xRange[1]},${yRange[1]},${zRange[1]}`, "color: cyan");
for (let x = xRange[0]; x <= xRange[1]; x++) {
for (let y = yRange[0]; y <= yRange[1]; y++) {
for (let z = zRange[0]; z <= zRange[1]; z++) {
const id = world.chunkManager.getBlock(x, y, z);
// 0 is air. We only save actual blocks.
if (id !== 0 && id !== null && id !== undefined) {
// Relative coordinates: makes the build "portable"
const relX = x - this.pointA[0];
const relY = y - this.pointA[1];
const relZ = z - this.pointA[2];
result[`${relX},${relY},${relZ}`] = id;
count++;
}
}
}
}
if (count > 0) {
this.options["Copied Data"] = JSON.stringify(result);
console.log(`%c[CopyBuild] Success! ${count} blocks copied.`, "color: lime");
// Alerting the user in the console so they can copy it from there if the UI truncates it
console.log("DATA:", JSON.stringify(result));
} else {
console.warn("[CopyBuild] No blocks found in that area. Are the chunks loaded?");
this.options["Copied Data"] = "Error: No blocks found";
}
}
}
class duper extends o{constructor(){super("Dupe","Resources")}
onEnable()
{let e=a.stores.get("inventoryState"),t=e[1][e.selectedItem].q;for(let n=0;n<t;n++)a.gameWorld.server.sendData(509,[1,"1",e.selectedItem]),a.gameWorld.server.sendData(509,[1,"1",e.selectedItem]);this.disable()}}
class dupetroll extends o{constructor(){super("Dupetroll","Resources")}
onRender()
{let e=a.stores.get("inventoryState"),t=e[1][e.selectedItem].q;for(let n=0;n<t;n++)a.gameWorld.server.sendData(509,[1,"1",e.selectedItem]),a.gameWorld.server.sendData(509,[1,"1",e.selectedItem]);}}
class FreeMinebucks extends o {
constructor() {
super("FreeMinebucks", "Resources")
}
onEnable() {
hooks.A.network.get("/users/freeHeadcoins"), hooks.A.stores.userState.user.balance.minebucks += 10, module_moduleManager.modules.minebucks.disable()
}
}
class FreeSpins extends o {
constructor() {
super("freeSpins", "Resources")
}
onEnable() {
hooks.A.network.get("/users/freeSpinner"), hooks.A.stores.userState.user.balance.freeSpinner += 10, module_moduleManager.modules.freeSpinner.disable()
}
}
class KnockbackDisabler extends o {
constructor() {
super("KnockbackDisabler", "World");
// Configurações internas
this.blocks = 10; // knockback
this.damage = 2; // dano
}
applyKnockbackAndDamage(target, attacker) {
let dx = target.x - attacker.x;
let dy = target.y - attacker.y;
let length = Math.sqrt(dx * dx + dy * dy);
if (!length) return;
dx /= length;
dy /= length;
// Knockback
target.x += dx * this.blocks;
target.y += dy * this.blocks;
// Dano
if (typeof target.health === "number") {
target.health -= this.damage;
if (target.health < 0) target.health = 0;
}
}
onRender() {
// Simulação de evento "onHit"
if (window.player && window.attacker && window.playerWasHit) {
this.applyKnockbackAndDamage(window.player, window.attacker);
// Reseta evento
window.playerWasHit = false;
}
}
}
class Disabler extends o {
constructor() {
super("Disabler", "Resources"), this.packetID = null
}
insaneBypass() {}
onRender() {
if (!hooks.A?.gameWorld?.player) return;
let e = hooks.A.stores.gameState.gameWorld.server.msgsListeners;
this.packetID || (this.packetID = Object.keys(e).find((t => e[t].toString().includes("correct pos")))), e[this.packetID] !== this.insaneBypass && (e[this.packetID] = this.insaneBypass)
}
}
class HitAllModule extends o {
constructor() {
super("1HitAll", "Combat", null, "KeyU"); // Atalho: tecla U
}
hitAll() {
try {
window.hooked.gameWorld.server.players.forEach(plr => {
const { x, y, z } = plr.model.position;
if (plr.hasOwnProperty('isBlock')) { // HNS
if (plr.isHunter) return;
window.hooked.gameWorld.server.sendData(packetsOut.HNS_ATTACK_BLOCK, [x, y + 0.1, z, 0.00000001, -0.9999999, 0.00000001, window.hooked.gameWorld.time.localServerTimeMs, plr.sessionId]);
} if (plr.hasOwnProperty('isZombie')) { // Infection
if (plr.isZombie) return;
window.hooked.gameWorld.server.sendData(packetsOut.HIT, [window.hooked.gameWorld.time.localServerTimeMs, x, y + 0.1, z, 0.00000001, -0.9999999, 0.00000001, 2, plr.sessionId]);
} else { // Other
window.hooked.gameWorld.server.sendData(packetsOut.HIT, [window.hooked.gameWorld.time.localServerTimeMs, x, y + 0.1, z, 0.00000001, -0.9999999, 0.00000001, 2, plr.sessionId]);
}
});
} catch {}
}
onEnable() {
this.hitAll();
}
}
class TeleportModule extends o {
constructor() {
super("Teleport", "World");
// Atalho fixo: tecla T (não ativa/desativa o módulo)
this.key = "KeyT";
document.addEventListener("keydown", (e) => {
if (e.code === this.key && !e.repeat) {
this.tpToSelectedBlock();
}
});
}
/** Função de teleporte */
tp(x = 0, y = 0, z = 0, relative = true) {
try {
const player = hooks.A?.gameWorld?.player;
if (!player) return;
const position = player.position;
if (relative) {
position.x += x;
position.y += y;
position.z += z;
} else {
Object.assign(position, { x, y, z });
}
player.physicsPosComp.copyPos(position);
} catch (err) {
console.warn("Teleport falhou:", err);
}
}
/** Teleporta até o bloco selecionado (crosshair) */
tpToSelectedBlock() {
try {
const gameWorld = hooks.A?.gameWorld;
if (!gameWorld) return;
const outlineSystem = gameWorld.systemsManager.activeSystems.find(s => s.currBlockPos);
if (!outlineSystem) return;
outlineSystem.intersectAndShow(true, 500);
if (!outlineSystem.currBlockPos) return;
const { x, y, z } = outlineSystem.currBlockPos;
this.tp(x, y + 1, z, false);
} catch (err) {
console.warn("Erro ao teleportar:", err);
}
}
}
class HitModule extends o {
constructor() {
super("2HitAll", "Combat", null, "KeyX"); // Atalho: tecla X
}
hitAll() {
try {
hooks.A?.gameWorld?.server?.players.forEach(plr => {
const { x, y, z } = plr.model.position;
if (plr.hasOwnProperty('isBlock')) { // HNS
if (plr.isHunter) return;
hooks.A.gameWorld.server.sendData(
packetsOut.HNS_ATTACK_BLOCK,
[x, y + 0.1, z, 0.00000001, -0.9999999, 0.00000001,
hooks.A.gameWorld.time.localServerTimeMs, plr.sessionId]
);
} else if (plr.hasOwnProperty('isZombie')) { // Infection
if (plr.isZombie) return;
hooks.A.gameWorld.server.sendData(
packetsOut.HIT,
[hooks.A.gameWorld.time.localServerTimeMs, x, y + 0.1, z,
0.00000001, -0.9999999, 0.00000001, 2, plr.sessionId]
);
} else { // Other
hooks.A.gameWorld.server.sendData(
packetsOut.HIT,
[hooks.A.gameWorld.time.localServerTimeMs, x, y + 0.1, z,
0.00000001, -0.9999999, 0.00000001, 2, plr.sessionId]
);
}
});
} catch {}
}
onEnable() {
this.hitAll(); // executa quando ativado pelo menu ou tecla X
}
}
class GhostMode extends o {
constructor() {
super("GhostMode", "Movement", {
Fade: true,
Duration: 500
});
this.isGhost = false;
}
onEnable() {
const player = hooks.A?.gameWorld?.player;
if (!player || !player.model) return;
const model = player.model;
if (this.settings.Fade) {
this.fadeModel(model, this.settings.Duration, false);
} else {
model.visible = false;
}
this.isGhost = true;
console.log("[GhostMode] Modelo oculto localmente.");
}
onDisable() {
const player = hooks.A?.gameWorld?.player;
if (!player || !player.model) return;
const model = player.model;
if (this.settings.Fade) {
this.fadeModel(model, this.settings.Duration, true);
} else {
model.visible = true;
}
this.isGhost = false;
console.log("[GhostMode] Modelo visível novamente.");
}
// Função utilitária para fade in/out do modelo (educacional)
fadeModel(model, duration = 600, visible = false) {
if (!model) return;
const meshes = [];
model.traverse(obj => {
if (obj.isMesh) {
obj.material = obj.material.clone();
obj.material.transparent = true;
obj.material.depthWrite = false;
meshes.push(obj);
}
});
const start = performance.now();
const from = visible ? 0 : 1;
const to = visible ? 1 : 0;
function animate(now) {
const t = Math.min(1, (now - start) / duration);
const value = from + (to - from) * t;
meshes.forEach(m => {
m.material.opacity = value;
m.visible = value > 0.01;
});
if (t < 1) requestAnimationFrame(animate);
}
requestAnimationFrame(animate);
}
}
class NoFog extends o {
constructor() {
super("NoFog", "Visual", null);
}
onRender() {
try {
if (hooks.A?.gameWorld?.threeScene?.scene?.fog) {
Object.assign(
hooks.A.gameWorld.threeScene.scene.fog,
{
near: 9999,
far: 10000
}
);
}
} catch {}
}
}
class ChatTranslator extends o {
constructor() {
super("ChatTranslator", "Utils", {
"Target Lang": "en",
"Show Info Popup": "true"
});
this.messageCache = {};
this.messageDataAttribute = null;
}
async onEnable() {
this.initAttributeFinder();
this.hookCreateElement();
this.initOutgoingTranslate();
if (this.options["Show Info Popup"] === "true") {
this.showInfo();
}
}
initAttributeFinder() {
const interval = setInterval(() => {
try {
let css = [...document.styleSheets].find(x => x?.href && x.href.includes('assets/Game-'));
if (!css) return;
let match = [...css.cssRules].find(x => x?.selectorText?.includes('.messages[data-v-'))?.selectorText;
if (!match) return;
this.messageDataAttribute = match.slice(10, -1);
clearInterval(interval);
} catch {}
}, 250);
}
hookCreateElement() {
const self = this;
const _createElement = document.createElement;
document.createElement = function () {
const el = _createElement.apply(this, arguments);
if (el.tagName !== 'DIV') return el;
const _setAttribute = el.setAttribute;
el.setAttribute = function () {
if (self.messageDataAttribute && arguments[0] === self.messageDataAttribute) {
self.handleMessage(this);
}
return _setAttribute.apply(this, arguments);
};
return el;
};
}
async translate(text, tl = "en") {
if (this.messageCache[text]) return this.messageCache[text];
const res = await fetch(
`https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=${tl}&dt=t&q=${encodeURIComponent(text)}`
);
const data = await res.json();
const result = [data[2], data[0].map(x => x[0]).join('')];
this.messageCache[text] = result;
return result;
}
handleMessage(el) {
if (!el || el.children.length !== 2) return;
const textEl = el.children[1];
if (!textEl.innerText) return;
this.translate(textEl.innerText, this.options["Target Lang"])
.then(translated => {
if (!textEl.innerText) return;
textEl.innerText = `[${translated[0]}]: ${translated[1]}`;
})
.catch(() => {});
}
initOutgoingTranslate() {
document.addEventListener('keydown', async (e) => {
if (e.key !== '.') return;
const input = e.target;
if (!(input.tagName === 'INPUT' || input.tagName === 'TEXTAREA')) return;
const match = input.value.match(/^\[([a-z]{2,5})\]:\s*(.*)/);
if (!match) return;
e.preventDefault();
const targetLang = match[1];
const text = match[2];
if (!text) return;
try {
const translated = await this.translate(text, targetLang);
input.value = translated[1];
input.dispatchEvent(new Event('input', { bubbles: true }));
} catch {}
});
}
showInfo() {
const box = document.createElement("div");
box.textContent = "Use [lang]: text then press '.' to translate";
box.style.cssText = `
position: fixed;
top: 20px;
left: 50%;
transform: translateX(-50%);
background: black;
color: white;
padding: 8px 12px;
border-radius: 6px;
z-index: 99999;
font-size: 14px;
`;
document.body.appendChild(box);
setTimeout(() => box.remove(), 1000);
}
}
class CleanScreen extends o {
constructor() {
super("ZenMode", "Utils", {
"Enabled": "false"
});
this.isClean = false;
this.hidden = [];
}
onEnable() {
this.keyHandler = (e) => {
if (e.key.toLowerCase() === 'h') {
const active = document.activeElement;
if (active.tagName === 'INPUT' || active.tagName === 'TEXTAREA') return;
this.toggle();
}
};
document.addEventListener("keydown", this.keyHandler);
}
onDisable() {
document.removeEventListener("keydown", this.keyHandler);
if (this.isClean) this.toggle();
}
getElements() {
const list = [];
document.querySelectorAll('*').forEach(el => {
if (el.tagName === 'CANVAS') return;
const style = getComputedStyle(el);
if (
(style.position === 'fixed' || style.position === 'absolute') &&
style.display !== 'none'
) {
list.push(el);
}
});
return list;
}
toggle() {
this.isClean = !this.isClean;
if (this.isClean) {
this.hidden = this.getElements();
this.hidden.forEach(el => {
el.dataset.oldDisplay = el.style.display;
el.style.display = 'none';
});
} else {
this.hidden.forEach(el => {
el.style.display = el.dataset.oldDisplay || '';
});
this.hidden = [];
}
}
}
class FpsBoost extends o {
constructor() {
super("FPS Boost", "Utils", null);
this.originalGetContext = null;
}
onEnable() {
try {
// Force tab always visible (prevents throttling)
Object.defineProperty(document, 'hidden', {
value: false,
writable: false
});
Object.defineProperty(document, 'visibilityState', {
value: 'visible',
writable: false
});
} catch {}
try {
// Hook WebGL context
this.originalGetContext = HTMLCanvasElement.prototype.getContext;
HTMLCanvasElement.prototype.getContext = function (type, args) {
if (type && type.includes('webgl')) {
args = args || {};
args.powerPreference = "high-performance";
args.antialias = false; // disable AA
args.desynchronized = true; // low latency
}
return this.originalGetContext
? this.originalGetContext.call(this, type, args)
: HTMLCanvasElement.prototype.getContext.call(this, type, args);
}.bind(this);
} catch {}
}
onDisable() {
try {
if (this.originalGetContext) {
HTMLCanvasElement.prototype.getContext = this.originalGetContext;
}
} catch {}
}
}
class ZeraHUD extends o {
constructor() {
super("StatsHUD", "Utils", {
ShowFPS: true,
ShowPing: true,
ShowCPS: true
});
this.fps = 0;
this.frames = 0;
this.last = performance.now();
this.ping = 0;
this.pings = [];
this.clicks = [];
this.cps = 0;
this.hue = 0;
}
getColor(offset = 0) {
let h = (this.hue + offset) % 360;
let mapped = 60 + ((Math.sin(h * 0.02) + 1) / 2) * 120; // yellow → cyan
return `hsl(${mapped}, 100%, 60%)`;
}
updateFPS() {
this.frames++;
let now = performance.now();
if (now - this.last >= 1000) {
this.fps = this.frames;
this.frames = 0;
this.last = now;
}
}
updatePing() {
let start = performance.now();
fetch(location.origin, { method: "GET", mode: "no-cors", cache: "no-store" })
.finally(() => {
let p = performance.now() - start;
if (p > 0 && p < 2000) {
this.pings.push(p);
if (this.pings.length > 20) this.pings.shift();
this.ping = Math.round(this.pings.reduce((a,b)=>a+b,0)/this.pings.length);
}
});
}
updateCPS() {
let now = performance.now();
this.clicks = this.clicks.filter(t => now - t < 1000);
this.cps = this.clicks.length;
}
onEnable() {
if (!this.el) {
this.el = document.createElement("div");
this.el.className = "ZeraMine-stats";
Object.assign(this.el.style, {
position: "absolute",
bottom: "30px",
right: "10px",
padding: "6px 12px",
fontFamily: "'Product Sans', sans-serif",
fontSize: "21px",
zIndex: "1000",
userSelect: "none",
display: "flex",
gap: "12px",
background: "rgba(0,0,0,0.4)",
borderRadius: "8px",
backdropFilter: "blur(8px)"
});
document.body.appendChild(this.el);
}
this.el.style.display = "flex";
// click tracker
this.clickHandler = (e) => {
if (e.isTrusted) this.clicks.push(performance.now());
};
window.addEventListener("pointerdown", this.clickHandler, true);
// ping loop
this.pingLoop = setInterval(() => this.updatePing(), 2500);
}
onDisable() {
if (this.el) this.el.style.display = "none";
if (this.clickHandler) window.removeEventListener("pointerdown", this.clickHandler, true);
if (this.pingLoop) clearInterval(this.pingLoop);
}
onRender() {
try {
this.updateFPS();
this.updateCPS();
this.hue = (this.hue + 2) % 360;
let html = "";
if (this.options.ShowFPS) {
html += `<span style="
background: linear-gradient(90deg, ${this.getColor(0)}, ${this.getColor(40)});
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 0 0 8px ${this.getColor(0)};
">FPS: ${this.fps}</span>`;
}
if (this.options.ShowPing) {
html += `<span style="
background: linear-gradient(90deg, ${this.getColor(60)}, ${this.getColor(100)});
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 0 0 8px ${this.getColor(60)};
">PING: ${this.ping}ms</span>`;
}
if (this.options.ShowCPS) {
html += `<span style="
background: linear-gradient(90deg, ${this.getColor(120)}, ${this.getColor(160)});
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 0 0 8px ${this.getColor(120)};
">CPS: ${this.cps}</span>`;
}
this.el.innerHTML = html;
} catch {}
}
}
// Add Shaders button to Visual category panel
class Shaders extends o {
constructor() {
super("ShadersMenu", "Utils", {
"Shader Preset": "none",
"Texture Pack": "vanilla",
"Brightness": 100,
"Contrast": 100,
"Saturation": 100,
"Sepia": 0,
"Hue Rotate": 0,
"Invert": 0,
"Blur": 0,
"Enable Shadows": "false",
"Bloom Strength": 0,
"Particle Effect": "none",
"Particle Density": 60,
"Particle Speed": 1.0
});
this.filterLoop = null;
this.currentFilter = null;
this.mainCanvas = null;
this.uiElement = null;
this.isOpen = false;
this.inMatch = false;
this.particles = {
parts: [],
canvas: null,
ctx: null,
ready: false,
animFrame: null
};
}
get shaders() {
return {
none: [],
bloom: ['brightness(110%)', 'contrast(115%)'],
vibrant: ['saturate(160%)', 'contrast(110%)'],
cinematic: ['contrast(125%)', 'brightness(90%)', 'saturate(80%)'],
noir: ['grayscale(100%)', 'contrast(150%)', 'brightness(90%)'],
thermal: ['hue-rotate(180deg)', 'saturate(250%)', 'brightness(120%)'],
retro: ['saturate(130%)', 'contrast(120%)', 'sepia(30%)'],
acid: ['hue-rotate(90deg)', 'saturate(200%)', 'contrast(150%)'],
cyberpunk: ['hue-rotate(270deg)', 'saturate(180%)', 'contrast(140%)', 'brightness(110%)'],
neon: ['saturate(200%)', 'contrast(130%)', 'brightness(115%)'],
dreamscape: ['saturate(150%)', 'hue-rotate(15deg)', 'brightness(105%)', 'contrast(110%)'],
matrix: ['saturate(200%)', 'hue-rotate(120deg)', 'contrast(125%)'],
underwater: ['hue-rotate(200deg)', 'saturate(140%)', 'brightness(90%)'],
sunset: ['hue-rotate(15deg)', 'saturate(180%)', 'brightness(110%)', 'contrast(115%)'],
frost: ['hue-rotate(200deg)', 'saturate(50%)', 'brightness(120%)', 'contrast(110%)'],
vintage: ['sepia(40%)', 'saturate(70%)', 'contrast(110%)', 'brightness(95%)']
};
}
get texturePacks() {
return {
vanilla: [],
faithful: ['brightness(95%)', 'contrast(105%)'],
neon: ['saturate(200%)', 'brightness(120%)', 'contrast(115%)'],
dark: ['brightness(60%)', 'contrast(130%)'],
minimal: ['brightness(105%)', 'saturate(70%)', 'contrast(90%)'],
vivid: ['saturate(180%)', 'contrast(125%)', 'brightness(105%)'],
soft: ['brightness(110%)', 'contrast(85%)', 'saturate(90%)'],
hd: ['contrast(120%)', 'brightness(105%)', 'saturate(110%)'],
cold: ['hue-rotate(200deg)', 'saturate(80%)', 'brightness(95%)'],
warm: ['hue-rotate(15deg)', 'saturate(120%)', 'brightness(105%)']
};
}
getGameCanvas() {
if (this.mainCanvas && document.body.contains(this.mainCanvas) && this.mainCanvas.clientWidth > 100) {
return this.mainCanvas;
}
const canvases = Array.from(document.querySelectorAll('canvas')).filter(c =>
!c.id.includes('bg-part') && !c.id.includes('shader-particles')
);
if (canvases.length) {
this.mainCanvas = canvases.reduce((biggest, c) =>
(c.clientWidth * c.clientHeight) > (biggest.clientWidth * biggest.clientHeight) ? c : biggest
);
return this.mainCanvas;
}
return null;
}
buildFilterString() {
const arr = [];
const opt = this.options;
if (opt.Brightness !== 100) arr.push(`brightness(${opt.Brightness}%)`);
if (opt.Contrast !== 100) arr.push(`contrast(${opt.Contrast}%)`);
if (opt.Saturation !== 100) arr.push(`saturate(${opt.Saturation}%)`);
if (opt.Sepia !== 0) arr.push(`sepia(${opt.Sepia}%)`);
if (opt["Hue Rotate"] !== 0) arr.push(`hue-rotate(${opt["Hue Rotate"]}deg)`);
if (opt.Invert !== 0) arr.push(`invert(${opt.Invert}%)`);
if (opt.Blur !== 0) arr.push(`blur(${opt.Blur}px)`);
const shaderFilters = this.shaders[opt["Shader Preset"]];
if (shaderFilters) arr.push(...shaderFilters);
const textureFilters = this.texturePacks[opt["Texture Pack"]];
if (textureFilters) arr.push(...textureFilters);
if (opt["Enable Shadows"] === "true") {
arr.push('drop-shadow(0 4px 12px rgba(0,0,0,0.6))');
}
if (opt["Bloom Strength"] > 0) {
arr.push(`brightness(${100 + opt["Bloom Strength"] * 0.5}%)`);
}
return arr.length ? arr.join(' ') : 'none';
}
applyFilters() {
const canvas = this.getGameCanvas();
if (canvas) {
const filterStr = this.buildFilterString();
if (filterStr !== this.currentFilter) {
this.currentFilter = filterStr;
canvas.style.filter = filterStr;
canvas.style.transform = 'translateZ(0)';
}
}
}
removeFilters() {
const canvas = this.getGameCanvas();
if (canvas) {
canvas.style.filter = 'none';
canvas.style.transform = '';
this.currentFilter = null;
}
}
setupParticleSystem() {
const p = this.particles;
if (p.ready) return;
try {
p.canvas = document.createElement('canvas');
p.canvas.id = 'shader-particles';
p.canvas.style.cssText = 'position:fixed;top:0;left:0;width:100vw;height:100vh;pointer-events:none;z-index:50;';
p.ctx = p.canvas.getContext('2d', { alpha: true });
document.documentElement.appendChild(p.canvas);
this.resizeParticleCanvas();
window.addEventListener('resize', () => this.resizeParticleCanvas());
p.ready = true;
this.runParticles();
} catch (e) {}
}
resizeParticleCanvas() {
const p = this.particles;
if (p.canvas) {
p.canvas.width = window.innerWidth;
p.canvas.height = window.innerHeight;
}
}
updateMatchState() {
const locked = !!document.pointerLockElement;
if (locked !== this.inMatch) {
this.inMatch = locked;
if (this.particles.canvas) {
this.particles.canvas.style.display = this.inMatch ? 'none' : 'block';
}
}
}
tickParticles() {
const p = this.particles;
const opt = this.options;
this.updateMatchState();
if (this.inMatch || opt["Particle Effect"] === 'none') {
p.parts = [];
return;
}
const density = parseInt(opt["Particle Density"]) || 60;
const speed = parseFloat(opt["Particle Speed"]) || 1.0;
const effectType = opt["Particle Effect"];
if (p.parts.length < density * 3 && Math.random() < 0.5) {
const particle = {
x: Math.random() * p.canvas.width,
y: -10,
type: effectType
};
switch (effectType) {
case 'snow':
particle.vx = (Math.random() - 0.5) * 0.5 * speed;
particle.vy = (0.5 + Math.random() * 1.5) * speed;
particle.size = 1.5 + Math.random() * 2;
particle.wobble = Math.random() * 10;
break;
case 'rain':
particle.vx = 0.5 * speed;
particle.vy = (12 + Math.random() * 8) * speed;
particle.size = 1.5;
break;
case 'stardust':
particle.vx = (1 + Math.random() * 2) * speed;
particle.vy = (1 + Math.random() * 1.5) * speed;
particle.size = 2.5 + Math.random() * 3;
particle.wobble = Math.random() * 10;
particle.hue = Math.random() * 60;
break;
case 'sakura':
particle.vx = (Math.random() - 0.5) * 2 * speed;
particle.vy = (1 + Math.random() * 1) * speed;
particle.size = 3 + Math.random() * 4;
particle.wobble = Math.random() * 10;
particle.color = `hsl(${330 + Math.random() * 30}, 100%, 50%)`;
break;
case 'fireflies':
particle.y = p.canvas.height + 10;
particle.vx = (Math.random() - 0.5) * 1.5 * speed;
particle.vy = -(0.5 + Math.random() * 1.5) * speed;
particle.size = 1.5 + Math.random() * 2;
particle.wobble = Math.random() * 10;
break;
case 'matrix':
particle.x = Math.floor(Math.random() * p.canvas.width / 20) * 20;
particle.y = -20;
particle.vx = 0;
particle.vy = (3 + Math.random() * 4) * speed;
particle.size = 14;
particle.char = String.fromCharCode(0x30A0 + Math.random() * 96);
break;
case 'aurora':
particle.y = Math.random() * p.canvas.height * 0.3;
particle.vx = speed * 0.5;
particle.vy = 0;
particle.size = 50 + Math.random() * 100;
particle.hue = Math.random() * 360;
particle.life = 1;
break;
}
p.parts.push(particle);
}
for (let i = p.parts.length - 1; i >= 0; i--) {
const w = p.parts[i];
w.y += w.vy;
w.x += w.vx;
if (['snow', 'stardust', 'sakura'].includes(w.type)) {
w.x += Math.sin(w.wobble) * 0.8;
w.wobble += 0.03;
}
if (w.type === 'fireflies') w.wobble += 0.02;
if (w.type === 'aurora') {
w.life -= 0.005;
if (w.life < 0) { p.parts.splice(i, 1); continue; }
}
if (w.type === 'matrix' && Math.random() < 0.05) {
w.char = String.fromCharCode(0x30A0 + Math.random() * 96);
}
if ((w.vy > 0 && w.y > p.canvas.height + 20) || (w.vy < 0 && w.y < -20)) {
p.parts.splice(i, 1);
}
}
}
renderParticles() {
const p = this.particles;
if (!p.ctx || !p.ready) return;
p.ctx.clearRect(0, 0, p.canvas.width, p.canvas.height);
for (const w of p.parts) {
p.ctx.globalAlpha = 0.85;
switch (w.type) {
case 'snow':
p.ctx.fillStyle = '#ffffff';
p.ctx.beginPath();
p.ctx.arc(w.x, w.y, w.size, 0, Math.PI * 2);
p.ctx.fill();
break;
case 'rain':
p.ctx.fillStyle = '#aaddff';
p.ctx.fillRect(w.x, w.y, 1.5, w.size * 8);
break;
case 'stardust':
p.ctx.fillStyle = `hsl(${60 + w.hue}, 100%, 60%)`;
p.ctx.shadowBlur = 15;
p.ctx.shadowColor = p.ctx.fillStyle;
p.ctx.beginPath();
p.ctx.arc(w.x, w.y, w.size, 0, Math.PI * 2);
p.ctx.fill();
p.ctx.shadowBlur = 0;
break;
case 'sakura':
p.ctx.fillStyle = w.color;
p.ctx.save();
p.ctx.translate(w.x, w.y);
p.ctx.rotate(w.wobble);
p.ctx.beginPath();
p.ctx.ellipse(0, 0, w.size, w.size / 2, 0, 0, Math.PI * 2);
p.ctx.fill();
p.ctx.restore();
break;
case 'fireflies':
p.ctx.fillStyle = '#ccff00';
p.ctx.shadowBlur = 15;
p.ctx.shadowColor = '#ccff00';
p.ctx.beginPath();
p.ctx.arc(w.x + Math.sin(w.wobble) * 20, w.y, w.size, 0, Math.PI * 2);
p.ctx.fill();
p.ctx.shadowBlur = 0;
break;
case 'matrix':
p.ctx.font = 'bold 14px monospace';
p.ctx.fillStyle = '#00ff44';
p.ctx.fillText(w.char, w.x, w.y);
break;
case 'aurora':
p.ctx.fillStyle = `hsla(${w.hue}, 100%, 50%, ${w.life * 0.3})`;
p.ctx.fillRect(0, w.y, p.canvas.width, w.size);
break;
}
}
p.ctx.globalAlpha = 1;
}
runParticles() {
if (!this.particles.ready) return;
this.tickParticles();
this.renderParticles();
this.particles.animFrame = requestAnimationFrame(() => this.runParticles());
}
stopParticles() {
if (this.particles.animFrame) {
cancelAnimationFrame(this.particles.animFrame);
this.particles.animFrame = null;
}
if (this.particles.canvas) {
this.particles.canvas.remove();
this.particles.canvas = null;
this.particles.ctx = null;
this.particles.ready = false;
this.particles.parts = [];
}
}
createUI() {
if (this.uiElement) return;
const ui = document.createElement('div');
ui.className = 'shader-ui-panel';
ui.innerHTML = `
<div class="shader-ui-header">
<span class="shader-ui-title">✨ Shaders</span>
<div class="shader-macos-close" id="shader-close-btn"></div>
</div>
<div class="shader-tab active" data-tab="visuals">Visuals</div>
<div class="shader-tab" data-tab="particles">Particles</div>
</div>
<div class="shader-ui-body">
<div class="shader-tab-content active" id="tab-visuals">
<div class="shader-section-title">Shader Presets</div>
<div class="shader-select-wrapper">
<select id="shader-preset" class="shader-select">
<option value="none">None</option>
<option value="bloom">✨ Bloom</option>
<option value="vibrant">🎨 Vibrant</option>
<option value="cinematic">🎬 Cinematic</option>
<option value="noir">🎭 Noir</option>
<option value="thermal">🔥 Thermal</option>
<option value="retro">🕹️ Retro</option>
<option value="acid">⚗️ Acid</option>
<option value="cyberpunk">🤖 Cyberpunk</option>
<option value="neon">💡 Neon</option>
<option value="dreamscape">💫 Dreamscape</option>
<option value="matrix">💻 Matrix</option>
<option value="underwater">🌊 Underwater</option>
<option value="sunset">🌅 Sunset</option>
<option value="frost">❄️ Frost</option>
<option value="vintage">📷 Vintage</option>
</select>
</div>
<div class="shader-section-title">Texture Pack</div>
<div class="shader-select-wrapper">
<select id="texture-pack" class="shader-select">
<option value="vanilla">Vanilla</option>
<option value="faithful">Faithful</option>
<option value="neon">Neon</option>
<option value="dark">Dark</option>
<option value="minimal">Minimal</option>
<option value="vivid">Vivid</option>
<option value="soft">Soft</option>
<option value="hd">HD</option>
<option value="cold">Cold</option>
<option value="warm">Warm</option>
</select>
</div>
<div class="shader-section-title">Adjustments</div>
<div class="shader-slider-group">
<div class="shader-slider-row">
<span class="shader-slider-label">Brightness</span>
<span class="shader-slider-value" id="val-brightness">100%</span>
</div>
<input type="range" class="shader-slider" id="slider-brightness" min="30" max="200" step="5" value="100">
</div>
<div class="shader-slider-group">
<div class="shader-slider-row">
<span class="shader-slider-label">Contrast</span>
<span class="shader-slider-value" id="val-contrast">100%</span>
</div>
<input type="range" class="shader-slider" id="slider-contrast" min="30" max="200" step="5" value="100">
</div>
<div class="shader-slider-group">
<div class="shader-slider-row">
<span class="shader-slider-label">Saturation</span>
<span class="shader-slider-value" id="val-saturation">100%</span>
</div>
<input type="range" class="shader-slider" id="slider-saturation" min="0" max="300" step="10" value="100">
</div>
<div class="shader-slider-group">
<div class="shader-slider-row">
<span class="shader-slider-label">Sepia</span>
<span class="shader-slider-value" id="val-sepia">0%</span>
</div>
<input type="range" class="shader-slider" id="slider-sepia" min="0" max="100" step="5" value="0">
</div>
<div class="shader-slider-group">
<div class="shader-slider-row">
<span class="shader-slider-label">Hue Rotate</span>
<span class="shader-slider-value" id="val-hue">0°</span>
</div>
<input type="range" class="shader-slider" id="slider-hue" min="0" max="360" step="15" value="0">
</div>
<div class="shader-slider-group">
<div class="shader-slider-row">
<span class="shader-slider-label">Invert</span>
<span class="shader-slider-value" id="val-invert">0%</span>
</div>
<input type="range" class="shader-slider" id="slider-invert" min="0" max="100" step="10" value="0">
</div>
<div class="shader-slider-group">
<div class="shader-slider-row">
<span class="shader-slider-label">Blur</span>
<span class="shader-slider-value" id="val-blur">0px</span>
</div>
<input type="range" class="shader-slider" id="slider-blur" min="0" max="20" step="1" value="0">
</div>
<div class="shader-slider-group">
<div class="shader-slider-row">
<span class="shader-slider-label">Bloom Strength</span>
<span class="shader-slider-value" id="val-bloom">0%</span>
</div>
<input type="range" class="shader-slider" id="slider-bloom" min="0" max="100" step="10" value="0">
</div>
<div class="shader-toggle-row">
<span class="shader-toggle-label">Enable Shadows</span>
<label class="shader-switch">
<input type="checkbox" id="toggle-shadows">
<span class="shader-switch-slider"></span>
</label>
</div>
</div>
<div class="shader-tab-content" id="tab-particles">
<div class="shader-section-title">Menu Background Effects</div>
<div class="shader-select-wrapper">
<select id="particle-type" class="shader-select">
<option value="none">None</option>
<option value="snow">❄️ Snow</option>
<option value="rain">🌧️ Rain</option>
<option value="stardust">✨ Stardust</option>
<option value="sakura">🌸 Sakura</option>
<option value="fireflies">🌟 Fireflies</option>
<option value="matrix">💻 Matrix</option>
<option value="aurora">🌌 Aurora</option>
</select>
</div>
<div class="shader-slider-group">
<div class="shader-slider-row">
<span class="shader-slider-label">Density</span>
<span class="shader-slider-value" id="val-density">60</span>
</div>
<input type="range" class="shader-slider" id="slider-density" min="10" max="200" step="10" value="60">
</div>
<div class="shader-slider-group">
<div class="shader-slider-row">
<span class="shader-slider-label">Speed</span>
<span class="shader-slider-value" id="val-speed">1.0x</span>
</div>
<input type="range" class="shader-slider" id="slider-speed" min="0.3" max="3" step="0.1" value="1.0">
</div>
</div>
</div>
`;
document.body.appendChild(ui);
this.uiElement = ui;
this.injectStyles();
this.attachUIEvents();
this.syncUIToOptions();
}
injectStyles() {
if (document.getElementById('shader-ui-styles')) return;
const style = document.createElement('style');
style.id = 'shader-ui-styles';
style.textContent = `
.shader-ui-panel {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 400px;
max-height: 600px;
z-index: 10000;
background: var(--panel-bg, rgba(20, 20, 20, 0.95));
border: 1px solid rgba(0, 242, 255, 0.4);
border-radius: 8px;
font-family: 'Product Sans', sans-serif;
color: var(--text-color, #ffffff);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 242, 255, 0.1);
overflow: hidden;
backdrop-filter: blur(20px);
}
.shader-ui-header {
display: flex;
justify-content: space-between;
align-items: center;
background: linear-gradient(90deg, #00f2ff 0%, #70e1ff 100%);
padding: 12px 15px;
font-weight: 900;
font-size: 18px;
color: #000;
border-bottom: 2px solid rgba(255, 251, 0, 0.8);
}
.shader-ui-tabs {
display: flex;
background: rgba(0, 0, 0, 0.3);
border-bottom: 1px solid rgba(0, 242, 255, 0.2);
}
.shader-tab {
flex: 1;
padding: 10px;
text-align: center;
font-size: 13px;
font-weight: 600;
color: #888;
cursor: pointer;
transition: all 0.2s;
border-bottom: 2px solid transparent;
}
.shader-tab:hover {
color: #00f2ff;
background: rgba(0, 242, 255, 0.05);
}
.shader-tab.active {
color: #00f2ff;
border-bottom-color: #00f2ff;
background: rgba(0, 242, 255, 0.1);
}
.shader-ui-body {
padding: 15px;
max-height: 480px;
overflow-y: auto;
}
.shader-ui-body::-webkit-scrollbar {
width: 6px;
}
.shader-ui-body::-webkit-scrollbar-track {
background: rgba(0, 0, 0, 0.2);
}
.shader-ui-body::-webkit-scrollbar-thumb {
background: rgba(0, 242, 255, 0.4);
border-radius: 3px;
}
.shader-tab-content {
display: none;
}
.shader-tab-content.active {
display: block;
animation: shaderFadeIn 0.2s ease-out;
}
@keyframes shaderFadeIn {
from { opacity: 0; transform: translateY(-5px); }
to { opacity: 1; transform: translateY(0); }
}
.shader-section-title {
font-size: 11px;
font-weight: 700;
color: rgba(255, 251, 0, 0.9);
text-transform: uppercase;
letter-spacing: 1px;
margin-bottom: 10px;
padding-bottom: 6px;
border-bottom: 1px dashed rgba(0, 242, 255, 0.3);
}
.shader-select-wrapper {
margin-bottom: 15px;
}
.shader-select {
width: 100%;
padding: 10px 12px;
background: rgba(30, 30, 30, 0.9);
border: 1px solid rgba(0, 242, 255, 0.2);
color: #fff;
border-radius: 6px;
font-family: 'Product Sans', sans-serif;
font-size: 12px;
cursor: pointer;
outline: none;
transition: border-color 0.2s;
}
.shader-select:hover,
.shader-select:focus {
border-color: rgba(0, 242, 255, 0.5);
}
.shader-select option {
background: #1a1a1a;
color: #fff;
}
.shader-slider-group {
margin-bottom: 12px;
}
.shader-slider-row {
display: flex;
justify-content: space-between;
margin-bottom: 6px;
}
.shader-slider-label {
font-size: 12px;
font-weight: 400;
color: #ccc;
}
.shader-slider-value {
font-size: 12px;
font-weight: 600;
color: #00f2ff;
}
.shader-slider {
width: 100%;
height: 6px;
-webkit-appearance: none;
appearance: none;
background: rgba(40, 40, 40, 0.9);
border-radius: 3px;
outline: none;
}
.shader-slider::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 14px;
height: 14px;
border-radius: 50%;
background: linear-gradient(135deg, #00f2ff, #70e1ff);
cursor: pointer;
box-shadow: 0 0 8px rgba(0, 242, 255, 0.5);
transition: transform 0.1s;
}
.shader-slider::-webkit-slider-thumb:hover {
transform: scale(1.2);
}
.shader-slider::-moz-range-thumb {
width: 14px;
height: 14px;
border-radius: 50%;
background: linear-gradient(135deg, #00f2ff, #70e1ff);
cursor: pointer;
border: none;
box-shadow: 0 0 8px rgba(0, 242, 255, 0.5);
}
.shader-toggle-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 0;
border-top: 1px solid rgba(255, 255, 255, 0.05);
margin-top: 5px;
}
.shader-toggle-label {
font-size: 12px;
font-weight: 400;
color: #ccc;
}
.shader-switch {
position: relative;
display: inline-block;
width: 40px;
height: 22px;
}
.shader-switch input {
opacity: 0;
width: 0;
height: 0;
}
.shader-switch-slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(40, 40, 40, 0.9);
border-radius: 22px;
transition: all 0.3s;
}
.shader-switch-slider:before {
position: absolute;
content: "";
height: 16px;
width: 16px;
left: 3px;
bottom: 3px;
background: #888;
border-radius: 50%;
transition: all 0.3s;
}
.shader-switch input:checked + .shader-switch-slider {
background: rgba(0, 242, 255, 0.3);
}
.shader-switch input:checked + .shader-switch-slider:before {
transform: translateX(18px);
background: #00f2ff;
box-shadow: 0 0 8px rgba(0, 242, 255, 0.5);
}
.shader-ui-title {
pointer-events: none; /* Prevents text selection when dragging/clicking */
}
#shader-particles {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
pointer-events: none;
z-index: 50;
}
.shader-macos-close {
width: 14px;
height: 14px;
background: #ff5f57;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.15s ease;
position: relative;
box-shadow: inset 0 -1px 1px rgba(0,0,0,0.15);
}
.shader-macos-close:hover {
background: #ff3b30;
transform: scale(1.1);
}
/* The 'x' icon that appears on hover */
.shader-macos-close::before {
content: '×';
position: absolute;
color: rgba(80, 0, 0, 0.9);
font-size: 13px;
font-weight: 900;
line-height: 1;
opacity: 0;
transition: opacity 0.15s ease;
margin-top: -1px;
}
.shader-macos-close:hover::before {
opacity: 1;
}
`;
document.head.appendChild(style);
}
closeUI() {
this.isOpen = false;
if (this.uiElement) {
this.uiElement.style.display = 'none';
}
// Stop the interval checking for canvas, but DO NOT remove the filters.
// The CSS filter stays applied to the canvas even after the loop stops.
this.stopFilterLoop();
this.stopParticles();
}
attachUIEvents() {
const ui = this.uiElement;
if (!ui) return;
ui.querySelector('#shader-close-btn').addEventListener('click', (e) => {
e.stopPropagation();
this.closeUI();
// Update the ClickGUI button state so it doesn't look out of sync
// (The module is technically still "enabled" in the background keeping shaders applied)
});
// Tab switching
ui.querySelectorAll('.shader-tab').forEach(tab => {
tab.addEventListener('click', () => {
ui.querySelectorAll('.shader-tab').forEach(t => t.classList.remove('active'));
ui.querySelectorAll('.shader-tab-content').forEach(c => c.classList.remove('active'));
tab.classList.add('active');
document.getElementById(`tab-${tab.dataset.tab}`).classList.add('active');
});
});
// Select dropdowns
ui.querySelector('#shader-preset').addEventListener('change', (e) => {
this.options["Shader Preset"] = e.target.value;
this.applyFilters();
});
ui.querySelector('#texture-pack').addEventListener('change', (e) => {
this.options["Texture Pack"] = e.target.value;
this.applyFilters();
});
ui.querySelector('#particle-type').addEventListener('change', (e) => {
this.options["Particle Effect"] = e.target.value;
});
// Sliders
const sliders = [
{ id: 'slider-brightness', valId: 'val-brightness', key: 'Brightness', suffix: '%' },
{ id: 'slider-contrast', valId: 'val-contrast', key: 'Contrast', suffix: '%' },
{ id: 'slider-saturation', valId: 'val-saturation', key: 'Saturation', suffix: '%' },
{ id: 'slider-sepia', valId: 'val-sepia', key: 'Sepia', suffix: '%' },
{ id: 'slider-hue', valId: 'val-hue', key: 'Hue Rotate', suffix: '°' },
{ id: 'slider-invert', valId: 'val-invert', key: 'Invert', suffix: '%' },
{ id: 'slider-blur', valId: 'val-blur', key: 'Blur', suffix: 'px' },
{ id: 'slider-bloom', valId: 'val-bloom', key: 'Bloom Strength', suffix: '%' },
{ id: 'slider-density', valId: 'val-density', key: 'Particle Density', suffix: '' },
{ id: 'slider-speed', valId: 'val-speed', key: 'Particle Speed', suffix: 'x', isFloat: true }
];
sliders.forEach(({ id, valId, key, suffix, isFloat }) => {
const slider = ui.querySelector(`#${id}`);
const valDisplay = ui.querySelector(`#${valId}`);
if (slider && valDisplay) {
slider.addEventListener('input', (e) => {
const val = isFloat ? parseFloat(e.target.value) : parseInt(e.target.value);
this.options[key] = val;
valDisplay.textContent = isFloat ? val.toFixed(1) + suffix : val + suffix;
if (['Brightness', 'Contrast', 'Saturation', 'Sepia', 'Hue Rotate', 'Invert', 'Blur', 'Bloom Strength'].includes(key)) {
this.applyFilters();
}
});
}
});
// Toggle
ui.querySelector('#toggle-shadows').addEventListener('change', (e) => {
this.options["Enable Shadows"] = e.target.checked ? "true" : "false";
this.applyFilters();
});
}
syncUIToOptions() {
const ui = this.uiElement;
if (!ui) return;
const opt = this.options;
ui.querySelector('#shader-preset').value = opt["Shader Preset"];
ui.querySelector('#texture-pack').value = opt["Texture Pack"];
ui.querySelector('#particle-type').value = opt["Particle Effect"];
const setSlider = (id, valId, value, suffix, isFloat) => {
const slider = ui.querySelector(`#${id}`);
const valDisplay = ui.querySelector(`#${valId}`);
if (slider) slider.value = value;
if (valDisplay) valDisplay.textContent = isFloat ? parseFloat(value).toFixed(1) + suffix : value + suffix;
};
setSlider('slider-brightness', 'val-brightness', opt.Brightness, '%');
setSlider('slider-contrast', 'val-contrast', opt.Contrast, '%');
setSlider('slider-saturation', 'val-saturation', opt.Saturation, '%');
setSlider('slider-sepia', 'val-sepia', opt.Sepia, '%');
setSlider('slider-hue', 'val-hue', opt["Hue Rotate"], '°');
setSlider('slider-invert', 'val-invert', opt.Invert, '%');
setSlider('slider-blur', 'val-blur', opt.Blur, 'px');
setSlider('slider-bloom', 'val-bloom', opt["Bloom Strength"], '%');
setSlider('slider-density', 'val-density', opt["Particle Density"], '');
setSlider('slider-speed', 'val-speed', opt["Particle Speed"], 'x', true);
ui.querySelector('#toggle-shadows').checked = opt["Enable Shadows"] === "true";
}
toggleUI() {
this.isOpen = !this.isOpen;
if (this.uiElement) {
this.uiElement.style.display = this.isOpen ? 'block' : 'none';
if (this.isOpen) {
this.syncUIToOptions();
}
}
}
onEnable() {
this.createUI();
this.setupParticleSystem();
this.startFilterLoop();
this.toggleUI();
// Hook into ClickGUI button handling
this.setupGUIHook();
}
onDisable() {
this.stopFilterLoop();
this.removeFilters();
this.stopParticles();
if (this.uiElement) {
this.uiElement.remove();
this.uiElement = null;
}
this.isOpen = false;
}
startFilterLoop() {
if (this.filterLoop) clearInterval(this.filterLoop);
this.filterLoop = setInterval(() => {
if (this.isEnabled) {
this.applyFilters();
}
}, 100);
}
stopFilterLoop() {
if (this.filterLoop) {
clearInterval(this.filterLoop);
this.filterLoop = null;
}
}
setupGUIHook() {
// Store reference for external access
window._ZeraShaders = this;
}
// Static method to toggle UI from GUI button click
static toggleFromGUI() {
const instance = window._ZeraShaders;
if (instance) {
if (!instance.isEnabled) {
instance.enable();
} else {
instance.toggleUI();
if (!instance.isOpen) {
instance.disable();
}
}
}
}
}
// --- Module 1: Custom Crosshair ---
class ZCrosshair extends o {
constructor() {
super("CustomCrosshair", "Utils", {
"Preset": "default",
"Size": 1.0,
"CustomURL": ""
});
this.overlay = null;
this.crosshairPresets = {
"default": "background: #fff; width: 4px; height: 4px; border-radius: 50%;",
"dot": "background: #00f2ff; width: 6px; height: 6px; border-radius: 50%; box-shadow: 0 0 5px #00f2ff;",
"cross": "background: transparent; border: 2px solid #fff; width: 10px; height: 10px; box-sizing: border-box;",
"circle": "background: transparent; border: 2px solid #00f2ff; width: 20px; height: 20px; border-radius: 50%; box-shadow: 0 0 5px #00f2ff;",
"t": "background: #fff; width: 4px; height: 14px; border-radius: 2px;"
};
}
onEnable() {
this.createUI();
this.applyCrosshair();
if(this.uiElement) this.uiElement.style.display = "flex";
}
onDisable() {
if(this.overlay) this.overlay.remove();
// Hide UI instead of removing it so it reappears on re-enable
if(this.uiElement) this.uiElement.style.display = "none";
}
applyCrosshair() {
if(!this.overlay) {
this.overlay = document.createElement("div");
this.overlay.className = "zera-crosshair-overlay";
document.body.appendChild(this.overlay);
}
this.overlay.style.cssText = "pointer-events: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 9999;";
if(this.options.Preset === "custom" && this.options.CustomURL) {
this.overlay.style.background = `url('${this.options.CustomURL}') no-repeat center`;
this.overlay.style.backgroundSize = "contain";
this.overlay.style.width = (32 * this.options.Size) + "px";
this.overlay.style.height = (32 * this.options.Size) + "px";
this.overlay.style.border = "none";
this.overlay.style.borderRadius = "0";
} else {
this.overlay.style.backgroundImage = "none";
const style = this.crosshairPresets[this.options.Preset] || this.crosshairPresets["default"];
this.overlay.style.cssText += style;
this.overlay.style.transform = `translate(-50%, -50%) scale(${this.options.Size})`;
}
}
// Helper to update preview without crashing
updatePreview(ui) {
const prev = ui.querySelector("#z-preview-el");
if(!prev) return;
prev.style.cssText = "pointer-events: none; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);";
if(this.options.Preset === "custom" && this.options.CustomURL) {
prev.style.background = `url('${this.options.CustomURL}') no-repeat center`;
prev.style.backgroundSize = "contain";
prev.style.width = (32 * this.options.Size) + "px";
prev.style.height = (32 * this.options.Size) + "px";
} else {
prev.style.backgroundImage = "none";
const style = this.crosshairPresets[this.options.Preset] || "";
prev.style.cssText += style;
prev.style.transform = `translate(-50%, -50%) scale(${this.options.Size})`;
}
}
onSettingUpdate() {
this.applyCrosshair();
if(this.uiElement) {
const pSel = this.uiElement.querySelector("#z-crosshair-preset");
const sIn = this.uiElement.querySelector("#z-crosshair-size");
const uIn = this.uiElement.querySelector("#z-crosshair-url");
if(pSel) pSel.value = this.options.Preset;
if(sIn) sIn.value = this.options.Size;
if(uIn) uIn.value = this.options.CustomURL;
const urlRow = this.uiElement.querySelector("#z-url-row");
if(urlRow) urlRow.style.display = this.options.Preset === "custom" ? "flex" : "none";
this.updatePreview(this.uiElement);
}
}
createUI() {
if(this.uiElement) return;
const ui = document.createElement("div");
ui.className = "zera-modal";
ui.innerHTML = `
<div class="zera-modal-header">
<span>Custom Crosshair</span>
<div class="zera-close-btn"></div>
</div>
<div class="zera-modal-body">
<div class="zera-setting-row">
<span class="zera-label">Preset</span>
<select id="z-crosshair-preset" class="zera-select" style="width: 150px;">
<option value="default">Default</option>
<option value="dot">Neon Dot</option>
<option value="cross">Cross</option>
<option value="circle">Circle</option>
<option value="t">T-Shape</option>
<option value="custom">Custom URL</option>
</select>
</div>
<div class="zera-setting-row" id="z-url-row" style="display:none;">
<span class="zera-label">Image URL</span>
<input type="text" id="z-crosshair-url" class="zera-input" style="width: 150px;">
</div>
<div class="zera-setting-row">
<span class="zera-label">Size</span>
<input type="range" id="z-crosshair-size" min="0.5" max="3" step="0.1" style="width: 150px;">
</div>
<div id="zera-crosshair-preview">
<div id="z-preview-el" class="zera-crosshair-overlay"></div>
</div>
</div>
`;
document.body.appendChild(ui);
this.uiElement = ui;
// Events
ui.querySelector(".zera-close-btn").onclick = () => this.uiElement.style.display = "none";
const updateAndEmit = () => {
this.options.Preset = ui.querySelector("#z-crosshair-preset").value;
this.options.Size = parseFloat(ui.querySelector("#z-crosshair-size").value);
this.options.CustomURL = ui.querySelector("#z-crosshair-url").value;
s.emit("setting.update", this);
this.updatePreview(ui);
};
ui.querySelector("#z-crosshair-preset").onchange = updateAndEmit;
ui.querySelector("#z-crosshair-url").onchange = updateAndEmit;
ui.querySelector("#z-crosshair-size").oninput = updateAndEmit;
// Initial update
this.updatePreview(ui);
}
}
// --- Module 2: Texture Pack ---
class ZTextures extends o {
constructor() {
super("TexturePack", "Utils", {
"Status": "Idle"
});
this.overrides = {};
this.imgDescriptor = Object.getOwnPropertyDescriptor(HTMLImageElement.prototype, 'src');
}
onEnable() {
this.createUI();
this.uiElement.style.display = "flex";
this.injectHook();
}
onDisable() {
if(this.uiElement) this.uiElement.style.display = "none"; // Remove hook (restore original)
Object.defineProperty(HTMLImageElement.prototype, 'src', this.imgDescriptor);
// Reload page to clear textures or force refresh logic (simplest is reload, but we try to just stop override)
location.reload();
}
injectHook() {
const self = this;
Object.defineProperty(HTMLImageElement.prototype, 'src', {
set(val) {
if(self.isEnabled && self.overrides[val]) {
return self.imgDescriptor.set.call(this, self.overrides[val]);
}
return self.imgDescriptor.set.call(this, val);
},
get() { return self.imgDescriptor.get.call(this); }
});
}
onSettingUpdate() {
const s = document.getElementById("z-tex-status");
if(s) s.textContent = this.options.Status;
}
createUI() {
if(this.uiElement) return;
const ui = document.createElement("div");
ui.className = "zera-modal";
ui.innerHTML = `
<div class="zera-modal-header">
<span>Texture Packs</span>
<div class="zera-close-btn"></div>
</div>
<div class="zera-modal-body">
<div class="zera-setting-row">
<span class="zera-label">Upload .txt</span>
<input type="file" id="z-tex-file" accept=".txt" class="zera-input">
</div>
<div class="zera-setting-row">
<span class="zera-label">Status</span>
<span id="z-tex-status" style="color: #00f2ff; font-weight:bold;">Idle</span>
</div>
<div style="margin-top: 20px; font-size: 12px; color: #888; line-height: 1.4;">
Format: OriginalURL > DataURL<br>
One mapping per line.
</div>
</div>
`;
document.body.appendChild(ui);
this.uiElement = ui;
ui.querySelector(".zera-close-btn").onclick = () => this.uiElement.style.display = "none";
ui.querySelector("#z-tex-file").onchange = (e) => {
const file = e.target.files[0];
if(!file) return;
this.options.Status = "Loading...";
s.emit("setting.update", this);
const reader = new FileReader();
reader.onload = (ev) => {
const lines = ev.target.result.split('\n');
let count = 0;
lines.forEach(l => {
const [orig, data] = l.split('>');
if(orig && data) {
this.overrides[orig.trim()] = data.trim();
count++;
}
});
this.options.Status = `Loaded ${count} textures. Reloading...`;
s.emit("setting.update", this);
setTimeout(() => location.reload(), 1000);
};
reader.readAsText(file);
};
}
}
// --- Module 3: Keystrokes ---
class ZKeystrokes extends o {
constructor() {
super("Keystrokes", "Utils", {
"Layout": "wasd",
"Theme": "cyan",
"Scale": 1.0,
"ShowCPS": true
});
this.el = null;
this.keys = {};
this.cps = { l: 0, r: 0, clicks: [] };
}
onEnable() {
this.createUI();
this.buildDOM();
this.uiElement.style.display = "flex";
this.addListeners();
}
onDisable() {
if(this.el) this.el.remove();
// Changed .remove() to .style.display = "none"
if(this.uiElement) this.uiElement.style.display = "none";
this.removeListeners();
}
onRender() {
if(!this.el) return;
const now = Date.now();
while(this.cps.clicks.length && this.cps.clicks[0] < now - 1000) this.cps.clicks.shift();
const l = this.cps.clicks.filter(c => c.button === 0).length;
const r = this.cps.clicks.filter(c => c.button === 2).length;
const lEl = this.el.querySelector('[data-key="LMB"] .zera-cps-text');
const rEl = this.el.querySelector('[data-key="RMB"] .zera-cps-text');
if(lEl) lEl.textContent = l;
if(rEl) rEl.textContent = r;
}
addListeners() {
this.keyDown = (e) => {
const k = this.el.querySelector(`[data-code="${e.code}"]`);
if(k) k.classList.add('active');
};
this.keyUp = (e) => {
const k = this.el.querySelector(`[data-code="${e.code}"]`);
if(k) k.classList.remove('active');
};
this.mouseDown = (e) => {
const k = this.el.querySelector(`[data-key="${e.button === 0 ? 'LMB' : 'RMB'}"]`);
if(k) k.classList.add('active');
this.cps.clicks.push({ time: Date.now(), button: e.button });
};
this.mouseUp = (e) => {
const k = this.el.querySelector(`[data-key="${e.button === 0 ? 'LMB' : 'RMB'}"]`);
if(k) k.classList.remove('active');
};
document.addEventListener('keydown', this.keyDown);
document.addEventListener('keyup', this.keyUp);
document.addEventListener('mousedown', this.mouseDown);
document.addEventListener('mouseup', this.mouseUp);
}
removeListeners() {
document.removeEventListener('keydown', this.keyDown);
document.removeEventListener('keyup', this.keyUp);
document.removeEventListener('mousedown', this.mouseDown);
document.removeEventListener('mouseup', this.mouseUp);
}
buildDOM() {
if(this.el) this.el.remove();
this.el = document.createElement("div");
this.el.className = "zera-keystrokes";
const layouts = {
"wasd": `
<div class="zera-key-row"><div class="zera-key" data-code="KeyW">W</div></div>
<div class="zera-key-row">
<div class="zera-key" data-code="KeyA">A</div>
<div class="zera-key" data-code="KeyS">S</div>
<div class="zera-key" data-code="KeyD">D</div>
</div>
<div class="zera-key-row">
<div class="zera-key wide" data-key="LMB"><span>LMB</span><span class="zera-cps-text">0</span></div>
<div class="zera-key wide" data-key="RMB"><span>RMB</span><span class="zera-cps-text">0</span></div>
</div>
`,
"compact": `
<div class="zera-key-row">
<div class="zera-key" data-code="KeyW">W</div>
</div>
<div class="zera-key-row">
<div class="zera-key" data-code="KeyA">A</div>
<div class="zera-key" data-code="KeyS">S</div>
<div class="zera-key" data-code="KeyD">D</div>
</div>
`
};
this.el.innerHTML = layouts[this.options.Layout] || layouts["wasd"];
document.body.appendChild(this.el);
// Apply styles
this.el.style.transform = `scale(${this.options.Scale})`;
// Apply Theme
if(this.options.Theme === "cyan") {
this.el.querySelectorAll('.zera-key').forEach(k => {
k.style.borderColor = "rgba(0, 242, 255, 0.3)";
});
} else if (this.options.Theme === "yellow") {
this.el.querySelectorAll('.zera-key').forEach(k => {
k.style.borderColor = "rgba(255, 251, 0, 0.3)";
k.classList.add('active'); // hack to force style check
});
}
// Show/Hide CPS
const cpsEls = this.el.querySelectorAll('.zera-cps-text');
cpsEls.forEach(e => e.style.display = this.options.ShowCPS ? 'block' : 'none');
}
onSettingUpdate() {
this.buildDOM();
const pSel = this.uiElement.querySelector("#z-key-layout");
const tSel = this.uiElement.querySelector("#z-key-theme");
const sRng = this.uiElement.querySelector("#z-key-scale");
const cChk = this.uiElement.querySelector("#z-key-cps");
if(pSel) pSel.value = this.options.Layout;
if(tSel) tSel.value = this.options.Theme;
if(sRng) sRng.value = this.options.Scale;
if(cChk) cChk.checked = this.options.ShowCPS;
}
createUI() {
if(this.uiElement) return;
const ui = document.createElement("div");
ui.className = "zera-modal";
ui.innerHTML = `
<div class="zera-modal-header">
<span>Keystrokes</span>
<div class="zera-close-btn"></div>
</div>
<div class="zera-modal-body">
<div class="zera-setting-row">
<span class="zera-label">Layout</span>
<select id="z-key-layout" class="zera-select">
<option value="wasd">WASD + Mouse</option>
<option value="compact">Compact</option>
</select>
</div>
<div class="zera-setting-row">
<span class="zera-label">Theme</span>
<select id="z-key-theme" class="zera-select">
<option value="cyan">Zera Cyan</option>
<option value="yellow">Zera Yellow</option>
<option value="dark">Dark</option>
</select>
</div>
<div class="zera-setting-row">
<span class="zera-label">Scale</span>
<input type="range" id="z-key-scale" min="0.5" max="2" step="0.1">
</div>
<div class="zera-setting-row">
<span class="zera-label">Show CPS</span>
<input type="checkbox" id="z-key-cps">
</div>
</div>
`;
document.body.appendChild(ui);
this.uiElement = ui;
ui.querySelector(".zera-close-btn").onclick = () => this.uiElement.style.display = "none";
ui.querySelector("#z-key-layout").onchange = (e) => { this.options.Layout = e.target.value; s.emit("setting.update", this); };
ui.querySelector("#z-key-theme").onchange = (e) => { this.options.Theme = e.target.value; s.emit("setting.update", this); };
ui.querySelector("#z-key-scale").oninput = (e) => { this.options.Scale = parseFloat(e.target.value); s.emit("setting.update", this); };
ui.querySelector("#z-key-cps").onchange = (e) => { this.options.ShowCPS = e.target.checked; s.emit("setting.update", this); };
}
}
// --- Module 4: Zoom ---
class ZZoom extends o {
constructor() {
super("Zoom", "Utils", {
"Level": 2.0,
"Key": "KeyC"
});
this.zooming = false;
this.ogFov = 70;
}
onEnable() {
this.createUI();
this.uiElement.style.display = "flex";
this.keyHandler = (e) => {
if(e.code === this.options.Key) {
if(e.type === 'keydown') this.zooming = true;
if(e.type === 'keyup') this.zooming = false;
}
};
document.addEventListener('keydown', this.keyHandler);
document.addEventListener('keyup', this.keyHandler);
}
onDisable() {
if(this.uiElement) this.uiElement.style.display = "none";
document.removeEventListener('keydown', this.keyHandler);
document.removeEventListener('keyup', this.keyHandler);
// Reset FOV
if(a?.gameWorld?.threeScene?.camera) {
a.gameWorld.threeScene.camera.fov = 70;
a.gameWorld.threeScene.camera.updateProjectionMatrix();
}
}
onRender() {
if(!a?.gameWorld?.threeScene?.camera) return;
const cam = a.gameWorld.threeScene.camera;
if(this.zooming) {
if(cam.fov !== 70 / this.options.Level) {
cam.fov = 70 / this.options.Level;
cam.updateProjectionMatrix();
}
} else {
if(cam.fov !== 70) {
cam.fov = 70;
cam.updateProjectionMatrix();
}
}
}
onSettingUpdate() {
const lRng = this.uiElement.querySelector("#z-zoom-level");
const kIn = this.uiElement.querySelector("#z-zoom-key");
if(lRng) lRng.value = this.options.Level;
if(kIn) kIn.value = this.options.Key.replace("Key", "");
}
createUI() {
if(this.uiElement) return;
const ui = document.createElement("div");
ui.className = "zera-modal";
ui.innerHTML = `
<div class="zera-modal-header">
<span>Zoom</span>
<div class="zera-close-btn"></div>
</div>
<div class="zera-modal-body">
<div class="zera-setting-row">
<span class="zera-label">Zoom Level</span>
<input type="range" id="z-zoom-level" min="1.1" max="5" step="0.1" style="width: 150px;">
</div>
<div class="zera-setting-row">
<span class="zera-label">Keybind</span>
<input type="text" id="z-zoom-key" class="zera-input" style="width: 50px; text-transform:uppercase;" maxlength="1">
</div>
<div style="font-size:12px; color:#888; margin-top:10px;">Hold key to zoom.</div>
</div>
`;
document.body.appendChild(ui);
this.uiElement = ui;
ui.querySelector(".zera-close-btn").onclick = () => this.uiElement.style.display = "none";
ui.querySelector("#z-zoom-level").oninput = (e) => { this.options.Level = parseFloat(e.target.value); s.emit("setting.update", this); };
let waiting = false;
ui.querySelector("#z-zoom-key").onkeydown = (e) => {
e.preventDefault();
this.options.Key = e.code;
s.emit("setting.update", this);
e.target.value = e.key.toUpperCase();
waiting = false;
};
ui.querySelector("#z-zoom-key").onclick = (e) => {
if(!waiting) {
e.target.value = "...";
waiting = true;
}
};
}
}
// --- Module 5: The War Utils ---
class ZWarUtils extends o {
constructor() {
super("WarUtils", "Utils", {
"ShowKD": true
});
this.display = null;
}
onEnable() {
this.createUI();
this.uiElement.style.display = "flex";
}
onDisable() {
if(this.uiElement) this.uiElement.style.display = "none";
if(this.display) this.display.remove();
}
onRender() {
if(!this.options.ShowKD) {
if(this.display) this.display.style.display = "none";
return;
}
if(!a?.gameWorld?.server?.players) return;
// Find stats container in MineFun DOM (Selector depends on version, assuming generic .stats)
const stats = document.querySelector(".stats");
if(!stats) return;
if(!this.display) {
this.display = document.createElement("div");
this.display.className = "zera-kd-display";
this.display.textContent = "K/D: 0.0";
stats.appendChild(this.display);
}
this.display.style.display = "block";
// Calculate K/D (Client side estimation from scoreboard if possible, or local stats)
// MineFun doesn't easily expose total K/D in gameState, so we'll mock a logic or use local session if available
// For this implementation, we'll just keep it visual or hook into a specific stat element if found
const kEl = document.querySelector(".kill-icon")?.parentElement;
const dEl = document.querySelector(".death-icon")?.parentElement;
if(kEl && dEl) {
const k = parseInt(kEl.textContent) || 0;
const d = parseInt(dEl.textContent) || 0;
const kd = d === 0 ? k : (k/d).toFixed(2);
this.display.textContent = `K/D: ${kd}`;
}
}
onSettingUpdate() {
const chk = this.uiElement.querySelector("#z-war-kd");
if(chk) chk.checked = this.options.ShowKD;
}
createUI() {
if(this.uiElement) return;
const ui = document.createElement("div");
ui.className = "zera-modal";
ui.innerHTML = `
<div class="zera-modal-header">
<span>The War Utils</span>
<div class="zera-close-btn"></div>
</div>
<div class="zera-modal-body">
<div class="zera-setting-row">
<span class="zera-label">Show K/D Indicator</span>
<input type="checkbox" id="z-war-kd">
</div>
</div>
`;
document.body.appendChild(ui);
this.uiElement = ui;
ui.querySelector(".zera-close-btn").onclick = () => this.uiElement.style.display = "none";
ui.querySelector("#z-war-kd").onchange = (e) => { this.options.ShowKD = e.target.checked; s.emit("setting.update", this); };
}
}
// --- Module 6: Damage Vignette ---
class ZVignette extends o {
constructor() {
super("DamageVignette", "Utils", {
"Color": "#ff0000"
});
this.styleEl = null;
}
onEnable() {
this.createUI();
this.uiElement.style.display = "flex";
this.applyStyle();
}
onDisable() {
if(this.uiElement) this.uiElement.style.display = "none";
if(this.styleEl) this.styleEl.remove();
}
applyStyle() {
if(this.styleEl) this.styleEl.remove();
this.styleEl = document.createElement("style");
// Converts Hex to RGB for rgba usage
const hex = this.options.Color;
const r = parseInt(hex.slice(1,3), 16);
const g = parseInt(hex.slice(3,5), 16);
const b = parseInt(hex.slice(5,7), 16);
this.styleEl.textContent = `
.hp-hit {
background: radial-gradient(circle, transparent 50%, rgba(${r},${g},${b},0.4) 100%) !important;
}
`;
document.head.appendChild(this.styleEl);
}
onSettingUpdate() {
const p = this.uiElement.querySelector("#z-vig-color");
if(p) p.value = this.options.Color;
this.applyStyle();
}
createUI() {
if(this.uiElement) return;
const ui = document.createElement("div");
ui.className = "zera-modal";
ui.innerHTML = `
<div class="zera-modal-header">
<span>Damage Vignette</span>
<div class="zera-close-btn"></div>
</div>
<div class="zera-modal-body">
<div class="zera-setting-row">
<span class="zera-label">Color</span>
<input type="color" id="z-vig-color" style="height:30px; width:50px; border:none; background:none;">
</div>
</div>
`;
document.body.appendChild(ui);
this.uiElement = ui;
ui.querySelector(".zera-close-btn").onclick = () => this.uiElement.style.display = "none";
ui.querySelector("#z-vig-color").onchange = (e) => { this.options.Color = e.target.value; s.emit("setting.update", this); };
}
}
// --- Module 7: Better Chests (No UI) ---
class ZBetterChests extends o {
constructor() {
super("BetterChests", "Utils");
}
onEnable() {
// Initial application
this.updateChests();
}
onDisable() {
// Remove styles
document.querySelectorAll(".zera-chest-boost").forEach(el => {
el.classList.remove("zera-chest-boost");
el.style.boxShadow = "";
el.style.border = "";
});
}
onRender() {
if(this.isEnabled) this.updateChests();
}
updateChests() {
// Check for chest elements. In MineFun, chests are typically .chest or generic UI panels.
// This is a generic visual enhancer for UI panels that look like inventories.
document.querySelectorAll(".chest, .inventory-panel").forEach(el => {
if(!el.classList.contains("zera-chest-boost")) {
el.classList.add("zera-chest-boost");
}
});
}
}
const ee = {
modules: {},
addModules: function(...e) {
for (const t of e) {
let e = new t;
this.modules[e.name] = e
}
},
addModule: function(e) {
this.modules[e.name] = e
},
handleKeyPress: function(e) {
for (let t in this.modules) {
let n = this.modules[t];
n.waitingForBind ? (n.keybind = e, n.waitingForBind = !1) : n.keybind == e && n.toggle()
}
},
init() {
this.addModules(i, r, k, M, W, w, _, P, I, Y, B, A, T, N, R, O, L, F, H, U, K, V, G, q, Q, Z, $, X, J, MagicWandPaste,Treeclean,minestone, duper, dupetroll, FreeMinebucks,FreeSpins,KnockbackDisabler,Disabler,HitAllModule,TeleportModule,HitModule,GhostMode, NoFog, ChatTranslator, CleanScreen, FpsBoost,ZeraHUD, Shaders,ZCrosshair,ZTextures,ZKeystrokes,ZZoom,ZWarUtils,ZVignette,ZBetterChests), s.on("render", (() => {
for (let e in this.modules) this.modules[e].isEnabled && this.modules[e].onRender()
})), s.on("keydown", this.handleKeyPress.bind(this)), s.on("setting.update", (() => {
for (let e in this.modules) this.modules[e].isEnabled && this.modules[e].onSettingUpdate()
})),this.modules.Arraylist.enable(), this.modules.Watermark.enable()
}
};
window.ZeraMine = new class {
constructor() {
this.version = "1.0.0", this.init()
}
init() {
setInterval((() => {
s.emit("render")
}), 1e3 / 60), document.addEventListener("keydown", (e => {
s.emit("keydown", e.code)
})), ee.init(), j.init(), this.packets = j, this.moduleManager = ee, this.hooks = a
}
disable() {}
}
})();