-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbypass-hook.lua
38 lines (33 loc) · 977 Bytes
/
bypass-hook.lua
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
local BYPASS_TABLE = {
['discord'] = 'disco{{aieixzvzx:rd}}',
['discord.com'] = 'disco{{aieixzvzx:rd.com}}',
}
local rs = game:GetService 'ReplicatedStorage'
local dcse = rs:WaitForChild 'DefaultChatSystemChatEvents'
local smr = dcse:WaitForChild 'SayMessageRequest'
local hook_m
hook_m = hookmetamethod(
smr, '__namecall', function(self, ...)
local m_name = getnamecallmethod()
local m_args = {...}
if self ~= smr or m_name ~= 'FireServer' then --
return hook_m(self, ...)
end
local msg = m_args[1]
return string.gsub(
msg, '%S+', function(sec)
local low = sec:lower()
local upp = sec:upper()
local bypass = BYPASS_TABLE[low]
if not bypass then return sec end
local bypass_upp = bypass:upper()
if upp == sec then return bypass_upp end
local sec_f = sec:sub(1, 1)
local upp_f = upp:sub(1, 1)
if upp_f == sec_f then
return bypass_upp:sub(1, 1) .. bypass:sub(2)
else
return bypass
end
end)
end)