In-case you want a scriptapi v1 version
var scriptName = "ArmorBreaker";
var scriptAuthor = "Ali00035";
var scriptVersion = 1.0;
var C02PacketUseEntity = Java.type("net.minecraft.network.play.client.C02PacketUseEntity");
function Module() {
this.getName = function () {
return "ArmorBreaker";
}
this.getCategory = function () {
return "Fun";
}
this.getDescription = function () {
return "";
}
this.onAttack = function (e) {
var target = e.getTargetEntity();
mc.thePlayer.sendQueue.addToSendQueue(new C02PacketUseEntity(target, C02PacketUseEntity.Action.ATTACK));
}
}
var Module = new Module();
var Client;
function onEnable() {
Client = moduleManager.registerModule(Module);
};
function onDisable() {
moduleManager.unregisterModule(Client);
};