Script does not work
-
I tried to make a regen script that I got from a hack can someone tell me if something is wrong
var scriptName = "Regen2" var scriptAuthor = "Maeyse" var scriptVersion = 1.0 var Block = Java.type('net.minecraft.block.Block'); var BlockAir = Java.type('net.minecraft.block.BlockAir'); var BlockHopper = Java.type('net.minecraft.block.BlockHopper'); var C03PacketPlayer = Java.type('net.minecraft.network.play.client.C03PacketPlayer';) var Potion = Java.type('net.minecraft.potion.Potion'); var AxiAlignedBB = Java.type('net.minecraft.util.AxisAlignedBB';) var BlockPos = Java.type('net.minecraft.util.BlockPos';) var MathHelper = Java.type('net.minecraft.util.MathHelper';) var client = new client() var clientClient function client() { this.getName = function() { return "Regen2" } this.getCategory = function() { return "Combat" ) var name = "speed3", var min = 0.0 D, var max = 56.0 D, var increment = 1.0 D ) var double packet = 8.0 D; ( name = "speed3", min = 0.0 D, max = 56.0 D, increment = 1.0 D ) var double potionPacket = 8.0 D; ( var name = "speed3", var min = 0.0 D, var max = 56.0 D, var increment = 1.0 D ) var double health = 8.0 D; var boolean potion = true; var void onUpdate(UpdateEvent event) { int i; if (this.potion) { if (ClientUtils.player().getActivePotionEffect(Potion.regeneration) != null && ClientUtils.player().getActivePotionEffect(Potion.regeneration).getDuration() > 0 && (double) ClientUtils.player().getMaxHealth() <= this.health * 20.0 D && (ClientUtils.player().isCollidedVertically || this.isInsideBlock()) && event.getState().equals(State.POST)) { for (i = 0; (double) i < this.potionPacket; ++i) { ClientUtils.player().getActivePotionEffect(Potion.regeneration).deincrementDuration(); ClientUtils.packet(new C03PacketPlayer(true)); } } } else if ((double) ClientUtils.player().getMaxHealth() <= this.health * 20.0 D && (ClientUtils.player().isCollidedVertically || this.isInsideBlock()) && event.getState().equals(State.POST)) { for (i = 0; (double) i < this.packet; ++i) { ClientUtils.packet(new C03PacketPlayer(true)); } } } var boolean isInsideBlock() { for (int x = MathHelper.floor_double(ClientUtils.player().boundingBox.minX); x < MathHelper.floor_double(ClientUtils.player().boundingBox.maxX) + 1; ++x) { for (int y = MathHelper.floor_double(ClientUtils.player().boundingBox.minY); y < MathHelper.floor_double(ClientUtils.player().boundingBox.maxY) + 1; ++y) { for (int z = MathHelper.floor_double(ClientUtils.player().boundingBox.minZ); z < MathHelper.floor_double(ClientUtils.player().boundingBox.maxZ) + 1; ++z) { Block block = ClientUtils.world().getBlockState(new BlockPos(x, y, z)).getBlock(); if (block != null && !(block instanceof BlockAir)) { AxisAlignedBB boundingBox = block.getCollisionBoundingBox(ClientUtils.world(), new BlockPos(x, y, z), ClientUtils.world().getBlockState(new BlockPos(x, y, z))); if (block instanceof BlockHopper) { boundingBox = new AxisAlignedBB((double) x, (double) y, (double) z, (double)(x + 1), (double)(y + 1), (double)(z + 1)); } if (boundingBox != null && ClientUtils.player().boundingBox.intersectsWith(boundingBox)) { return true; } } } } } return false; } }
-
stop spamming no one will help you
-
This post is deleted!
-
@idk-my-name if you are so good why don't you help me man
that script you did doesn't work -
@idk-my-name I don't know why you are
-
@idk-my-name what is wrong in the script?
-
This post is deleted!