Skip to content

Scripts

Share and discover scripts for LiquidBounce

22 Topics 70 Posts
  • [Announcement] ScriptAPI Documentation

    Pinned Locked Moved 10 Feb 2024, 01:50
    0 Votes
    1 Posts
    591 Views
    No one has replied
  • 3 Votes
    1 Posts
    2k Views
    No one has replied
  • 1 Votes
    1 Posts
    212 Views
    No one has replied
  • [GPLv3] transaction.js

    9 days ago
    0 Votes
    1 Posts
    70 Views
    No one has replied
  • 1 Votes
    2 Posts
    133 Views
    Are you interested to contribute this for LB repo?
  • [Script] PearlBlockThrow ?

    Unsolved 11 days ago
    0 Votes
    2 Posts
    55 Views
    This is a somewhat faithful transplation of the original source code, which would not work on 1.8.x, this should desync your inventory too. function __require(path) { if (path.startsWith("@embedded")) { return globalThis } if (path.startsWith("@minecraft-yarn-definitions/types/")) { return { [path.substring(path.lastIndexOf("/") + 1)]: Java.type(path .replaceAll("@minecraft-yarn-definitions/types/", "") .replaceAll("/", ".") ) } } return require(path); } var exports = {} "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // imports /* eslint-disable unused-imports/no-unused-imports */ const _embedded_1 = __require("@embedded"); /* eslint-enable unused-imports/no-unused-imports */ // DO NOT TOUCH ANYTHING ABOVE THIS LINE, also not sure why it didn't work const PlayerInteractItemC2SPacket_1 = __require("@minecraft-yarn-definitions/types/net/minecraft/network/packet/c2s/play/PlayerInteractItemC2SPacket"); const UpdateSelectedSlotC2SPacket_1 = __require("@minecraft-yarn-definitions/types/net/minecraft/network/packet/c2s/play/UpdateSelectedSlotC2SPacket"); const UpdateSelectedSlotS2CPacket_1 = __require("@minecraft-yarn-definitions/types/net/minecraft/network/packet/s2c/play/UpdateSelectedSlotS2CPacket"); const Items_1 = __require("@minecraft-yarn-definitions/types/net/minecraft/item/Items"); const Hand_1 = __require("@minecraft-yarn-definitions/types/net/minecraft/util/Hand"); const script = _embedded_1.registerScript.apply({ name: "no-pearl-use", version: "1.0.0", authors: ["commandblock2"] }); script.registerModule({ name: "no-pearl-use", description: "cancels ender pearl use", category: "Player", }, (mod) => { var slot = 0; mod.on("enable", () => { var _a, _b; slot = (_b = (_a = _embedded_1.mc.player) === null || _a === void 0 ? void 0 : _a.inventory.selectedSlot) !== null && _b !== void 0 ? _b : 0; }); mod.on("packet", (event) => { var _a; if (event.packet instanceof UpdateSelectedSlotS2CPacket_1.UpdateSelectedSlotS2CPacket) { slot = event.packet.slot(); } if (event.packet instanceof UpdateSelectedSlotC2SPacket_1.UpdateSelectedSlotC2SPacket) { slot = event.packet.selectedSlot; } if (event.packet instanceof PlayerInteractItemC2SPacket_1.PlayerInteractItemC2SPacket && ((_a = _embedded_1.mc.player) === null || _a === void 0 ? void 0 : _a.inventory.main[slot].item) == Items_1.Items.ENDER_PEARL) { // use reflection to set the hand to offhand const field = event.packet.class.getDeclaredField("hand"); field.setAccessible(true); field.set(event.packet, Hand_1.Hand.OFF_HAND); _embedded_1.Client.displayChatMessage(`§cPearl use changed to hand ${event.packet.hand}`); } }); }); original typescript code // imports /* eslint-disable unused-imports/no-unused-imports */ import { Setting, Vec3i, Vec3d, MathHelper, BlockPos, Hand, RotationAxis, mc, Client, RotationUtil, ItemUtil, NetworkUtil, InteractionUtil, BlockUtil, MovementUtil, ReflectionUtil, ParameterValidator, UnsafeThread, registerScript } from "@embedded"; /* eslint-enable unused-imports/no-unused-imports */ // DO NOT TOUCH ANYTHING ABOVE THIS LINE, also not sure why it didn't work import { PlayerInteractItemC2SPacket } from "@minecraft-yarn-definitions/types/net/minecraft/network/packet/c2s/play/PlayerInteractItemC2SPacket"; import { UpdateSelectedSlotC2SPacket } from "@minecraft-yarn-definitions/types/net/minecraft/network/packet/c2s/play/UpdateSelectedSlotC2SPacket"; import { UpdateSelectedSlotS2CPacket } from "@minecraft-yarn-definitions/types/net/minecraft/network/packet/s2c/play/UpdateSelectedSlotS2CPacket"; import { Items } from "@minecraft-yarn-definitions/types/net/minecraft/item/Items"; import { Hand as MCHand } from "@minecraft-yarn-definitions/types/net/minecraft/util/Hand"; const script = registerScript.apply({ name: "no-pearl-use", version: "1.0.0", authors: ["commandblock2"] }); script.registerModule({ name: "no-pearl-use", description: "cancels ender pearl use", category: "Player", }, (mod) => { var slot = 0 mod.on("enable", () => { slot = mc.player?.inventory.selectedSlot ?? 0; }) mod.on("packet", (event) => { if (event.packet instanceof UpdateSelectedSlotS2CPacket) { slot = event.packet.slot(); } if (event.packet instanceof UpdateSelectedSlotC2SPacket) { slot = event.packet.selectedSlot; } if (event.packet instanceof PlayerInteractItemC2SPacket && mc.player?.inventory.main[slot].item == Items.ENDER_PEARL ) { // use reflection to set the hand to offhand const field = (event.packet as any).class.getDeclaredField("hand"); field.setAccessible(true); field.set(event.packet, MCHand.OFF_HAND); Client.displayChatMessage(`§cPearl use changed to hand ${event.packet.hand}`); } }) }) This will indeed cancel the usage of the pearl on 1.8.x protocols function __require(path) { if (path.startsWith("@embedded")) { return globalThis } if (path.startsWith("@minecraft-yarn-definitions/types/")) { return { [path.substring(path.lastIndexOf("/") + 1)]: Java.type(path .replaceAll("@minecraft-yarn-definitions/types/", "") .replaceAll("/", ".") ) } } return require(path); } var exports = {} "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // imports /* eslint-disable unused-imports/no-unused-imports */ const _embedded_1 = __require("@embedded"); /* eslint-enable unused-imports/no-unused-imports */ // DO NOT TOUCH ANYTHING ABOVE THIS LINE, also not sure why it didn't work const PlayerInteractItemC2SPacket_1 = __require("@minecraft-yarn-definitions/types/net/minecraft/network/packet/c2s/play/PlayerInteractItemC2SPacket"); const UpdateSelectedSlotC2SPacket_1 = __require("@minecraft-yarn-definitions/types/net/minecraft/network/packet/c2s/play/UpdateSelectedSlotC2SPacket"); const UpdateSelectedSlotS2CPacket_1 = __require("@minecraft-yarn-definitions/types/net/minecraft/network/packet/s2c/play/UpdateSelectedSlotS2CPacket"); const Items_1 = __require("@minecraft-yarn-definitions/types/net/minecraft/item/Items"); const script = _embedded_1.registerScript.apply({ name: "no-pearl-use", version: "1.0.0", authors: ["commandblock2"] }); script.registerModule({ name: "no-pearl-use", description: "cancels ender pearl use", category: "Player", }, (mod) => { var slot = 0; mod.on("enable", () => { var _a, _b; slot = (_b = (_a = _embedded_1.mc.player) === null || _a === void 0 ? void 0 : _a.inventory.selectedSlot) !== null && _b !== void 0 ? _b : 0; }); mod.on("packet", (event) => { var _a; if (event.packet instanceof UpdateSelectedSlotS2CPacket_1.UpdateSelectedSlotS2CPacket) { slot = event.packet.slot(); } if (event.packet instanceof UpdateSelectedSlotC2SPacket_1.UpdateSelectedSlotC2SPacket) { slot = event.packet.selectedSlot; } if (event.packet instanceof PlayerInteractItemC2SPacket_1.PlayerInteractItemC2SPacket && ((_a = _embedded_1.mc.player) === null || _a === void 0 ? void 0 : _a.inventory.main[slot].item) == Items_1.Items.ENDER_PEARL) { event.cancelEvent(); } }); }); This will desync your inventory with the server anyway, but it is true that no end pearl will be thrown if you have one in your hand (unless u have a pearl in server side but not client side). Can be used as a example. Later is the original ts file. // imports /* eslint-disable unused-imports/no-unused-imports */ import { Setting, Vec3i, Vec3d, MathHelper, BlockPos, Hand, RotationAxis, mc, Client, RotationUtil, ItemUtil, NetworkUtil, InteractionUtil, BlockUtil, MovementUtil, ReflectionUtil, ParameterValidator, UnsafeThread, registerScript } from "@embedded"; /* eslint-enable unused-imports/no-unused-imports */ // DO NOT TOUCH ANYTHING ABOVE THIS LINE, also not sure why it didn't work import { PlayerInteractItemC2SPacket } from "@minecraft-yarn-definitions/types/net/minecraft/network/packet/c2s/play/PlayerInteractItemC2SPacket"; import { UpdateSelectedSlotC2SPacket } from "@minecraft-yarn-definitions/types/net/minecraft/network/packet/c2s/play/UpdateSelectedSlotC2SPacket"; import { UpdateSelectedSlotS2CPacket } from "@minecraft-yarn-definitions/types/net/minecraft/network/packet/s2c/play/UpdateSelectedSlotS2CPacket"; import { Items } from "@minecraft-yarn-definitions/types/net/minecraft/item/Items"; const script = registerScript.apply({ name: "no-pearl-use", version: "1.0.0", authors: ["commandblock2"] }); script.registerModule({ name: "no-pearl-use", description: "cancels ender pearl use", category: "Player", }, (mod) => { var slot = 0 mod.on("enable", () => { slot = mc.player?.inventory.selectedSlot ?? 0; }) mod.on("packet", (event) => { if (event.packet instanceof UpdateSelectedSlotS2CPacket) { slot = event.packet.slot(); } if (event.packet instanceof UpdateSelectedSlotC2SPacket) { slot = event.packet.selectedSlot; } if (event.packet instanceof PlayerInteractItemC2SPacket && mc.player?.inventory.main[slot].item == Items.ENDER_PEARL ) { event.cancelEvent(); } }) })
  • who can write the script? noSlotChanger in the client LB for Nextgen

    Unsolved 20 days ago
    0 Votes
    7 Posts
    129 Views
    Trying with matrix on loyisa.cn with noslow mode set to None indeed will move your slot to other items. However just like I assumed previously simply ignoring the packet just won't do, you can never eat the food, even if you immediately send back a slot change. You might need something else to make a nolow mode for matrix. If you need to verify yourself, here is your script anyway. function __require(path) { if (path.startsWith("@embedded")) { return globalThis } if (path.startsWith("@minecraft-yarn-definitions/types/")) { return { [path.substring(path.lastIndexOf("/") + 1)]: Java.type(path .replaceAll("@minecraft-yarn-definitions/types/", "") .replaceAll("/", ".") ) } } return require(path); } var exports = {} "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // imports /* eslint-disable unused-imports/no-unused-imports */ const _embedded_1 = __require("@embedded"); /* eslint-enable unused-imports/no-unused-imports */ // DO NOT TOUCH ANYTHING ABOVE THIS LINE, also not sure why it didn't work const UpdateSelectedSlotC2SPacket_1 = __require("@minecraft-yarn-definitions/types/net/minecraft/network/packet/c2s/play/UpdateSelectedSlotC2SPacket"); const UpdateSelectedSlotS2CPacket_1 = __require("@minecraft-yarn-definitions/types/net/minecraft/network/packet/s2c/play/UpdateSelectedSlotS2CPacket"); const script = _embedded_1.registerScript.apply({ name: "anti slot changing", version: "1.0.0", authors: ["commandblock2"] }); script.registerModule({ name: "anti-slot-changing", description: "like no rotate reset but for slots", category: "Exploit", settings: { resyncServerSide: _embedded_1.Setting.boolean({ name: "resync server side", default: true }) }, }, (mod) => { mod.on("packet", (event) => { var _a, _b, _c; if (event.packet instanceof UpdateSelectedSlotS2CPacket_1.UpdateSelectedSlotS2CPacket) { event.cancelEvent(); if (!mod.settings.resyncServerSide.get()) return; (_a = _embedded_1.mc.getNetworkHandler()) === null || _a === void 0 ? void 0 : _a.sendPacket(new UpdateSelectedSlotC2SPacket_1.UpdateSelectedSlotC2SPacket((_c = (_b = _embedded_1.mc.player) === null || _b === void 0 ? void 0 : _b.inventory.selectedSlot) !== null && _c !== void 0 ? _c : 0)); } }); });
  • I need help with JavaScript in liquidbounce b100

    Unsolved 12 days ago
    0 Votes
    1 Posts
    17 Views
    No one has replied
  • Vectorized Velocity

    13 days ago
    0 Votes
    1 Posts
    65 Views
    No one has replied
  • [Script] Macros

    6 Nov 2024, 05:29
    0 Votes
    2 Posts
    403 Views
    macros are not created using the numpad keypad and bottom keys. can you create them quickly by pressing a key without typing?
  • [Script] GCore 0.1 (End support)

    Moved 15 Aug 2024, 07:36
    0 Votes
    24 Posts
    4k Views
    @pro0101 The script is not supported anymore.
  • Someone make a fly hack script for mineland

    24 days ago
    0 Votes
    1 Posts
    49 Views
    No one has replied
  • [Script] Mediator 0.2.1 (Update)

    21 Feb 2025, 06:41
    0 Votes
    1 Posts
    303 Views
    No one has replied
  • 2 Votes
    3 Posts
    630 Views
    Update: subsequent updates will be available on https://github.com/commandblock2/minecraft-LBNG-types and the generated script was reverted to a state where it was not as readable as the following example (for correctness) but still largely remained the same. Now it can kinda generate a working script, but the ts file has a few squiggles. [image: 1738243517052-e3e18814-1645-4bd5-8244-7b8f44663aff-image.png] template.ts // imports import { Setting, Vec3i, Vec3d, MathHelper, BlockPos, Hand, RotationAxis, mc, Client, RotationUtil, ItemUtil, NetworkUtil, InteractionUtil, BlockUtil, MovementUtil, ReflectionUtil, ParameterValidator, UnsafeThread, registerScript } from "@embedded"; import { ScriptModule } from "@minecraft-yarn-definitions/types/net/ccbluex/liquidbounce/script/bindings/features/ScriptModule"; import { Matrix2d } from "@minecraft-yarn-definitions/types/org/joml/Matrix2d"; const script = registerScript.apply({ name: "template", version: "1.0.0", authors: ["commandblock2"] }); script.registerModule({ // @ts-ignore name: "example-from-template", // @ts-ignore description: "Ths is an example module generated in ts", // @ts-ignore category: "Client" }, (mod: ScriptModule) => { mod.on("enable", () => { Client.displayChatMessage(`${mc.player}`) Client.displayChatMessage(`${new Vec3i(1, 2, 3)}`) Client.displayChatMessage(`${new Matrix2d(1.2, 1.3, 1.4, 15)}`) Client.displayChatMessage("enabled") }) mod.on("disable", () => Client.displayChatMessage("disabled")) }) compiled template.js function __require(path) { if (path.startsWith("@embedded")) { return { _embedded: globalThis } } if (path.startsWith("@minecraft-yarn-definitions/types/")) { return { [path.substring(path.lastIndexOf("/") + 1)]: Java.type(path .replaceAll("@minecraft-yarn-definitions/types/", "") .replaceAll("/", ".") ) } } return require(path); } var exports = {} "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const { _embedded } = __require("@embedded"); const { Matrix2d } = __require("@minecraft-yarn-definitions/types/org/joml/Matrix2d"); const script = _embedded.registerScript.apply({ name: "template", version: "1.0.0", authors: ["commandblock2"] }); script.registerModule({ // @ts-ignore name: "example-from-template", // @ts-ignore description: "Ths is an example module generated in ts", // @ts-ignore category: "Client" }, (mod) => { mod.on("enable", () => { _embedded.Client.displayChatMessage(`${_embedded.mc.player}`); _embedded.Client.displayChatMessage(`${new Vec3i(1, 2, 3)}`); _embedded.Client.displayChatMessage(`${new Matrix2d(1.2, 1.3, 1.4, 15)}`); _embedded.Client.displayChatMessage("enabled"); }); mod.on("disable", () => _embedded.Client.displayChatMessage("disabled")); }); [image: 1738243717904-1cb70c51-cc7f-4a90-a122-eff6ab0ad68f-image.png]
  • [Script] ClickGUISyncer

    9 Jan 2025, 01:02
    0 Votes
    2 Posts
    351 Views
    This script has been superseded by https://github.com/CCBlueX/LiquidBounce/commit/1446ffc2dab9f8d1abadf947074d74e4be863d56 0 1zun4 committed to CCBlueX/LiquidBounce fix(ScriptManager): not reloading ClickGUI cache (#5364) fixes https://github.com/CCBlueX/LiquidBounce/issues/5228
  • [Script] mumyPacketDebugger 0.3 (Update)

    Moved 4 Mar 2024, 00:41
    3 Votes
    9 Posts
    2k Views
    thank you for share this information.........
  • 0 Votes
    2 Posts
    190 Views
    Can you be more specific? Check your game logs. It will tell you why.
  • [Script] NES Emulator

    6 Nov 2024, 04:40
    0 Votes
    2 Posts
    422 Views
    This script is compatible starting with https://github.com/CCBlueX/LiquidBounce/commit/7ca6ce4bd4500950c48d8a335634ab5092155a1f - do not use on 0.17.0. Wait for 0.18.0 to be released. 0 1zun4 committed to CCBlueX/LiquidBounce feat: key option (#4373) Similiar to Bind but only stores Key. --------- Co-authored-by: Senk Ju <18741573+SenkJu@users.noreply.github.com>
  • [Script] Text Translator

    6 Nov 2024, 05:24
    0 Votes
    1 Posts
    209 Views
    No one has replied
  • 0 Votes
    2 Posts
    499 Views
    Very cool.