Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.78 KB | None | 0 0
  1. package io.dank.aimbot
  2.  
  3. import org.lwjgl.input.Keyboard;
  4. import cpw.mods.fml.client.config.GuiSlider;
  5. import net.minecraft.client.gui.GuiButton;
  6. import net.minecraft.client.gui.GuiScreen;
  7.  
  8. public class AimbotGui extends GuiScreen
  9. {
  10. private boolean isAimbotOn;
  11. private GuiButton aimbotLabel;
  12. private GuiButton aimbotToggle;
  13. private GuiSlider aimbotSpeed;
  14. private GuiButton aimbotSpeedLabel;
  15. private GuiSlider aimbotDistance;
  16. private GuiButton aimbotDistanceLabel;
  17. private GuiSlider fovSlider;
  18. private GuiButton fovLabel;
  19. private GuiButton bindLabel;
  20. private GuiButton bind;
  21. private GuiButton disableLabel;
  22. private GuiButton disable;
  23.  
  24. public AimbotGui() {
  25. super();
  26. this.isAimbotOn = true;
  27. this.aimbotLabel = new GuiButton(1, 20, 0, 0, 20, "Aimbot : ");
  28. this.aimbotToggle = new GuiButton(1, 40, 0, 20, 20, "On");
  29. this.aimbotSpeedLabel = new GuiButton(8, 16, 20, 0, 20, "Speed:");
  30. this.aimbotSpeed = new GuiSlider(1, 40, 20, 100, 20, "", "", 10.0, 50.0, 20.0, false, true);
  31. this.aimbotDistance = new GuiSlider(1, 60, 40, 100, 20, "", "", 30.0, 60.0, 45.0, false, true);
  32. this.aimbotDistanceLabel = new GuiButton(1, 25, 40, 0, 20, "Distance: ");
  33. this.fovLabel = new GuiButton(2, 10, 60, 0, 20, "FOV:");
  34. this.fovSlider = new GuiSlider(1, 30, 60, 100, 20, "", "", 40.0, 120.0, 70.0, false, true);
  35. this.bindLabel = new GuiButton(1, 14, 80, 0, 20, "Bind: ");
  36. this.bind = new GuiButton(1, 26, 80, 10, 20, "F");
  37. this.disableLabel = new GuiButton(1, 45, 100, 0, 20, "Disable on Death: ");
  38. this.disable = new GuiButton(1, 88, 100, 20, 20, "On");
  39. }
  40.  
  41. public void func_73866_w_() {
  42. this.field_146292_n.add(this.aimbotToggle);
  43. this.field_146292_n.add(this.aimbotLabel);
  44. this.field_146292_n.add(this.aimbotSpeed);
  45. this.field_146292_n.add(this.aimbotSpeedLabel);
  46. this.field_146292_n.add(this.aimbotDistance);
  47. this.field_146292_n.add(this.aimbotDistanceLabel);
  48. this.field_146292_n.add(this.fovSlider);
  49. this.field_146292_n.add(this.fovLabel);
  50. this.field_146292_n.add(this.bindLabel);
  51. this.field_146292_n.add(this.bind);
  52. this.field_146292_n.add(this.disable);
  53. this.field_146292_n.add(this.disableLabel);
  54. }
  55.  
  56. public void func_73863_a(final int mouseX, final int mouseY, final float partialTicks) {
  57. this.func_146276_q_();
  58. super.func_73863_a(mouseX, mouseX, partialTicks);
  59. }
  60.  
  61. protected void func_146284_a(final GuiButton button) {
  62. if (button == this.aimbotToggle) {
  63. this.toggleAimbot();
  64. }
  65. if (button == this.bind) {
  66. this.setBind();
  67. }
  68. if (button == this.disable) {
  69. this.toggleDisable();
  70. }
  71. }
  72.  
  73. private void toggleDisable() {
  74. this.disable.field_146126_j = (this.disable.field_146126_j.equals("Off") ? "On" : "Off");
  75. }
  76.  
  77. private void setBind() {
  78. this.bind.field_146126_j = Keyboard.getKeyName(Keyboard.getEventKey());
  79. }
  80.  
  81. public void toggleAimbot() {
  82. this.isAimbotOn = !this.isAimbotOn;
  83. this.aimbotToggle.field_146126_j = (this.isAimbotOn ? "On" : "Off");
  84. }
  85.  
  86. public int getBind() {
  87. return Keyboard.getKeyIndex(this.bind.field_146126_j);
  88. }
  89.  
  90. public boolean isAimbotEnabled() {
  91. return this.isAimbotOn;
  92. }
  93.  
  94. public double getSpeed() {
  95. return this.aimbotSpeed.getValueInt() / 10.0;
  96. }
  97.  
  98. public double getDistance() {
  99. return this.aimbotDistance.getValueInt() / 10.0;
  100. }
  101.  
  102. public int getFov() {
  103. return this.fovSlider.getValueInt();
  104. }
  105. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement