-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbhop.js
More file actions
50 lines (43 loc) · 1.12 KB
/
bhop.js
File metadata and controls
50 lines (43 loc) · 1.12 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
/// api_version=2
var script = registerScript({
name: "BHop",
version: "2.0.0",
authors: ["Senk Ju"]
});
script.registerModule({
name: "BHop",
description: "An example BHop.",
category: "Movement",
settings: {
timer: Setting.float({
name: "Timer",
min: 1.0,
max: 5.0,
default: 1.2
}),
motion: Setting.float({
name: "Motion",
min: 1.0,
max: 1.05,
default: 1.02
})
}
}, function (module) {
module.on("enable", function () {
y = module.settings.timer.get();
mc.timer.timerSpeed = y
Chat.print("Demo Script loaded.");
});
module.on("disable", function () {
mc.timer.timerSpeed = 1;
});
module.on("motion", function () {
if (!mc.gameSettings.keyBindForward.isKeyDown())
return;
mc.thePlayer.setSprinting(true);
if (mc.thePlayer.onGround)
mc.thePlayer.jump();
mc.thePlayer.motionX *= module.settings.motion.get();
mc.thePlayer.motionZ *= module.settings.motion.get();
});
});