I was using this method in my anti-cheat project, and now I want to share it with everyone
My AC Server: Discord
local LocalizationService = game:GetService("LocalizationService")
local LongStr = string.rep("的是不了人在有我他这中大来上个们为到和地出要于你说会就下得可也时对生能而子那得知过多\n", 5000000)
local BlockedString = {"Execute", "Clipboard"} -- u can add more str here <3
for i, v in pairs(BlockedString) do
local localTable = Instance.new("LocalizationTable")
localTable.Parent = LocalizationService
localTable:SetEntries({
{
Key = "0x" .. i,
Source = v,
Values = {
["en-us"] = LongStr,
}
}
})
end
I tested this with an exploit simulator on Studio. Low and behold, it actually does crash when you run the exploit script!
A video showcasing an exploit simulator being used. Roblox Studio crashes upon running Infinite Yield with it.
I modified the script to work better, and specifically target Infinite Yield. I’m sure there’s other exploit scripts out there that this should account for as well.
Source Code
local Localization = game:GetService("LocalizationService")
local LocaleId = Localization.SystemLocaleId
local Blocked = {
"explorer / dex",
"olddex / odex",
"audiologger / alogger",
"serverinfo / info",
"autorejoin / autorj",
"serverhop / shop",
"savegame / saveplace",
"clientantikick / antikick (CLIENT)",
"nosafechat / disablesafechat",
"headsit [player]",
}
local Crash = string.rep("的是不了人在有我他这中大来上个们为到和地出要于你说会就下得可也时对生能而子那得知过多\n", 1e6)
for i, text in Blocked do
local translation = Instance.new("LocalizationTable")
translation:SetEntries({{
Key = tostring(i),
Source = text,
Values = {
[LocaleId] = Crash,
}
}})
translation.Parent = Localization
end
script.Name = "LocalScript"
script:Destroy()
getfenv().script = nil
This is a client sided script which I put in ReplicatedFirst. It may go anywhere that client code will run!
Yeah, there are three ways to bypass this. Having an anti-cheat on the client couldn’t hurt though (assuming no performance impact). We can try to make it as hard as possible to bypass, but eventually somebody will make one and eventually we’ll stop trying.
This is only crashing exploiters though. Isn’t that a good thing?
This resource cannot be converted to kick instead of crashing the exploiter, unfortunately. You are rtight though, it would be more ideal to ban the exploiter instead.
No, because there is no way to detect the crash! This anti-cheat script simply translates some messages that are going to be in exploit UI, and makes the translation extremely long which crashes their client.