public class AntiAim extends Hack {
private final BooleanSetting realBoolean = new BooleanSetting("Менять хитбокс", false);
private final BooleanSetting randomReal = new BooleanSetting("Анти-Брутфорс", true).setVisible(() -> realBoolean.get());
private final BooleanSetting fakeBoolean = new BooleanSetting("Визуальные АА", true);
private final ModeSetting fakeModeYaw = new ModeSetting("Менять Yaw", "Jitter", "Jitter", "Static", "Random", "Defense").setVisible(() -> fakeBoolean.get());
private final SliderSetting yawSlider = new SliderSetting("Угол Yaw", 60, 1, 70, 1).setVisible(() -> fakeBoolean.get() && fakeModeYaw.is("Jitter"));
private final ModeSetting fakeModePitch = new ModeSetting("Менять Pitch", "Defense", "Defense", "Custom").setVisible(() -> fakeBoolean.get());
private final SliderSetting pitchSlider = new SliderSetting("Угол Pitch", 65, 0, 90, 1).setVisible(() -> fakeBoolean.get());
private final BooleanSetting zeroPitch = new BooleanSetting("Zero pitch on land", false).setVisible(() -> fakeBoolean.get());
private final BooleanSetting chivoBlyat = new BooleanSetting("Отображать у всех", false).setVisible(() -> fakeBoolean.get());
public AntiAim() {
addSettings(realBoolean, randomReal, fakeBoolean, fakeModeYaw, fakeModePitch, zeroPitch, yawSlider, pitchSlider, chivoBlyat);
}
float yaw = 0;
float pitch = 0;
long timeLanded = 0;
int delayTime = 500;
boolean can = true;
@Override
public void onMotion(EventMotion e) {
if (!Client.getInstance().getHackManager().getKillAura().isState() || Client.getInstance().getHackManager().getKillAura().isState() && Client.getInstance().getHackManager().getKillAura().getTarget() == null) {
if (fakeBoolean.get()) {
if (mc.gameSettings.keyBindUseItem.pressed || Client.getInstance().getHackManager().getAutopotion().isActive() || mc.gameSettings.keyBindAttack.pressed || mc.currentScreen != null) {
can = false;
return;
} else {
can = true;
}
// yaw
if (fakeModeYaw.is("Jitter")) {
if (mc.player.ticksExisted % 2 == 0) {
yaw = mc.player.rotationYawHead = mc.player.renderYawOffset = mc.player.rotationYaw + yawSlider.get() + 180;
} else {
yaw = mc.player.rotationYawHead = mc.player.renderYawOffset = mc.player.rotationYaw - yawSlider.get() + 180;
}
}
if (fakeModeYaw.is("Static")) {
yaw = mc.player.rotationYawHead = mc.player.renderYawOffset = mc.player.rotationYaw + 180;
}
if (fakeModeYaw.is("Defense")) {
yaw = mc.player.rotationYawHead = mc.player.renderYawOffset = mc.player.rotationYaw + 180;
if (mc.player.ticksExisted % (int)MathUtil.randomizeFloat(2, 6) == 0) {
yaw = mc.player.rotationYawHead = mc.player.renderYawOffset = mc.player.rotationYaw + (int)MathUtil.randomizeFloat(12, 60) + 200;
} else {
yaw = mc.player.rotationYawHead = mc.player.renderYawOffset = mc.player.rotationYaw - (int)MathUtil.randomizeFloat(12, 60) + 200;
}
}
if (fakeModeYaw.is("Random")) {
int i = (int)MathUtil.randomizeFloat(1, 180);
if ((int)MathUtil.randomizeFloat(1, 2) == 1) {
yaw = mc.player.rotationYawHead = mc.player.renderYawOffset = mc.player.rotationYaw + 180 + i;
} else {
yaw = mc.player.rotationYawHead = mc.player.renderYawOffset = mc.player.rotationYaw + 180 - i;
}
}
//pitch
if (fakeModePitch.is("Custom")) {
pitch = mc.player.rotationPitchHead = pitchSlider.get();
}
if (fakeModePitch.is("Defense")) {
pitch = mc.player.rotationPitchHead = pitchSlider.get();
if (mc.player.ticksExisted % (int)MathUtil.randomizeFloat(4, 12) == 0) {
pitch = mc.player.rotationPitchHead = -65;
}
}
if (zeroPitch.get()) {
if (mc.player.isOnGround()) {
if (timeLanded == 0) {
timeLanded = System.currentTimeMillis();
}
if (System.currentTimeMillis() - timeLanded <= delayTime) {
pitch = mc.player.rotationPitchHead = 0;
}
} else {
timeLanded = 0;
}
}
if (chivoBlyat.get()) {
if (can) {
e.setPitch(pitch);
e.setYaw(yaw);
}
}
}
}
}
@Override
public void onUpdate(EventUpdate e) {
if (realBoolean.get()) {
if (mc.player.isInWater() || mc.gameSettings.keyBindUseItem.pressed || Client.getInstance().getHackManager().getAutopotion().isActive() || mc.gameSettings.keyBindAttack.pressed || mc.currentScreen != null) {
mc.player.stopFallFlying();
return;
}
int i = 4;
if (randomReal.get()) {
i = (int)MathUtil.randomizeFloat(4, 8);
}
if (mc.player.ticksExisted % i == 0) {
mc.player.startFallFlying();
} else {
mc.player.stopFallFlying();
}
}
}
public void reset() {
yaw = mc.player.rotationYaw;
pitch = mc.player.rotationPitch;
}
@Override
public void onDisable() {
reset();
super.onDisable();
}
}