Chat ban patch
Key Required VerifiedUniversal

Chat ban patch

Universal ScriptHypernovaHypernova 223.4K views 463 executesUpdated Jul 21, 2022
5.0/ 5(17 votes)
170100% Positive
Lua Script•112 lines (5666 chars)
game.Loaded:Wait()
getgenv().a=nil
getgenv().c=nil
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local ChatBar=LocalPlayer.PlayerGui:WaitForChild("Chat"):WaitForChild("Frame").ChatBarParentFrame.Frame.BoxFrame.Frame.ChatBar
local ChatMain = LocalPlayer.PlayerScripts:WaitForChild("ChatScript"):WaitForChild("ChatMain")
local MessagePostedEvent
local SayMessageRequest=game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
local StarterGui=game:GetService("StarterGui")
for _, object in next, getgc(true) do
    if type(object) ~= "table" then continue end
    local MessagePosted = rawget(object, "MessagePosted")
    if not MessagePosted then continue end
    local Fire = rawget(MessagePosted, "fire")
    if not Fire then continue end
    local FunctionScript = getfenv(Fire).script
    if FunctionScript ~= ChatMain then continue end
    for _, Event in next, debug.getupvalues(Fire) do
        if typeof(Event) == "Instance" then
            MessagePostedEvent = Event
        end
    end
end
local old;
old=hookmetamethod(game,"__namecall",newcclosure(function(self,...)
    local method=getnamecallmethod()
    if not checkcaller() then
        if method=="FireServer" and self==SayMessageRequest and tostring(getcallingscript())~="ChatMain" then
            warn("Game tried to chat for the player through the SayMessageRequest remote event. Attempt denied.")
            return
        elseif method=="CaptureFocus" and self==ChatBar then
            warn("Game tried to send a legit message through the chat as the local player via capturing the chat focus. Attempt denied.")
            if tostring(getcallingscript())~="ChatScript" then
                if getgenv().a==nil then 
                    setclipboard(getcallingscript().GetFullName(getcallingscript()))
                    StarterGui.SetCore(StarterGui,"SendNotification",{
                        Title="Copied to clipboard",
                        Text="The game is trying to force you to chat in "..getcallingscript().GetFullName(getcallingscript()),
                        Button1="Okay!",
                        Duration=10})
                    StarterGui.SetCore(StarterGui,"SendNotification",{
                        Title="Copied to clipboard",
                        Text="It is recommended you go there (through dex) and disable/delete it to avoid accidentally sending potentially inappropriate messages.",
                        Button1="Okay!",
                        Duration=10})
                    StarterGui.SetCore(StarterGui,"SendNotification",{
                        Title="Copied to clipboard",
                        Text="The path has also been copied to clipboard so you won't lose it in case this warning is gone too fast.",
                        Button1="Okay!",
                        Duration=10})
                    getgenv().a="e"
                end
            end
            return
        elseif method=="ReportAbuse" and self==Players then
            warn("Game tried to report the player. Attempt denied.")
            return error("Ha ha")
        elseif method=="Fire" and self==MessagePostedEvent then
            warn("Game tried using the MessagePosted bindable event. Attempt denied.")
            return
        end
    end
    return old(self,...)
end))
local old2;
old2=hookmetamethod(game,"__index",newcclosure(function(self,b,...)
    if not checkcaller() then
        if b=="FireServer" and self==SayMessageRequest and tostring(getcallingscript())~="ChatMain" then
            warn("Game tried to chat for the player through the SayMessageRequest remote event. Attempt denied.")
            return
        elseif b=="CaptureFocus" and self=="ChatBar" then
            warn("Game tried to send a legit message through the chat as the local player via capturing the chat focus. Attempt denied.")
            if tostring(getcallingscript())~="ChatScript" then
                if c==nil then 
                    setclipboard(getcallingscript():GetFullName())
                    StarterGui:SetCore("SendNotification",{
                        Title="Copied to clipboard",
                        Text="The game is trying to force you to chat in "..getcallingscript():GetFullName(),
                        Button1="Okay!",
                        Duration=10})
                    StarterGui:SetCore("SendNotification",{
                        Title="Copied to clipboard",
                        Text="It is recommended you go there (through dex) and disable/delete it to avoid accidentally sending potentially inappropriate messages.",
                        Button1="Okay!",
                        Duration=10})
                    StarterGui:SetCore("SendNotification",{
                        Title="Copied to clipboard",
                        Text="The path has also been copied to clipboard so you won't lose it in case this warning is gone too fast.",
                        Button1="Okay!",
                        Duration=10})
                    c="e"
                end
            end
            return
        elseif b=="ReportAbuse" and self==Players then
            warn("Game tried to report the player. Attempt denied.")
            return error("Ha ha")
        elseif b=="Fire" and self==MessagePostedEvent then
            warn("Game tried using the MessagePosted bindable event. Attempt denied.")
            return
        end
    end
    return old2(self,b,...)
end))
task.spawn(function()
    while task.wait() do
        if not ChatBar:IsFocused() and ChatBar.Text~="" then 
            ChatBar.Text=""
        end 
    end
end)

