-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChatBypass.js
50 lines (37 loc) · 1.34 KB
/
ChatBypass.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
//@ author Fuji@Leo728
//@ version 1.0
//@ description A script that bypass chat filters.
var module = rise.registerModule("ChatBypass", "Gives you the right to say n1g/e® in hypixel. Freedom of Speech!!!!!! America!!!!")
script.handle("onUnload", function () {
module.unregister()
})
function toShitChar(message) {
var field1 = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789";
var field2 = "qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnm0123456789"
var result = ""
for (var i = 0; i < message.length; i++) {
var char = message.charAt(i)
var index = field1.indexOf(char)
if (index !== -1) {
result += field2.charAt(index)
} else {
result += char
}
}
return result
}
module.handle("onChatInput", function (e) {
var message = e.getMessage()
// Ignore normal commands
if (message.startsWith("/") || message.startsWith(".")) {
return e
}
var modifiedMessage = ""
modifiedMessage = toShitChar(message)
if (modifiedMessage.length > 100) {
modifiedMessage = modifiedMessage.substring(0, 100)
}
packet.sendMessage(modifiedMessage)
e.setCancelled(true)
return e
})