forked from Hirohiko360/LiquidBounceScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLongJump.js
More file actions
59 lines (53 loc) · 1.35 KB
/
LongJump.js
File metadata and controls
59 lines (53 loc) · 1.35 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
var scriptName = "Longjump 2";
var scriptVersion = 1.0;
var scriptAuthor = "Soulplexis";
Math.radians = function(degrees) {
return degrees * Math.PI / 180;
};
var longjump = moduleManager.getModule("LongJump");
function Module() {
this.getName = function () {
return "LongHop";
};
var jumped = false;
this.getDescription = function () {
return "LongJump helper.";
};
this.getCategory = function () {
return "Movement";
};
this.onMotion = function () {
if(longjump.getState() == true) {
if(mc.thePlayer.movementInput.moveForward == 0 && mc.thePlayer.movementInput.moveStrafe == 0) {
mc.thePlayer.motionX = 0;
mc.thePlayer.motionZ = 0;
}
if(!mc.thePlayer.onGround) {
jumped = true;
}
if(jumped == true && mc.thePlayer.onGround) {
longjump.setState(false);
jumped = false;
mc.thePlayer.motionX = 0;
mc.thePlayer.motionZ = 0;
}
}
}
this.onJump = function(){
}
this.onDisable = function() {
}
this.onEnable = function() {
jumped = false;
}
this.addValues = function(values) {
}
}
var Module = new Module();
var ModuleClient;
function onEnable() {
ModuleClient = moduleManager.registerModule(Module);
};
function onDisable() {
moduleManager.unregisterModule(ModuleClient);
};