forked from Hirohiko360/LiquidBounceScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLagBackVar.js
More file actions
117 lines (106 loc) · 3.98 KB
/
LagBackVar.js
File metadata and controls
117 lines (106 loc) · 3.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
var scriptName = "LagBackCheck";
var scriptAuthor = "Wu_dian";
var scriptVersion = 4.1;
var S08PacketPlayerPosLook = Java.type("net.minecraft.network.play.server.S08PacketPlayerPosLook");
var speed = moduleManager.getModule("Speed");
var fly = moduleManager.getModule("Fly");
var longjump = moduleManager.getModule("LongJump");
var step = moduleManager.getModule("Step");
var speedstate = false;
var flystate = false;
var longjumpstate = false;
var stepstate = false;
function ExampleModule() {
var prefix = "§8[§2LagBackCheck§8]§c ";
var speedValue = value.createBoolean("Speed", false);
var flyValue = value.createBoolean("Fly", true);
var longjumpValue = value.createBoolean("LongJump", true);
var stepValue = value.createBoolean("Step", true);
this.getName = function() {
return "LagBackCheck";
}
this.getDescription = function() {
return "LagBackCheck";
}
this.getCategory = function() {
return "Fun";
}
this.addValues = function(values) {
values.add(speedValue);
values.add(flyValue);
values.add(longjumpValue);
values.add(stepValue);
}
this.onPacket = function(event){
var packet = event.getPacket();
speedstate = speed.getState();
flystate = fly.getState();
longjumpstate = longjump.getState();
stepstate = step.getState();
if (packet instanceof S08PacketPlayerPosLook){
var aaa = packet;
aaa.yaw = mc.thePlayer.rotationYaw;
aaa.pitch = mc.thePlayer.rotationPitch;
if(speedstate){
if(mc.gameSettings.keyBindForward.isKeyDown() || mc.gameSettings.keyBindBack.isKeyDown() || mc.gameSettings.keyBindLeft.isKeyDown() || mc.gameSettings.keyBindRight.isKeyDown()){
if (speedValue.get()){
speed.setState(false);
chat.print(prefix+"Speed Flag detected! Disabled Speed!");
} else {
chat.print(prefix+"Speed Flag detected!");
}
}
}
if(stepstate && mc.thePlayer.motionX == 0 && mc.thePlayer.motionZ == 0){
if(mc.gameSettings.keyBindForward.isKeyDown() || mc.gameSettings.keyBindBack.isKeyDown() || mc.gameSettings.keyBindLeft.isKeyDown() || mc.gameSettings.keyBindRight.isKeyDown()){
if (stepValue.get()){
step.setState(false);
chat.print(prefix+"Step Flag detected! Disabled Step!");
} else {
chat.print(prefix+"Step Flag detected!");
}
}
}
//LongJump LagBackCheck
if(longjumpstate && mc.thePlayer.motionX == 0 && mc.thePlayer.motionZ == 0){
if(mc.gameSettings.keyBindForward.isKeyDown() || mc.gameSettings.keyBindBack.isKeyDown() || mc.gameSettings.keyBindLeft.isKeyDown() || mc.gameSettings.keyBindRight.isKeyDown()){
if (longjumpValue.get()){
longjump.setState(false);
chat.print(prefix+"LongJump Flag detected! Disabled LongJump!");
} else {
chat.print(prefix+"LongJump Flag detected!");
}
}
}
if(flystate){
if(mc.gameSettings.keyBindForward.isKeyDown() || mc.gameSettings.keyBindBack.isKeyDown() || mc.gameSettings.keyBindLeft.isKeyDown() || mc.gameSettings.keyBindRight.isKeyDown()){
if (flyValue.get()){
fly.setState(false);
chat.print(prefix+"Fly Flag detected! Disabled Fly!");
} else {
chat.print(prefix+"Fly Flag detected!");
}
}
}
}
}
this.onUpdate = function(){
//LongJump Auto Disable
if(longjumpstate && mc.thePlayer.motionX == 0 && mc.thePlayer.motionZ == 0){
if(mc.gameSettings.keyBindForward.isKeyDown() || mc.gameSettings.keyBindBack.isKeyDown() || mc.gameSettings.keyBindLeft.isKeyDown() || mc.gameSettings.keyBindRight.isKeyDown()){
if (longjumpValue.get()){
longjump.setState(false);
}
}
}
}
}
var exampleModule = new ExampleModule();
var exampleModuleClient;
function onLoad() {}
function onEnable() {
exampleModuleClient = moduleManager.registerModule(exampleModule);
}
function onDisable() {
moduleManager.unregisterModule(exampleModuleClient);
}