Chat Exploit Lags Games

I’ve found a snippet of code that lags the game indefinitely. How can I patch this?

local malformed = string.rep("ก็็็▌▓", math.random(10000, 2e5))
local remote = game:GetService'ReplicatedStorage'.DefaultChatSystemChatEvents:WaitForChild'SayMessageRequest'
while wait() do
    remote:FireServer(malformed, malformed)
end
2 Likes

You could write a server script to monitor that remote and kick users who post messages that are too long, or fire the event too quickly.

2 Likes

If you really want to go all in you could possibly fork the core chat module and edit it to prevent spam messages from being displayed to the other players entirely.

THIS. It’s a larger issue and needs addressing…


1 Like

Why not use LogService.MessageOut?
It’s simple.

If that’s a malformed string as you say it is, that would cause the utf8 library to error. This is sort of a janky solution, but you could do something like

pcall(function()
    for _, _ in pairs(utf8.graphemes(string) do end
end)

God, Roblox needs to up their chat scripts now?