Advanced Mod Menu for Minefun. Press ',' to open.
// ==UserScript==
// @name Minefun.io Ultimate Client vp
// @namespace http://tampermonkey.net/
// @version 3.0.1
// @description Advanced Mod Menu for Minefun. Press ',' to open.
// @author Minefun Modder
// @match *://*.minefun.io/*
// @match *://minefun.io/*
// @grant none
// @run-at document-start
// ==/UserScript==
(function () {
'use strict';
// ==========================================
// CORE SYSTEM & SETTINGS
// ==========================================
const Client = {
name: "MINEFUN VIP CLIENT",
version: "v3.0.1",
prefix: "[VIP]",
menuOpen: false,
toggleKey: ',',
modules: [],
categories: ['Combat', 'Movement', 'Visuals', 'Player', 'World'],
// Không còn can thiệp WebSocket của game
hooks: {
ws: null,
send: null,
onmessage: null
},
player: {
x: 0,
y: 0,
z: 0,
id: null,
health: 100
},
entities: new Map()
};
// ==========================================
// MODULE REGISTRY SYSTEM
// ==========================================
class Module {
constructor(name, category, description, defaultValue = false) {
this.name = name;
this.category = category;
this.description = description;
this.enabled = defaultValue;
Client.modules.push(this);
}
toggle() {
this.enabled = !this.enabled;
this.onToggle();
saveConfig();
}
onToggle() {}
onTick() {}
onRender() {}
onPacketSend(packet) { return packet; }
onPacketReceive(packet) { return packet; }
}
// ==========================================
// COMBAT MODULES
// ==========================================
const KillAura = new Module(
"Kill Aura",
"Combat",
"Automatically attacks entities around you."
);
KillAura.onTick = function () {
if (!this.enabled) return;
Client.entities.forEach(entity => {
if (entity.distance < 5.0 && entity.isAlive) {
sendPacket({
type: "attack",
targetId: entity.id
});
}
});
};
const Aimbot = new Module(
"Aimbot",
"Combat",
"Snaps your camera to the nearest enemy."
);
const AutoArmor = new Module(
"Auto Armor",
"Combat",
"Automatically equips the best armor in inventory."
);
const AntiKnockback = new Module(
"Velocity",
"Combat",
"Prevents taking knockback from hits.",
true
);
const Criticals = new Module(
"Criticals",
"Combat",
"Forces critical hits on every attack."
);
const Reach = new Module(
"Reach",
"Combat",
"Extends your attack range up to 6 blocks."
);
// ==========================================
// MOVEMENT MODULES
// ==========================================
const Speed = new Module(
"Speed Hack",
"Movement",
"Increases movement speed significantly."
);
Speed.onTick = function () {
if (!this.enabled) return;
// Logic tăng tốc độ gửi packet di chuyển
};
const Fly = new Module(
"Fly",
"Movement",
"Allows you to fly freely in survival."
);
const Jesus = new Module(
"Jesus",
"Movement",
"Walk on water and lava."
);
const Spider = new Module(
"Spider",
"Movement",
"Climb walls like a spider."
);
const Step = new Module(
"Step",
"Movement",
"Instantly step up full blocks."
);
const NoFall = new Module(
"No Fall",
"Movement",
"Prevents taking fall damage."
);
const Phase = new Module(
"Phase",
"Movement",
"Walk through solid blocks (Wallhack movement)."
);
// ==========================================
// VISUAL MODULES
// ==========================================
const ESP = new Module(
"ESP / Wallhack",
"Visuals",
"See players and entities through walls."
);
const Tracers = new Module(
"Tracers",
"Visuals",
"Draws lines to other players."
);
const Fullbright = new Module(
"Fullbright",
"Visuals",
"Makes everything completely bright."
);
const Chams = new Module(
"Chams",
"Visuals",
"Renders players with bright colors visible anywhere."
);
const XRay = new Module(
"X-Ray",
"Visuals",
"Hides useless blocks to show ores and bases."
);
// ==========================================
// PLAYER MODULES
// ==========================================
const AutoHeal = new Module(
"Auto Heal",
"Player",
"Automatically consumes food/potions when low HP."
);
const FastBreak = new Module(
"Fast Break",
"Player",
"Break blocks instantly."
);
const Invincibility = new Module(
"God Mode",
"Player",
"Exploits server sync to prevent taking damage."
);
const AutoRespawn = new Module(
"Auto Respawn",
"Player",
"Instantly respawns upon death."
);
const Top1InstaWin = new Module(
"1s Top 1 Mode",
"Player",
"Sends massive score packets (Depends on mode)."
);
// ==========================================
// WORLD MODULES
// ==========================================
const Nuke = new Module(
"Nuke",
"World",
"Breaks all blocks around you instantly."
);
const AutoBuild = new Module(
"Auto Build",
"World",
"Scaffolds blocks under you as you walk."
);
const WeatherClear = new Module(
"Clear Weather",
"World",
"Forces weather to be sunny client-side."
);
// ==========================================
// CONFIGURATION SAVING
// ==========================================
function saveConfig() {
const config = {};
Client.modules.forEach(m => {
config[m.name] = m.enabled;
});
try {
localStorage.setItem(
"MinefunClient_Config",
JSON.stringify(config)
);
} catch (e) {
console.warn("[VIP] Could not save config:", e);
}
}
function loadConfig() {
let saved = null;
try {
saved = localStorage.getItem("MinefunClient_Config");
} catch (e) {
return;
}
if (!saved) return;
try {
const config = JSON.parse(saved);
Client.modules.forEach(m => {
if (config[m.name] !== undefined) {
m.enabled = !!config[m.name];
}
});
} catch (e) {
console.warn("[VIP] Could not load config:", e);
}
}
// ==========================================
// PACKET PLACEHOLDER
// ==========================================
function sendPacket(packet) {
/*
* WebSocket interception đã được bỏ để tránh
* làm game không kết nối / không vào được.
*
* Hàm giữ lại để các module không gây lỗi
* khi gọi sendPacket().
*/
return packet;
}
// ==========================================
// ADVANCED UI INJECTION
// ==========================================
const uiStyles = `
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;700&display=swap');
#vip-client-gui {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 700px;
height: 480px;
background: rgba(15, 15, 20, 0.95);
border: 2px solid #ff0055;
border-radius: 12px;
box-shadow:
0 0 25px rgba(255, 0, 85, 0.4),
inset 0 0 10px rgba(0, 0, 0, 0.8);
z-index: 2147483647;
font-family: 'Rajdhani', sans-serif;
color: #fff;
display: none;
user-select: none;
overflow: hidden;
backdrop-filter: blur(5px);
}
#vip-header {
background: linear-gradient(
90deg,
#ff0055 0%,
#aa00ff 100%
);
padding: 15px;
text-align: center;
font-size: 24px;
font-weight: bold;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
border-bottom: 2px solid rgba(255,255,255,0.1);
letter-spacing: 2px;
}
#vip-body {
display: flex;
height: calc(100% - 60px);
}
#vip-sidebar {
width: 180px;
background: rgba(0, 0, 0, 0.4);
border-right: 1px solid rgba(255,255,255,0.1);
display: flex;
flex-direction: column;
padding: 10px 0;
}
.vip-tab {
padding: 15px 20px;
cursor: pointer;
font-size: 18px;
transition: 0.3s all;
border-left: 3px solid transparent;
}
.vip-tab:hover {
background: rgba(255, 0, 85, 0.2);
padding-left: 25px;
}
.vip-tab.active {
background: rgba(255, 0, 85, 0.3);
border-left: 3px solid #ff0055;
color: #ff0055;
text-shadow: 0 0 10px #ff0055;
}
#vip-content {
flex-grow: 1;
padding: 20px;
overflow-y: auto;
}
.module-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 15px;
display: none;
}
.module-grid.active {
display: grid;
}
.module-btn {
background: rgba(30, 30, 40, 0.8);
border: 1px solid rgba(255,255,255,0.1);
padding: 15px;
border-radius: 8px;
cursor: pointer;
transition: 0.2s;
position: relative;
overflow: hidden;
}
.module-btn:hover {
border-color: rgba(255, 255, 255, 0.3);
transform: translateY(-2px);
}
.module-btn.enabled {
background: rgba(255, 0, 85, 0.15);
border: 1px solid #ff0055;
box-shadow: 0 0 15px rgba(255, 0, 85, 0.2);
}
.module-title {
font-size: 18px;
font-weight: bold;
margin-bottom: 5px;
color: #aaa;
}
.module-btn.enabled .module-title {
color: #ff0055;
text-shadow: 0 0 5px rgba(255, 0, 85, 0.5);
}
.module-desc {
font-size: 13px;
color: #888;
line-height: 1.2;
}
.status-indicator {
position: absolute;
top: 15px;
right: 15px;
width: 10px;
height: 10px;
border-radius: 50%;
background: #444;
}
.module-btn.enabled .status-indicator {
background: #ff0055;
box-shadow: 0 0 8px #ff0055;
}
::-webkit-scrollbar {
width: 6px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: #ff0055;
border-radius: 3px;
}
`;
// ==========================================
// BUILD UI
// ==========================================
let uiBuilt = false;
function buildUI() {
if (uiBuilt) return;
if (!document.head || !document.body) {
return;
}
if (document.getElementById('vip-client-gui')) {
uiBuilt = true;
return;
}
const style = document.createElement('style');
style.id = 'vip-client-style';
style.textContent = uiStyles;
document.head.appendChild(style);
const gui = document.createElement('div');
gui.id = 'vip-client-gui';
let html = `
<div id="vip-header">
${Client.name}
</div>
<div id="vip-body">
<div id="vip-sidebar">
${Client.categories.map((cat, i) => `
<div
class="vip-tab ${i === 0 ? 'active' : ''}"
data-cat="${cat}"
>
${cat}
</div>
`).join('')}
</div>
<div id="vip-content">
${Client.categories.map((cat, i) => `
<div
class="module-grid ${i === 0 ? 'active' : ''}"
id="grid-${cat}"
>
${Client.modules
.filter(m => m.category === cat)
.map(m => `
<div
class="module-btn ${m.enabled ? 'enabled' : ''}"
data-mod="${m.name}"
>
<div class="status-indicator"></div>
<div class="module-title">
${m.name}
</div>
<div class="module-desc">
${m.description}
</div>
</div>
`)
.join('')}
</div>
`).join('')}
</div>
</div>
`;
gui.innerHTML = html;
document.body.appendChild(gui);
// ==========================================
// TAB EVENTS
// ==========================================
gui.querySelectorAll('.vip-tab').forEach(tab => {
tab.addEventListener('click', () => {
gui.querySelectorAll('.vip-tab')
.forEach(t => t.classList.remove('active'));
gui.querySelectorAll('.module-grid')
.forEach(g => g.classList.remove('active'));
tab.classList.add('active');
const target =
gui.querySelector(`#grid-${tab.dataset.cat}`);
if (target) {
target.classList.add('active');
}
});
});
// ==========================================
// MODULE EVENTS
// ==========================================
gui.querySelectorAll('.module-btn').forEach(btn => {
btn.addEventListener('click', () => {
const modName = btn.dataset.mod;
const mod = Client.modules.find(
m => m.name === modName
);
if (!mod) return;
mod.toggle();
if (mod.enabled) {
btn.classList.add('enabled');
} else {
btn.classList.remove('enabled');
}
});
});
uiBuilt = true;
}
// ==========================================
// GAME LOOP
// ==========================================
function gameLoop() {
requestAnimationFrame(gameLoop);
Client.modules.forEach(m => {
if (!m.enabled) return;
try {
m.onTick();
m.onRender();
} catch (err) {
console.warn(
`[VIP] Module error: ${m.name}`,
err
);
}
});
}
// ==========================================
// INITIALIZATION & KEYBINDS
// ==========================================
function init() {
console.log(
`%c[${Client.name}] Injecting...`,
'color: #ff0055; font-size: 20px; font-weight: bold;'
);
loadConfig();
// ------------------------------------------
// Đợi DOM/body tồn tại
// ------------------------------------------
const startUI = () => {
try {
if (!document.getElementById('vip-client-gui')) {
buildUI();
}
} catch (err) {
console.error('[VIP] UI error:', err);
}
};
if (document.readyState === 'loading') {
document.addEventListener(
'DOMContentLoaded',
startUI,
{ once: true }
);
} else {
startUI();
}
// ------------------------------------------
// Không thay window.WebSocket
// ------------------------------------------
gameLoop();
// ------------------------------------------
// PHÍM ,
// Capture phase = true
// ------------------------------------------
window.addEventListener(
'keydown',
(e) => {
if (e.repeat) return;
const isComma =
e.key === ',' ||
e.code === 'Comma';
if (!isComma) return;
// Nếu menu chưa tồn tại thì tạo lại
let gui =
document.getElementById('vip-client-gui');
if (!gui) {
try {
buildUI();
gui =
document.getElementById(
'vip-client-gui'
);
} catch (err) {
console.error(
'[VIP] Failed to build UI:',
err
);
return;
}
}
if (!gui) return;
Client.menuOpen =
!Client.menuOpen;
gui.style.display =
Client.menuOpen
? 'block'
: 'none';
// Cho game không nhận dấu ,
e.stopPropagation();
},
true
);
console.log(
`%c[${Client.name}] Loaded successfully! Press ',' to open menu.`,
'color: #00ffcc; font-size: 16px;'
);
}
// ==========================================
// START
// ==========================================
init();
})();