Hello brothers, I made a regen script to test on the server allowed Hack but there is a problem that does not appear in the clickgui
-
var scriptName = "RegenNew";
var scriptVersion = 1.0;
var scriptAuthor = "ItzHackz";var ClientUtils = Java.type("net.minecraft.util.ClientUtils");
var onUpdate = Java.type("net.minecraft.update.onUpdate");
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 AxisAlignedBB = Java.type("net.minecraft.util.AxisAlignedBB");
var BlockPos = Java.type("net.minecraft.util.BlockPos");
var MathHelper = Java.type("net.minecraft.util.MathHelper");function regen() {
Health = value.createFloat('Health', 20, 1, 20);
this.addValues = function(values) {
values.add(Health);
};
this.getName = function() {
return "RegenNew";
};this.getDescription = function() { return "Test."; }; this.getCategory = function() { return "Combat"; }; var packets = 5.0; var potionPackets = 8.5; var health = 9.9; var potion = true; this.onUpdate = function() { var i; if (this.potion) { if (ClientUtils.player().getActivePotionEffect(Potion.regeneration) != null && ClientUtils.player().getActivePotionEffect(Potion.regeneration).getDuration() > 0 && ClientUtils.player().getHealth() <= this.health * 2.0 && (ClientUtils.player().isCollidedVertically || this.isInsideBlock()) && event.getState().equals(State.POST)) { for(i = 0; i < this.potionPackets; ++i) { ClientUtils.player().getActivePotionEffect(Potion.regeneration).deincrementDuration(); ClientUtils.packet(new C03PacketPlayer(true)); } } } else if (ClientUtils.player().getHealth() <= this.health * 2.0 && (ClientUtils.player().isCollidedVertically || this.isInsideBlock()) && event.getState().equals(State.POST)) { for(i = 0; i < this.packets; ++i) { ClientUtils.packet(new C03PacketPlayer(true)); } } } function isInsideBlock() { for(var x = MathHelper.floor_double(ClientUtils.player().boundingBox.minX); x < MathHelper.floor_double(ClientUtils.player().boundingBox.maxX) + 1; ++x) { for(var y = MathHelper.floor_double(ClientUtils.player().boundingBox.minY); y < MathHelper.floor_double(ClientUtils.player().boundingBox.maxY) + 1; ++y) { for(var z = MathHelper.floor_double(ClientUtils.player().boundingBox.minZ); z < MathHelper.floor_double(ClientUtils.player().boundingBox.maxZ) + 1; ++z) { var block = ClientUtils.world().getBlockState(new BlockPos(x, y, z)).getBlock(); if (block != null && !(block instanceof BlockAir)) { var 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(x, y, z, (double)(x + 1), (double)(y + 1), (double)(z + 1)); } if (boundingBox != null && ClientUtils.player().boundingBox.intersectsWith(boundingBox)) { return true; } } } } } return false; } function onLoad() {} function onEnable() { client = moduleManager.registerModule(regen); } function onDisable() { moduleManager.unregisterModule(client); }
}
-
This post is deleted!
-
@ItzHackzz epic code, love liquidbounce users who are skilled just like you
@leejames2305 who is maeyse lol
-
@leejames2305 mayese? I do not know who it is
-
-
@leejames2305 James how can I get the class to just play to become JS? I tried to make this script in vs code on a regen crest basis
-
@skidma Hi got the script?
-
@itzhackzz learn scriptapi
-
-
@hahayes and man, what has to do with that? I still do not understand
-
@hahayes dont remember dont care
-
@hahayes yeah yeah hold on there ill get back to u when i finish in ur mom