-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDebug.js
More file actions
99 lines (89 loc) · 2.54 KB
/
Debug.js
File metadata and controls
99 lines (89 loc) · 2.54 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
var scriptName = "Debug";
var scriptVersion = 1.0;
var scriptAuthor = "AquaVit";
script.import('lib/minecraftUtils.js');
script.import('lib/timingFunctions.js');
script.import('lib/glFunctions.js');
script.import('lib/systemFunctions.js');
var r, g, b, rainbowspeed;
var thicc;
var borderColor;
var borderOpacity;
var borderColorComplete = '0x' + borderOpacity + borderColor;
var rainbowBoolean;
var c;
var PlayerHeight;
var j;
var VelocityModule = moduleManager.getModule("Velocity");
var Debug = new Debug();
var client;
function Debug() {
var X;
var debug = value.createBoolean("Debug", true);
var AirVelocity = value.createBoolean("AirVelocity", true);
this.getName = function() {
return "Debug";
};
this.getDescription = function() {
return "AquaVit";
};
this.getCategory = function() {
return "Fun";
};
this.onEnable = function() {
borderOpacity = 'FF';
borderColor = 'DA70D6';
c = 0;
thicc = 2;
rainbowspeed = 40 / 500;
}
this.onUpdate = function() {
PlayerHeight = mc.thePlayer.posY.toFixed(1);
J = PlayerHeight.split(".");
X = J[1]
if(AirVelocity.get()) {
if(mc.thePlayer.onGround) {
VelocityModule.setState(true)
} else {
VelocityModule.setState(false)
}
}
if (mc.ingameGUI.getChatGUI().getChatOpen() == false) {
if (true) {
if (44 > c) {
r = parseInt((Math.sin(c + Math.PI) + 1) * 127.5);
g = parseInt((Math.sin(c + (Math.PI / 2)) + 1) * 127.5);
b = parseInt(((Math.sin(c) + 1) * 127.5));
c = c + rainbowspeed;
borderColor = ('0' + r.toString(16)).slice(-2) + ('0' + g.toString(16)).slice(-2) + ('0' + b.toString(16)).slice(-2)
} else {
c = 0;
}
}
}
}
this.onRender2D = function() {
if (mc.ingameGUI.getChatGUI().getChatOpen() == false) {
var mcHeight = getScaledHeight();
var mcWidth = getScaledWidth();
borderColorComplete = '0x' + borderOpacity + borderColor;
if(debug.get()) {
if (mc.thePlayer.onGround && X == 5) {
mc.fontRendererObj.drawStringWithShadow("Debug! You're on incomplete block!", mcWidth - mcWidth / 2 - 58, mcHeight - mcHeight / 2 - 15, 0xFF3300)
}
}
}
}
this.onDisable = function () {}
this.addValues = function(values) {
values.add(debug);
values.add(AirVelocity);
}
}
function onLoad() {}
function onEnable() {
client = moduleManager.registerModule(Debug);
}
function onDisable() {
moduleManager.unregisterModule(client);
}