-
Notifications
You must be signed in to change notification settings - Fork 4
Script Manager
Warning
BEFORE using this, please note, that (currently) all code is executed through eval, which means if the Miniblox site or Impact client can do something, the script can too
(e.g. loading scripts that grabs your session_v1 token from localStorage and sends it off to a webhook, maybe to use in some botting or account takeover)
Let us know if you know of ways to sandbox JS code without hassle (try to avoid using iframes).
Converting the JS code into some intermediate bytecode that is then interpreted is an option, but is an annoying option.
Script Manager allows you to load and manage custom scripts in Impact for Miniblox. Scripts are executed in the same scope as the main client, giving them full access to all modules, functions, and variables.
- Press
\(Backslash) to open ClickGUI - Click
Misccategory - Toggle
ScriptManager
Type .scriptmanager in chat
- Click "📁 Load File"
- Select a
.jsfile from your computer - The script will be loaded and executed immediately
- Any modules created will appear in the
Scriptscategory in ClickGUI
- Click "🌐 Load URL"
- Enter the URL of a JavaScript file
- The script will be fetched and executed
- Click "✏️ Write Code"
- Enter a script name (this is just for identification)
- Write your code in the editor
- Click "Save & Load"
- Click the 📋 button next to a script
- Creates a copy with
-2,-3, etc. appended to the name - Useful for testing variations
- Click the 🗑️ button next to a script
- Confirms before deletion
- Removes all modules created by the script
- Clears saved data from LocalStorage
Scripts are executed using eval() in the same scope as the main client. This means you have direct access to all variables and functions.
new Module("MyModule", function(enabled) {
if (enabled) {
console.log("Module enabled!");
} else {
console.log("Module disabled!");
}
});new Module("TickModule", function(enabled) {
if (enabled) {
tickLoop["TickModule"] = function() {
if (player) {
console.log("Player position:", player.pos);
}
};
} else {
delete tickLoop["TickModule"];
}
});let jumpHeight, autoJump, message;
const myModule = new Module("ConfigurableModule", function(enabled) {
if (enabled) {
tickLoop["ConfigurableModule"] = function() {
if (player && autoJump[1]) {
player.motion.y = jumpHeight[1];
}
};
} else {
delete tickLoop["ConfigurableModule"];
}
});
jumpHeight = myModule.addoption("JumpHeight", Number, 0.42);
autoJump = myModule.addoption("AutoJump", Boolean, true);
message = myModule.addoption("Message", String, "Hello");Since scripts run in the same scope, you have access to everything:
-
Module- Module class constructor -
modules- Object containing all modules -
enabledModules- Object containing enabled modules -
tickLoop- Object for tick-based loops (runs every game tick) -
renderTickLoop- Object for render-based loops (runs every frame) -
keybindCallbacks- Object for keybind callbacks
-
player- Player entity -
game- Game instance -
ClientSocket- Network socket for sending packets
-
keyPressedDump(key)- Check if a key is pressed (e.g., "space", "shift") -
getMoveDirection(speed)- Gets the player's normalized movement direction from the input and multiplies it byspeed -
getModule(name)- Get a module by name -
rayTraceBlocks(start, end, ...)- Ray trace for blocks
-
BlockPos- Block position class -
Vector3$1- Vector3 class -
Materials- Block materials -
EnumFacing- Direction enum -
BlockAir- Air block class
-
SPacketMessage- Chat message packet -
SPacketClick- Click packet -
SPacketBreakBlock- Break block packet -
SPacketUseEntity- Use entity packet -
SPacketUseItem- Use item packet -
SPacketPlayerAction- Player action packet -
SPacketPlayerPosLook- Position/look packet - And many more...
-
ItemSword,ItemArmor,ItemBlock,ItemTool,ItemAppleGold EntityPlayer-
Items- All items -
Enchantments- All enchantments
-
playerControllerMP- Player controller -
hud3D- 3D HUD -
friends- Friends list array -
VERSION- The clients version
- Scripts are automatically saved to LocalStorage
- They will be loaded automatically on the next startup (by reload)
- Deleting a script removes it from storage
- Modules created by scripts appear in the
Scriptscategory in ClickGUI
Always clean up in the disable function:
new Module("MyModule", function(enabled) {
if (enabled) {
tickLoop["MyModule"] = function() {
// Your code
};
} else {
delete tickLoop["MyModule"]; // Important!
}
});Player and game might not be available immediately:
tickLoop["MyModule"] = function() {
if (!player || !game) return;
// Your code
};new Module("MyVisual", function(enabled) {
if (enabled) {
renderTickLoop["MyVisual"] = function() {
// Runs every frame
};
} else {
delete renderTickLoop["MyVisual"];
}
});- Check browser console (F12/CTRL + SHIFT + I) for errors
- Verify that your syntax is correct
- Make sure you're creating a
new Module(...)
- Check if the module was created successfully
- Look in the
Scriptscategory - Reload the page and try again
- Read the error message in the alert dialog
- Check console for detailed error with line numbers
- Fix these syntax errors and reload the script
// Variables for options
let speed, jumpHeight, autoJump;
// Create the module
const myModule = new Module("CustomFly", function(enabled) {
if (enabled) {
console.log("CustomFly enabled!");
tickLoop["CustomFly"] = function() {
// Check if player exists
if (!player) return;
// Get movement direction
const dir = getMoveDirection(speed[1]);
// Apply movement
player.motion.x = dir.x;
player.motion.z = dir.z;
// Handle vertical movement
if (keyPressedDump("space")) {
player.motion.y = jumpHeight[1];
} else if (keyPressedDump("shift")) {
player.motion.y = -jumpHeight[1];
} else if (autoJump[1]) {
player.motion.y = 0;
}
};
} else {
console.log("CustomFly disabled!");
delete tickLoop["CustomFly"];
}
});
// Add options
speed = myModule.addoption("Speed", Number, 0.5);
jumpHeight = myModule.addoption("JumpHeight", Number, 0.42);
autoJump = myModule.addoption("AutoHover", Boolean, true);- Scripts have full access to the client's scope
- Be careful with what scripts you load from untrusted sources
- Scripts persist across sessions via LocalStorage
- You can have multiple modules in one script file