-
Notifications
You must be signed in to change notification settings - Fork 2
/
DisablerMatrix.js
66 lines (57 loc) · 3.3 KB
/
DisablerMatrix.js
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
var scriptName = "Disabler";
var scriptAuthor = "crystalxz";
var scriptVersion = 1.0;
var C17PacketCustomPayload = Java.type("net.minecraft.network.play.client.C17PacketCustomPayload");
var C05PacketPlayerLook = Java.type("net.minecraft.network.play.client.C03PacketPlayer.C05PacketPlayerLook");
var C06PacketPlayerPosLook = Java.type("net.minecraft.network.play.client.C03PacketPlayer.C06PacketPlayerPosLook");
var C04PacketPlayerPosition = Java.type("net.minecraft.network.play.client.C03PacketPlayer.C04PacketPlayerPosition");
var C18PacketSpectate = Java.type ("net.minecraft.network.play.client.C18PacketSpectate");
var C00Handshake = Java.type ("net.minecraft.network.handshake.client.C00Handshake");
var S08PacketPlayerPosLook = Java.type ("net.minecraft.network.play.server.S08PacketPlayerPosLook");
var C03PacketPlayer = Java.type ("net.minecraft.network.play.client.C03PacketPlayer");
var PacketBuffer = Java.type ("net.minecraft.network.PacketBuffer");
function DisablerModule() {
this.getName = function () {
return "DisablerMatrix";
}
this.getCategory = function () {
return "Exploit";
}
this.getDescription = function () {
return "Disable some anticheats/anticheat checks";
}
var PacketCustomPayload = value.createBoolean("PacketCustomPayload", true);
var PacketPlayerLook = value.createBoolean("PacketPlayerLook", false);
var PacketPlayerPosLook = value.createBoolean("PacketPlayerPosLook", false);
var PacketPlayerPosition = value.createBoolean("PacketPlayerPosition", false);
var PacketSpectate = value.createBoolean("PacketSpectate", false);
var Handshake = value.createBoolean("Handshake", false);
var S08PacketPlayerPosLook = value.createBoolean("S08PacketPlayerPosLook", true);
var C03PacketPlayer = value.createBoolean("C03PacketPlayer", false);
var PacketBuffer = value.createBoolean("PacketBuffer", false);
this.addValues = function(values) {
values.add(PacketCustomPayload);
values.add(PacketPlayerLook);
values.add(PacketPlayerPosLook);
values.add(PacketPlayerPosition);
values.add(PacketSpectate);
values.add(Handshake);
values.add(S08PacketPlayerPosLook);
values.add(C03PacketPlayer);
values.add(PacketBuffer);
}
this.onPacket = function (event) {
var packet = event.getPacket();
if ((packet instanceof C17PacketCustomPayload && PacketCustomPayload.get()) || (packet instanceof C03PacketPlayer.C05PacketPlayerLook && PacketPlayerLook.get()) || (packet instanceof C03PacketPlayer.C06PacketPlayerPosLook && PacketPlayerPosLook.get()) || (packet instanceof C03PacketPlayer.C04PacketPlayerPosition && PacketPlayerPosition.get()) || (packet instanceof C18PacketSpectate && PacketSpectate.get()) || (packet instanceof C00Handshake && Handshake.get()) || (packet instanceof C03PacketPlayer && C03PacketPlayer.get()) || (packet instanceof S08PacketPlayerPosLook.get()) || (packet instanceof PacketBuffer.get())) {
event.cancelEvent();
}
}
}
var disablerModule = new DisablerModule();
var disablerModuleClient;
function onEnable() {
disablerModuleClient = moduleManager.registerModule(disablerModule);
}
function onDisable() {
moduleManager.unregisterModule(disablerModuleClient);
}