What do I want to achieve? I would like to modify a localization table to block key words that most backdoor scripts may include. (EX: “require”, “loadstring”, etc)
What is the issue? I cannot, for the life of me, find a way to block a portion of a total string. (EX: “require(123)” → “blocked(123)” or “local a = loadstring” → “local a = blocked”)
What solutions have I tried so far? I’ve looked on the Developer Hub, but alas, no luck.
I have a short local script to handle this.
local LocalizationService = game:GetService("LocalizationService")
local BlockedString = {
"execute",'executor','exec',"r6","r15","hub","god",
'require','getfenv','setfenv','_G','loadstring','game','getService','workspace'
}
local strs = {}
local extra = "blocked"
for i,v in BlockedString do
table.insert(strs,v)
table.insert(strs,v:sub(1,1):upper()..v:sub(2))
end
for i, v in pairs(strs) do
local localTable = Instance.new("LocalizationTable")
localTable.Parent = LocalizationService
localTable:SetEntries({
{
Key = "0x" .. i,
Source = v,
Values = {
["en-us"] = extra,
}
}
})
end