AutoBlock (Basic, Mineplex)

Avatar

By Etho 2 September 2019 03:06

Member · 6 comments

Customizable AutoBlock. Includes BlockRate, OnAttack, and Interact settings. Thanks to Sms_Gamer_3808 on discord for helping me alot.

var scriptName = "AutoBlock";
var scriptVersion = 1.0;
var scriptAuthor = "Etho";

var Renderer = new Renderer();
var RendererClient;

var Timer = Java.type("java.util.Timer");
var BlockPos = Java.type('net.minecraft.util.BlockPos');
var C05PacketPlayerLook= Java.type('net.minecraft.network.play.client.C03PacketPlayer.C05PacketPlayerLook');
var C08PacketPlayerBlockPlacement = Java.type('net.minecraft.network.play.client.C08PacketPlayerBlockPlacement');
var KeyBinding = Java.type('net.minecraft.client.settings.KeyBinding');

function setTimeout(func, milliseconds) {
    var timer = new Timer("setTimeout", true);
    timer.schedule(function () {
        func();
    }, milliseconds);

    return timer;
}

function setInterval(func, milliseconds) {
    var timer = new Timer("setInterval", true);

    timer.schedule(function () {
        func();
    }, milliseconds, milliseconds);

    return timer;
}

function Renderer() {

    var BlockRate = value.createInteger("BlockRate", 1, 1, 20);
    var Attack = value.createBoolean("OnAttack", true)
    var Interact = value.createBoolean("Interact", false)
    var BypassBlock = value.createList("Mode", ["Basic", "Mineplex"], "Basic");

    this.getName = function () {
        return "AutoBlock";
    };

    this.getDescription = function () {
        return "AutoBlock Bypasses";
    };

    this.getCategory = function () {
        return "fun";
    };

    this.onUpdate = function () {
        if(Attack.get() == false) {
            if (BypassBlock.get() == "Basic") {
                if(mc.gameSettings.keyBindAttack.pressed == true) {
                    Ticks++
                    if(Ticks == BlockRate.get()) {
                        Ticks = 0
                        stack = mc.thePlayer.getHeldItem();
                        stackName = stack.getItem();
                        if(stack != null) {
                            KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), true);
                            setTimeout(function () {
                                KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), false);
                            }, 120)
                        }

                        if(Interact.get() == true) {
                            blockigePosition = new BlockPos(mc.thePlayer.posX, Math.floor(mc.thePlayer.getEntityBoundingBox().minY), mc.thePlayer.posZ);
                            mc.thePlayer.sendQueue.addToSendQueue(new C05PacketPlayerLook(mc.thePlayer.rotationPitch, 0, true));
                            mc.thePlayer.sendQueue.addToSendQueue(new C08PacketPlayerBlockPlacement(blockigePosition, 1, mc.thePlayer.inventory.getCurrentItem(), 8, 16, 10));
                        }
                    }
                }
            }

        }
    }

    this.onAttack = function () {
        if(Attack.get() == true) {
            if (BypassBlock.get() == "Basic") {
                setTimeout(function () {
                    stack = mc.thePlayer.getHeldItem();
                    stackName = stack.getItem();
                    if(stack != null) {
                        KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), true);
                        setTimeout(function () {
                            KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), false);
                        }, 120)
                    }

                    if(Interact.get() == true) {
                        blockigePosition = new BlockPos(mc.thePlayer.posX, Math.floor(mc.thePlayer.getEntityBoundingBox().minY), mc.thePlayer.posZ);
                        mc.thePlayer.sendQueue.addToSendQueue(new C05PacketPlayerLook(mc.thePlayer.rotationPitch, 0, true));
                        mc.thePlayer.sendQueue.addToSendQueue(new C08PacketPlayerBlockPlacement(blockigePosition, 1, mc.thePlayer.inventory.getCurrentItem(), 8, 16, 10));
                    }
                }, BlockRate.get() + 20)
            }

            if(BypassBlock.get() == "Mineplex") {
                setTimeout(function () {
                    stack = mc.thePlayer.getHeldItem();
                    stackName = stack.getItem();
                    if(stack != null) {
                        KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), true);
                        setTimeout(function () {
                            KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), false);
                        }, 120)
                    }

                    if(Interact.get() == true) {
                        blockigePosition = new BlockPos(mc.thePlayer.posX, Math.floor(mc.thePlayer.getEntityBoundingBox().minY), mc.thePlayer.posZ);
                        mc.thePlayer.sendQueue.addToSendQueue(new C05PacketPlayerLook(mc.thePlayer.rotationPitch, 0, true));
                        mc.thePlayer.sendQueue.addToSendQueue(new C08PacketPlayerBlockPlacement(blockigePosition, 1, mc.thePlayer.inventory.getCurrentItem(), 8, 16, 10));
                    }
                }, BlockRate.get())
            }


        }
    }
    
    this.onDisable = function() {
        //KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), false);
    }
    
    this.onEnable = function() {
        Ticks = 0
    }

    this.addValues = function(values) {
        values.add(BlockRate);
        values.add(Attack);
        values.add(Interact);
        values.add(BypassBlock);
    }
}

function onEnable() {
    RendererClient = moduleManager.registerModule(Renderer);
};

function onDisable() {
    moduleManager.unregisterModule(RendererClient);
};

Last edited by Etho (2 September 2019 03:09)


I do things

Avatar

By Sms_Gamer_3808 2 September 2019 03:08

Member · 594 comments

UwU
I'm RBB (Red & Black Brush) btw

Last edited by Sms_Gamer_3808 (2 September 2019 03:09)


I don't exist

Avatar

By Xflamelord 2 September 2019 07:01

Member · 11 comments

it doesent really autoblock it just attacks normally for me

Avatar

By yorik100 2 September 2019 12:14

Member · 307 comments

But basic bypasses on Mineplex lol

Avatar

By Etho 2 September 2019 16:50

Member · 6 comments
yorik100 wrote

But basic bypasses on Mineplex lol

Mineplex bypass is faster then basic


I do things

Avatar

By yorik100 2 September 2019 16:56

Member · 307 comments
Etho wrote
yorik100 wrote

But basic bypasses on Mineplex lol

Mineplex bypass is faster then basic

What do you mean faster, autoblock is legit only blocking when an enemy is at a certain distance from the player
And why tf does it send head movement packets, it flags for extra packets
You can literally hold right click and left click with autoclicker and you have a bypassing autoblock, Mineplex doesn't have an autoblock check or interract check or whatever

Last edited by yorik100 (2 September 2019 16:59)