Bot that automatically attacks a special player
-
@plumer-man where i can found it
-
@plumer-man plumer man are you on right now?
-
var scriptName = "SoulAura"; var scriptVersion = 4.1; var scriptAuthor = "§lSoulplexis"; var Aura = new Aura(); var AuraClient; // The workshop function randomIntFrom(min, max) { return Math.floor(Math.random() * (max - min + 1) + min); } var PlayerPositionLook = Java.type('net.minecraft.network.play.client.C03PacketPlayer.C06PacketPlayerPosLook'); var PlayerLook = Java.type('net.minecraft.network.play.client.C03PacketPlayer.C05PacketPlayerLook'); var PlayerPosition = Java.type('net.minecraft.network.play.client.C03PacketPlayer.C04PacketPlayerPosition') var Player = Java.type('net.minecraft.network.play.client.C03PacketPlayer'); var EntityLiving = Java.type('net.minecraft.entity.EntityLivingBase'); var Swords = Java.type('net.minecraft.item.ItemSword'); var BlockPos = Java.type('net.minecraft.util.BlockPos'); var C07PacketPlayerDigging = Java.type('net.minecraft.network.play.client.C07PacketPlayerDigging'); var C08PacketPlayerBlockPlacement = Java.type("net.minecraft.network.play.client.C08PacketPlayerBlockPlacement"); var EnumFacing = Java.type('net.minecraft.util.EnumFacing'); var Fooditems = Java.type('net.minecraft.item.ItemFood'); var Interactpacket = Java.type('net.minecraft.network.play.client.C02PacketUseEntity'); var EntityPlayer = Java.type('net.minecraft.entity.player.EntityPlayer'); var MathHelper = Java.type("net.minecraft.util.MathHelper"); var C02PacketUseEntity = Java.type("net.minecraft.network.play.client.C02PacketUseEntity"); var EntityPlayer = Java.type('net.minecraft.entity.player.EntityPlayer') var EntityMob = Java.type('net.minecraft.entity.monster.EntityMob') var EntityAnimal = Java.type('net.minecraft.entity.passive.EntityAnimal') var EntitySquid = Java.type('net.minecraft.entity.passive.EntitySquid') var EntitySlime = Java.type('net.minecraft.entity.monster.EntitySlime') var GlStateManager = Java.type("net.minecraft.client.renderer.GlStateManager") var ScaledResolution = Java.type("net.minecraft.client.gui.ScaledResolution") var GL11 = Java.type("org.lwjgl.opengl.GL11") var MathHelper = Java.type("net.minecraft.util.MathHelper") var Color = Java.type('java.awt.Color') var ColorUtils = Java.type('net.ccbluex.liquidbounce.utils.render.ColorUtils') var EntityUtils = Java.type('net.ccbluex.liquidbounce.utils.EntityUtils') var Integer = Java.type("java.lang.Integer") function getClosestEntity() { var filteredEntites = [] for (var i in mc.theWorld.loadedEntityList) { var entityC = mc.theWorld.loadedEntityList[i] if (EntityUtils.targetPlayer && (entityC instanceof EntityPlayer && entityC != mc.thePlayer) && entityC.getName() == "BlahBLah"){ filteredEntites.push(entityC) } } filteredEntites.sort(function(a, b) { var distanceA = mc.thePlayer.getDistanceToEntity(a) // 6 var distanceB = mc.thePlayer.getDistanceToEntity(b) // 3 return distanceB - distanceA; // = 3 }) return filteredEntites[filteredEntites.length - 1] } function switcheroo(xz) { var filteredEntites = [] for (var i in mc.theWorld.loadedEntityList) { var entityC = mc.theWorld.loadedEntityList[i] if (entityC instanceof EntityLiving && entityC != mc.thePlayer && entityC.getHealth() > 0 && entityC.hurtTime < xz) { filteredEntites.push(entityC) } } filteredEntites.sort(function(a, b) { var distanceA = mc.thePlayer.getDistanceToEntity(a) // 6 var distanceB = mc.thePlayer.getDistanceToEntity(b) // 3 return distanceB - distanceA; // = 3 }) return filteredEntites[filteredEntites.length - 1] } function Aura() { var Mode = value.createList("Mode", ["Single", "Switch", "Click", "Teleport", "HypixelInf"], "Single"); //need work var Delay = value.createInteger("APS", 12, 0, 20); var Range = value.createFloat("Range", 4.25, 0, 6.00); var AutoBlock = value.createBoolean("AutoBlock", false); var BlockMode = value.createList("AutoBlockMode", ["Normal", "Packet", "Vanilla", "Interact", "Old", "AAC", "Hypixel", "Cement"], "Normal"); var BlockRange = value.createFloat("AutoBlockRange", 8, 0, 12.00); var InteractAutoBlock = value.createBoolean("InteractAutoBlock", false); var KeepSprint = value.createBoolean("KeepSprint", true); var Aim = value.createBoolean("Aim", false); var AimMode = value.createList("AimMode", ["Normal", "LockView", "Random", "Derp"], "Normal"); var AimPoint = value.createList("AimTarget", ["Head", "Body"], "Head"); var ThroughWalls = value.createBoolean("ThroughWalls", true); var NoEatHit = value.createBoolean("NoEatHit", false); var Criticals = value.createBoolean("Criticals", false); var Correct = value.createBoolean("Correct", false); var Legit = value.createBoolean("Legit_Attacks", true); var ClickTP = value.createBoolean("ClickTP", false); var SwitchDelay = value.createInteger("SwitchDelay", 5, 0, 10); var Crasher = value.createBoolean("MultiAttacks", false); var Randomize_APS = value.createBoolean("Randomize_APS", true); var TPRange = value.createInteger("TpAura_Range", 120, 0, 200); var Debug = value.createBoolean("Debug", false); this.getName = function() { return "Aura"; }; var hits = 0; this.getDescription = function() { return "Attacks enemies around the player."; }; this.getCategory = function() { return "Combat"; }; var delay = 0; var f = 0; var cancelz = false; var d = 0; var e = 0; var validTarget = false; var switcher = false; var swics = false; this.KillAuraz = function() { d++; delay++; var listz = mc.theWorld.loadedEntityList; switch(Mode.get()) { case "Single": var entity = getClosestEntity(); break; case "Switch": var entity = switcheroo(SwitchDelay.get()) break; case "Multi": var list = mc.theWorld.playerEntities; for (var k = 0; k < list.size - 1; k++) { var entity = list[k]; } break; } f = mc.thePlayer.getDistanceToEntity(entity); if (entity != null && entity != mc.thePlayer && entity instanceof EntityLiving && entity.getHealth() > 0 && ((ThroughWalls.get() == false && mc.thePlayer.canEntityBeSeen(entity)) || ThroughWalls.get() == true)) { if (AutoBlock.get() == true && mc.thePlayer.getHeldItem().getItem() instanceof Swords && f <= BlockRange.get()) { switch (BlockMode.get()) { case "Old": if (entity.hurtTime != 0) { mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getHeldItem()); } else { mc.gameSettings.keyBindUseItem.pressed = false; } break; case "Vanilla": mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getHeldItem()); break; case "Hypixel": mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getHeldItem()); mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, new BlockPos(0, 0, 0), EnumFacing.UP)); break; case "Normal": mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getHeldItem()); break; case "AAC": if (d >= randomIntFrom(2, 8)) { mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getHeldItem()); d = 0; } break; case "Packet": mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getHeldItem()); switcher = false; if (switcher) { mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, new BlockPos(0, 0, 0), EnumFacing.UP)); } else { mc.thePlayer.sendQueue.addToSendQueue(new C08PacketPlayerBlockPlacement(mc.thePlayer.inventory.getCurrentItem())) } break; case "Cement": mc.thePlayer.sendQueue.addToSendQueue(new C08PacketPlayerBlockPlacement(mc.thePlayer.inventory.getCurrentItem())) mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getHeldItem()); break; case "Interact": mc.gameSettings.keyBindUseItem.pressed = true; break; } } if (f <= Range.get() && (delay >= 20 / Delay.get()) /* && ((NoEatHit.get() == true && !(mc.thePlayer.getHeldItem().getItem() instanceof Fooditems) && mc.thePlayer.isUsingItem()) || NoEatHit.get() == false) */ ) { // from smsgamer delay = 0; if (Legit.get() == false) { switcher = true; mc.thePlayer.sendQueue.addToSendQueue(new C02PacketUseEntity(entity, C02PacketUseEntity.Action.ATTACK)); mc.thePlayer.swingItem(); if (Debug.get()) { swics = !swics if (swics) { chat.print("§c[Debug] §7PacketAttack!"); } else { chat.print("§c[Debug] §fPacketAttack!"); } } hits++; } if (Legit.get()) { switcher = true; mc.playerController.attackEntity(mc.thePlayer, entity); if (Debug.get()) { swics = !swics if (swics) { chat.print("§c[Debug] §7Attack!"); } else { chat.print("§c[Debug] §fAttack!"); } } } } } } var tix = 0; this.onUpdate = function() { if (Mode.get() != "Click" && Mode.get() != "Teleport") { this.KillAuraz(); } if (Mode.get() == "Click") { if (mc.gameSettings.keyBindAttack.isKeyDown()) { d++; delay += 1; if (ClickTP.get() == true && delay >= 20 / Delay.get() && mc.thePlayer.getDistanceToEntity(getClosestEntity()) <= TPRange.get() && ((ThroughWalls.get() == false && mc.thePlayer.canEntityBeSeen(entity)) || ThroughWalls.get() == true)) { mc.thePlayer.onGround = false; if (AutoBlock.get() == true && mc.thePlayer.getHeldItem().getItem() instanceof Swords && f <= BlockRange.get()) { switch (BlockMode.get()) { case "Old": if (entity.hurtTime != 0) { mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getHeldItem()); } else { mc.gameSettings.keyBindUseItem.pressed = false; } break; case "Vanilla": mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getHeldItem()); break; case "Hypixel": mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getHeldItem()); mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, new BlockPos(0, 0, 0), EnumFacing.UP)); break; case "Normal": mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getHeldItem()); break; case "AAC": if (d >= randomIntFrom(2, 8)) { mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getHeldItem()); d = 0; } break; case "Interact": mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getHeldItem()); mc.thePlayer.sendQueue.addToSendQueue(new Interactpacket(getClosestEntity(), Interactpacket.Action.INTERACT)); break; } } if (((ClickTP.get() == false && ((ThroughWalls.get() == false && mc.thePlayer.canEntityBeSeen(getClosestEntity())) || ThroughWalls.get() == true) && (mc.thePlayer.getDistanceToEntity(getClosestEntity()) <= Range.get()))) && delay >= 20 / Delay.get() && ((NoEatHit.get() == true && !(mc.thePlayer.getHeldItem().getItem() instanceof Fooditems) && mc.thePlayer.isUsingItem()) || NoEatHit.get() == false)) { // from smsgamer if (Legit.get() == false) { mc.thePlayer.sendQueue.addToSendQueue(new C02PacketUseEntity(getClosestEntity(), C02PacketUseEntity.Action.ATTACK)); if (Mode.get() == "HypixelInf") { for (var i = 0; i < Delay.get(); i++) { mc.thePlayer.sendQueue.addToSendQueue(new C02PacketUseEntity(getClosestEntity(), C02PacketUseEntity.Action.ATTACK)); if (Debug.get()) { swics = !swics if (swics) { chat.print("§c[Debug] §7Teleported!"); } else { chat.print("§c[Debug] §fTeleported!"); } } } } mc.thePlayer.swingItem(); hits++; } else if (Legit.get()) { mc.playerController.attackEntity(mc.thePlayer, getClosestEntity()); if (Mode.get() == "HypixelInf") { for (var i = 0; i < Delay.get(); i++) { mc.playerController.attackEntity(mc.thePlayer, getClosestEntity()); } } } } mc.thePlayer.sendQueue.addToSendQueue(new PlayerPosition(getClosestEntity().posX, getClosestEntity().posY + Range.get(), getClosestEntity().posZ, false)); if (Legit.get() == false) { mc.thePlayer.sendQueue.addToSendQueue(new C02PacketUseEntity(getClosestEntity(), C02PacketUseEntity.Action.ATTACK)); mc.thePlayer.swingItem(); for (var i = 0; i < Delay.get(); i++) { mc.thePlayer.sendQueue.addToSendQueue(new C02PacketUseEntity(getClosestEntity(), C02PacketUseEntity.Action.ATTACK)); } hits++; } else if (Legit.get()) { mc.playerController.attackEntity(mc.thePlayer, getClosestEntity()); if (Mode.get() == "HypixelInf") { for (var i = 0; i < Delay.get(); i++) { mc.playerController.attackEntity(mc.thePlayer, getClosestEntity()); } } } } tix++; } if (delay >= (Delay.get() / 20)) { delay = 0; } } if (Mode.get() == "Teleport" || Mode.get() == "HypixelInf") { d++; delay += 1; if (AutoBlock.get() == true && mc.thePlayer.getHeldItem().getItem() instanceof Swords && f <= TPRange.get()) { mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getHeldItem()); // No autoblock mode is necessary here. seriously. If you anticheat can detect autoblock but not TPAura you've got a bigger problem on your hands. } if (delay >= Delay.get() && mc.thePlayer.getDistanceToEntity(getClosestEntity()) <= TPRange.get() && ((ThroughWalls.get() == false && mc.thePlayer.canEntityBeSeen(entity)) || ThroughWalls.get() == true)) { mc.thePlayer.onGround = false; if (((((ThroughWalls.get() == false && mc.thePlayer.canEntityBeSeen(getClosestEntity())) || ThroughWalls.get() == true) && (mc.thePlayer.getDistanceToEntity(getClosestEntity()) <= Range.get()))) && delay >= 20 / Delay.get() && ((NoEatHit.get() == true && !(mc.thePlayer.getHeldItem().getItem() instanceof Fooditems) && mc.thePlayer.isUsingItem()) || NoEatHit.get() == false)) { // from smsgamer if (Legit.get() == false) { mc.thePlayer.sendQueue.addToSendQueue(new C02PacketUseEntity(getClosestEntity(), C02PacketUseEntity.Action.ATTACK)); mc.thePlayer.swingItem(); hits++; } else if (Legit.get()) { mc.playerController.attackEntity(mc.thePlayer, getClosestEntity()); } } mc.thePlayer.sendQueue.addToSendQueue(new PlayerPosition(getClosestEntity().posX, getClosestEntity().posY + Range.get(), getClosestEntity().posZ, false)); if (Legit.get() == false) { mc.thePlayer.sendQueue.addToSendQueue(new C02PacketUseEntity(getClosestEntity(), C02PacketUseEntity.Action.ATTACK)); mc.thePlayer.swingItem(); hits++; } else if (Legit.get()) { mc.playerController.attackEntity(mc.thePlayer, getClosestEntity()); } } tix++; if (delay >= Delay.get()) { delay = 0; } } } this.getTag = function() { return Mode.get() + " " + hits.toString(); } var entitytimer = 0; this.onPacket = function(event) { if (Aim.get()) { var packet = event.getPacket(); switch(Mode.get()) { case "Single": var target = getClosestEntity(); break; case "Switch": var target = switcheroo(SwitchDelay.get()) break; } if (mc.thePlayer.getDistanceToEntity(target) <= Range.get()) { if (packet instanceof Player && !(packet instanceof PlayerPosition) && !(packet instanceof PlayerLook) && !(packet instanceof PlayerPositionLook)){ mc.thePlayer.sendQueue.addToSendQueue(new PlayerLook(mc.thePlayer.rotationYaw, mc.thePlayer.rotationPitch, packet.isOnGround())); event.cancelEvent() mc.thePlayer.sendQueue.addToSendQueue(new PlayerLook(mc.thePlayer.rotationYaw, mc.thePlayer.rotationPitch, packet.isOnGround())); } if (packet instanceof PlayerPosition){ mc.thePlayer.sendQueue.addToSendQueue(new PlayerPositionLook(packet.getPositionX(), packet.getPositionY(), packet.getPositionZ(), mc.thePlayer.rotationYaw, mc.thePlayer.rotationPitch, packet.isOnGround())); event.cancelEvent() mc.thePlayer.sendQueue.addToSendQueue(new PlayerPositionLook(packet.getPositionX(), packet.getPositionY(), packet.getPositionZ(), mc.thePlayer.rotationYaw, mc.thePlayer.rotationPitch, packet.isOnGround())); } if ((packet instanceof PlayerPositionLook || packet instanceof PlayerLook)) { var diffX = target.posX - mc.thePlayer.posX; var diffZ = target.posZ - mc.thePlayer.posZ; var diffY = target.posY - mc.thePlayer.posY; var dist = Math.sqrt(diffX * diffX + diffZ * diffZ); var yaw = (Math.atan2(diffZ, diffX) * 180.0 / Math.PI) - 90.0; var pitch = -(Math.atan2(diffY, dist) * 180.0 / Math.PI); switch(AimMode.get()) { case "Normal": packet.yaw = yaw; packet.pitch = pitch; break; case "LockView": mc.thePlayer.rotationYaw = yaw; mc.thePlayer.rotationPitch = pitch; break; case "Random": packet.yaw = yaw + randomIntFrom(-3,3); packet.pitch = pitch + randomIntFrom(-3,3); break; case "Derp": packet.yaw = randomIntFrom(-yaw,yaw); packet.pitch = randomIntFrom(-pitch,pitch); break; } } } var packet = event.getPacket(); if (packet instanceof PlayerLook || packet instanceof PlayerPositionLook) { // Client Sided render mc.thePlayer.renderYawOffset = packet.yaw; mc.thePlayer.rotationYawHead = packet.yaw; } } } this.onAttack = function() { hits++; if (Legit.get()) { mc.thePlayer.swingItem(); } if (Correct.get() && mc.thePlayer.onGround) { mc.thePlayer.motionX /= .60; mc.thePlayer.motionZ /= .60; } if (AutoBlock.get() == true) { if (BlockMode.get() == "Normal" || BlockMode.get() == "Interact" || BlockMode.get() == "Packet" || BlockMode.get() == "Cement") { mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, new BlockPos(0, 0, 0), EnumFacing.UP)); } if (BlockMode.get() == "AAC") { mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, new BlockPos(0, 0, 0), EnumFacing.UP)); mc.thePlayer.keyBindUseItem.pressed = false; } } if (KeepSprint.get() == true) { // Appears to function correctly mc.thePlayer.setSprinting(true); } if (Aim.get() == true && AimMode.get() == "Snap") { cancelz = false; mc.thePlayer.sendQueue.addToSendQueue(new PlayerPositionLook(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, yaw, pitch, mc.thePlayer.onGround)); cancelz = true; } if (Criticals.get() && mc.thePlayer.onGround) { mc.thePlayer.sendQueue.addToSendQueue(new PlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY + 0.08, mc.thePlayer.posZ, true)); mc.thePlayer.sendQueue.addToSendQueue(new PlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, false)); } } this.onDisable = function() { mc.gameSettings.keyBindUseItem.pressed = false; validTarget = false; d = 0; hits = 0; } this.addValues = function(values) { values.add(Mode); values.add(Delay); // values.add(Randomize_APS); values.add(Range); values.add(KeepSprint); values.add(AutoBlock); values.add(BlockMode); values.add(BlockRange); values.add(Aim); values.add(AimMode); // values.add(AimPoint); values.add(ThroughWalls); values.add(NoEatHit); // values.add(Criticals); // values.add(Correct); values.add(Legit); values.add(ClickTP); values.add(SwitchDelay); values.add(TPRange); //values.add(Crasher); values.add(Debug); } } function onLoad() {}; function onEnable() { AuraClient = moduleManager.registerModule(Aura); }; function onDisable() { moduleManager.unregisterModule(AuraClient); };
-
@sigmer No sigmer code a lot worse than this one