Features & Information

The chat ban patch will protect you from the latest Roblox vulnerability that can get you IP banned just for joining a game. This will consistently get updated as more banning methods will arise as a result of Roblox's chat mess. Put this script in the Autoexec folder of your executor. I recommend the loadstring and not the raw code, so you could always have the latest version of this. For those who don't have an autoexec folder and can't run scripts automatically, remove the first line and run the script manually. (Only downside is you'll have to always come back here to see if a new version is available) If you come across any other method that gets you instantly banned feel free to either reply to this release or DM me on discord (Hypernova#0721), and I will add it to this patch. (with credits of course, if you'd like) Do note that because of the way the patch works, you will not be able to open the chat using the "/" key. Instead you would need to click the chat bar. The loadstring: loadstring(game:HttpGet("https://rawscripts.net/raw/Universal-Script-Chat-ban-patch-4334"))()

Community Comments (16)

bkham812bkham812Jul 21, 2022(edited)

does it work

TestingRobloxScriptsTestingRobloxScriptsJul 22, 2022(edited)

You'e a chad for keeping us safe

dekchaifreshdekchaifreshJul 22, 2022(edited)

I don't sure if it actually work but thanks for keeping us safe.

HypernovaHypernovaownerJul 22, 2022(edited)

@bkham812 @Flores this patch does indeed work on all the current methods that are patchable, I have checked it thoroughly. It's to the point where you can't even press "/" to capture chat focus, as a malicious method of the script uses it. Obviously if I find anything more I'll add to it.

HypernovaHypernovaownerJul 22, 2022(edited)

@TestingRobloxScripts thank you! Just trying to save anyone from this mess. Ironic how the exploiters are the only ones who have a chance not to get banned in this situation lol.

dekchaifreshdekchaifreshJul 22, 2022(edited)

@Hypernova Thanks for keeping us safe btw

HypernovaHypernovaownerJul 22, 2022(edited)

@Flores it's my honor =)

BoneBoneJul 22, 2022(edited)

you a legend

HypernovaHypernovaownerJul 22, 2022(edited)

@Bone thank you bone! Glad to be of help to the community

bkham812bkham812Jul 22, 2022(edited)

im on scriptware and it dont work:(

HypernovaHypernovaownerJul 22, 2022(edited)

@bkham812 what do you mean it doesn't work? If you're talking about interface stuff, it's not supposed to show anything. But when the game will try to do something, you will get a warning in the console.

arlantylkibaev23arlantylkibaev23Jul 24, 2022(edited)

thanks bro!

HypernovaHypernovaownerJul 24, 2022(edited)

@arlantylkibaev23 more than happy to help :D

LMXtroLMXtroJul 25, 2022(edited)

The first and possibly last time I have ever seen a script that is trying to keep you safe by combating against roblox, while roblox is constantly finding new ways to harm you. Great work.

HypernovaHypernovaownerJul 25, 2022(edited)

@LMXtro yea, honestly. It's quite ironic that only exploiters have a chance at surviving the ban waves here.

M0LYNM0LYNNov 12, 2025

Can you make a script that's make the user script able to chat if his country banned from chat service

More Scripts for Universal Scripts