Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Flight extends Module {
- public static boolean active;
- @Option.Op(min = 0.0D, max = 10.0D, increment = 0.4D, name = "Vanilla Speed")
- public static double vSpeed = 0.4D;
- @Option.Op(name = "Hypixel")
- public static boolean Mode1 = false;
- @Option.Op(name = "Vanilla")
- public static boolean Mode2 = true;
- @Option.Op(name = "Packet")
- public static boolean Mode3 = false;
- @Option.Op(name = "Mineplex")
- public static boolean Mode4 = false;
- @Option.Op(name = "Guardian Timer")
- public static boolean Mode5 = false;
- public static String modname;
- public boolean zoomies = false;
- int counter;
- public Flight() {
- super("Flight", 0, Category.MOVEMENT, true);
- }
- public void onUpdate() {
- if (!this.isEnabled)
- return;
- if (this.Mode1 == true) {
- Minecraft.thePlayer.motionY = 0f;
- mode1();
- modname = "Hypixel";
- } else if (this.Mode2 == true) {
- // Check mode2\\
- mode2();
- modname = "Vanilla";
- } else if (this.Mode3 == true) {
- mode3();
- modname = "Packet";
- } else if (this.Mode5 == true) {
- mode5();
- modname = "Guardian Timer";
- } else if (this.Mode4 == true) {
- mode4();
- super.onUpdate();
- }
- }
- private void mode5() {
- if (Flight.Mode5 == true) {
- Flight.modname = "Guardian Timer";
- int xd = 0;
- if (ClientUtils.mc().gameSettings.keyBindJump.pressed) {
- ClientUtils.mc().thePlayer.motionY = 1;
- }
- if (ClientUtils.mc().gameSettings.keyBindSneak.pressed) {
- ClientUtils.mc().thePlayer.motionY = (-1);
- }
- if ((isMoving(ClientUtils.player())) && (!ClientUtils.mc().gameSettings.keyBindJump.pressed)
- && (!ClientUtils.mc().gameSettings.keyBindSneak.pressed)
- && ((ClientUtils.mc().thePlayer.motionY <= -0.41D) || (ClientUtils.mc().thePlayer.onGround))) {
- damagePlayer((int) 0.1);
- setSpeed(0.2873D * 1 * 10.0D);
- ClientUtils.mc().thePlayer.motionY = -0.6D;
- Timer timer = ClientUtils.mc().timer;
- Timer.timerSpeed = 0.8F;
- Object dawd = new HashMap();
- ArrayList<Object[]> edeffesesfsfe = new ArrayList();
- for (int j = 0; (j < new String[] { "RDMSTRING" }.length) && (j == 1); j++) {
- }
- ByteArrayOutputStream adawadwadsdaw = new ByteArrayOutputStream();
- String[] awsfddda = new String[1];
- int[] dwsdfsfdadd = new int[3];
- char[] arrayOfChar = new char[23];
- }
- if ((!ClientUtils.mc().gameSettings.keyBindJump.pressed)
- && (!ClientUtils.mc().gameSettings.keyBindSneak.pressed)
- && ((ClientUtils.mc().thePlayer.motionY <= -0.42D) || (ClientUtils.mc().thePlayer.onGround))) {
- ClientUtils.mc().thePlayer.motionY = 0.4D;
- }
- }
- }
- public static boolean isMoving(Entity ent) {
- return (Minecraft.getMinecraft().thePlayer.moveForward != 0.0F)
- || (Minecraft.getMinecraft().thePlayer.moveStrafing != 0.0F);
- }
- public static void setSpeed(double speed) {
- ClientUtils.mc().thePlayer.motionX = (-MathHelper.sin(getDirection()) * speed);
- ClientUtils.mc().thePlayer.motionZ = (MathHelper.cos(getDirection()) * speed);
- }
- public static float getDirection() {
- float yaw = ClientUtils.mc().thePlayer.rotationYawHead;
- float forward = ClientUtils.mc().thePlayer.moveForward;
- float strafe = ClientUtils.mc().thePlayer.moveStrafing;
- yaw += (forward < 0.0F ? 180 : 0);
- if (strafe < 0.0F) {
- yaw += (forward == 0.0F ? 90 : forward < 0.0F ? -45 : 45);
- }
- if (strafe > 0.0F) {
- yaw -= (forward == 0.0F ? 90 : forward < 0.0F ? -45 : 45);
- }
- return yaw * 0.017453292F;
- }
- private void mode1() {
- if (Mode1) {
- modname = "Hypixel";
- mc.thePlayer.motionY = 0;
- mc.thePlayer.onGround = false;
- if (!mc.thePlayer.isMoving()) {
- mc.thePlayer.setSpeed(0);
- } else {
- mc.thePlayer.setSpeed(0.259);
- }
- for (int i = 0; i < 3; i++) {
- mc.thePlayer.setPosition(mc.thePlayer.posX, mc.thePlayer.posY + 1.0E-12, mc.thePlayer.posZ);
- if (mc.thePlayer.ticksExisted % 3 == 0) {
- mc.thePlayer.setPosition(mc.thePlayer.posX, mc.thePlayer.posY - 1.0E-12, mc.thePlayer.posZ);
- }
- }
- }
- }
- private void mode2() {
- if (Mode2) {
- modname = "Vanilla";
- mc.thePlayer.onGround = true;
- Minecraft.thePlayer.capabilities.isFlying = true;
- if (mc.thePlayer.isMoving()) {
- Minecraft.thePlayer.setSpeed(vSpeed);
- } else {
- mc.thePlayer.setSpeed(0);
- }
- }
- }
- private void mode3() {
- if (Flight.Mode3 == true) {
- Flight.modname = "Packet";
- mc.thePlayer.motionY = 1.0E-8D;
- mc.timer.timerSpeed = (this.zoomies ? 1 : 1);
- mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer.C06PacketPlayerPosLook(
- mc.thePlayer.posX + mc.thePlayer.motionX * 11.0D,
- mc.thePlayer.posY
- + (mc.gameSettings.keyBindJump.pressed ? 0.0624D : this.zoomies ? 0.0625D : 1.0E-8D)
- - (mc.gameSettings.keyBindSneak.pressed ? 0.0624D : this.zoomies ? 0.0625D : 2.0E-8D),
- mc.thePlayer.posZ + mc.thePlayer.motionZ * 11.0D, mc.thePlayer.rotationYaw,
- mc.thePlayer.rotationPitch, false));
- mc.thePlayer.sendQueue.addToSendQueue(
- new C03PacketPlayer.C06PacketPlayerPosLook(mc.thePlayer.posX + mc.thePlayer.motionX * 11.0D,
- mc.thePlayer.posY + 1337.0D, mc.thePlayer.posZ + mc.thePlayer.motionZ * 11.0D,
- mc.thePlayer.rotationYaw, mc.thePlayer.rotationPitch, false));
- this.zoomies = (!this.zoomies);
- }
- }
- public void mode4() {
- if (Mode4) {
- this.modname = "Mineplex";
- this.counter += 1;
- if (mc.theWorld.getBlock((int) mc.thePlayer.posX, (int) mc.thePlayer.posY - 1,
- (int) mc.thePlayer.posZ) == Blocks.air && mc.thePlayer.isMoving()) {
- mc.thePlayer.motionY = 0.005D;
- mc.thePlayer.onGround = true;
- mc.thePlayer.setSpeed(0.9);
- mc.thePlayer.motionY = 0.41D - 0.41532D;
- this.counter += 1;
- if (this.counter > 10) {
- mc.thePlayer.swingItem();
- this.counter = 0;
- }
- } else {
- mc.thePlayer.setSpeed(0);
- }
- }
- }
- public void onDisable() {
- ClientUtils.mc().thePlayer.capabilities.setFlySpeed(0.0453F);
- mc.timer.timerSpeed = 0.1f;
- mc.timer.timerSpeed = 1.0f;
- mc.thePlayer.setSpeed(0);
- mc.thePlayer.capabilities.isFlying = false;
- if (mc.thePlayer.capabilities.isCreativeMode == false) {
- mc.thePlayer.capabilities.allowFlying = false;
- Minecraft.thePlayer.onGround = false;
- Minecraft.thePlayer.capabilities.isFlying = false;
- active = false;
- super.onDisable();
- }
- }
- public void damagePlayer(int value) {
- for (int i = 0; i < (70 * value); i++) {
- mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX,
- mc.thePlayer.posY + 0.06D, mc.thePlayer.posZ, false));
- mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX,
- mc.thePlayer.posY, mc.thePlayer.posZ, false));
- }
- mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX,
- mc.thePlayer.posY + 0.1D, mc.thePlayer.posZ, false));
- }
- public void onEnable() {
- active = true;
- if (Mode4) {
- mc.thePlayer.addVelocity(0, 0.33, 0);
- mc.thePlayer.jump();
- mc.thePlayer.setSpeed(7);
- mc.thePlayer.swingItem();
- }
- super.onEnable();
- }
- public String getValue() {
- return modname;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement