Skip to content

ScriptAPI

A place to ask for help on writing scripts

305 Topics 2.2k Posts
  • How to check other player blocking?

    Solved
    8
    0 Votes
    8 Posts
    240 Views
    Painis BotP

    @bobismymanager @skiddermaster412 is actually @1337's friend (!)

  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    6 Views
    No one has replied
  • [HELP] Converting Core scripts to Script API v2 scripts.

    Unsolved
    11
    0 Votes
    11 Posts
    500 Views
    G

    @czechhek Oh okay, thanks.

  • Replacing mc.currentScreen crashes the game

    Unsolved
    3
    0 Votes
    3 Posts
    208 Views
    ?

    i forgor ๐Ÿ’€

  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Detect getting hit by a player

    Solved
    4
    0 Votes
    4 Posts
    231 Views
    CzechHekC

    @ivanovladimirs mc.thePlayer.hurtTime

  • How to make the player crouch/sneak in script api v2

    Solved
    3
    0 Votes
    3 Posts
    195 Views
    FaaatPotatoF

    @rainbow-spam

    mc.gameSettings.keyBindSneak.pressed = true
  • toggled modules

    Unsolved
    12
    0 Votes
    12 Posts
    361 Views
    Senk JuS

    @gooseo
    This should work:

    moduleManager.getModule("KillAura").getState(); // boolean
  • How to get the head of the enemy

    Unsolved
    7
    0 Votes
    7 Posts
    256 Views
    I

    @auto-reply-bot Thank you very much, but I can't understand

  • How to get the name of an open mode

    Unsolved
    13
    0 Votes
    13 Posts
    277 Views
    skiddermaster412S

    @ibook mate i made it :axohmm:

  • Help if it's not difficult

    Solved
    10
    0 Votes
    10 Posts
    301 Views
    GooseoG

    i dont understand with just "player.health"
    the only way i know is

    mc.thePlayer.getHealth()

    i think

  • Setting player speed..

    Solved
    5
    0 Votes
    5 Posts
    226 Views
    GooseoG

    @sigma-bot Lmao

  • Scripting not working

    Solved
    4
    0 Votes
    4 Posts
    114 Views
    The_Shadow_EmpT

    @realfx try to register it bruh, it only register module, not the script itself

  • I need help on a fly script

    Unsolved
    6
    0 Votes
    6 Posts
    507 Views
    DreamWasFuckedD

    //api_version=2
    (script = registerScript({
    name: "VerusVanillaFly",
    authors: ["SomeHax"],
    version: "1.0"
    })).import("Core.lib");

    module = {
    category: "Fun",
    values: [
    boostMode = value.createList("BoostMode", ["None", "Static", "Gradual"], "Gradual"),
    boostTicksValue = value.createInteger("BoostTicks", 20, 1, 10000),
    boostMotion = value.createFloat("BoostMotion", 9, 1, 9.87)
    ],
    onEnable: function() {
    boostTicks = 0;
    if (boostMode.get() != "None" && mc.theWorld.getCollidingBoundingBoxes(mc.thePlayer, mc.thePlayer.getEntityBoundingBox().offset(0, 3.0001, 0).expand(0, 0, 0)).isEmpty()) {
    mc.thePlayer.sendQueue.addToSendQueue(new C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY + 3.0001, mc.thePlayer.posZ, false));
    mc.thePlayer.sendQueue.addToSendQueue(new C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, false));
    mc.thePlayer.sendQueue.addToSendQueue(new C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, true));
    }
    mc.thePlayer.setPosition(mc.thePlayer.posX, mc.thePlayer.posY + 0.42, mc.thePlayer.posZ);
    },
    onDisable: function() {
    if (boostTicks > 0) {
    mc.thePlayer.motionX = 0;
    mc.thePlayer.motionY = 0;
    mc.thePlayer.motionZ = 0;
    }
    },
    onUpdate: function() {
    mc.thePlayer.motionX = 0;
    mc.thePlayer.motionY = 0;
    mc.thePlayer.motionZ = 0;

    if (!boostTicks && mc.thePlayer.hurtTime > 0) {
    boostTicks = boostMode.get() != "None" ? boostTicksValue.get() : 0;
    }

    var motion;
    if (boostTicks > 0) {
    switch (boostMode.get()) {
    case "Static":
    motion = boostMotion.get();
    break;
    case "Gradual":
    motion = boostTicks / boostTicksValue.get() * boostMotion.get();
    break;
    }
    boostTicks--;
    } else {
    motion = 0.25;
    }

    MovementUtils.strafe(motion);
    },
    onPacket: function(event) {
    var packet = event.getPacket();
    if (packet instanceof C03PacketPlayer) {
    packet.onGround = true;
    }
    },
    onJump: function() {
    mc.thePlayer.motionX = 0;
    mc.thePlayer.motionY = 1;
    mc.thePlayer.motionZ = 0;
    }

    }

  • help,how to set delay in script

    Moved
    9
    0 Votes
    9 Posts
    299 Views
    ?

    @ilovehacker http://ddg.gg

  • How to keep your head facing the enemy

    Unsolved
    4
    0 Votes
    4 Posts
    141 Views
    ?

    @ibook compute the yaw and pitch you need to rotate to in order to aim for the player. search the old forums for killaura if you want to skid.

  • how do i make it rain

    Solved
    7
    1 Votes
    7 Posts
    250 Views
    ?

    @ender1355 works

  • How to detect if I am hitting someone

    Moved
    5
    0 Votes
    5 Posts
    207 Views
    BFFGOLSB

    i mean detect in scripts, not in my screen๐Ÿ‘

  • What is wrong with this code?

    Moved
    3
    0 Votes
    3 Posts
    211 Views
    Plumer ManP

    @skiddermaster412 6 month necro

  • plz help how use blink in script api

    Unsolved
    6
    0 Votes
    6 Posts
    243 Views
    ?

    @ez-chan-osu You need to create a queue, then cancel all packets and put them in the queue. Then get all packets from the queue and send them.