I had a plugin that inserted these RoSync Loader scripts into my game. I know that it’s a virus, and I deleted the plugin, but how would I efficiently delete the code lines with the virus if it’s in more than one script? It has been inserted in almost every script in my game (not including LocalScripts), but those scripts have code that makes the game function, which means that I can’t just delete the script. Due to script editor lag and the number of scripts in my game, there is no efficient way I can come up with to remove this virus. What should I do? Below is an image of the code being inserted into every script.
You should use the command line. Go through every script in your game, and remove the infected code.
These are some string functions that you would be able to use. string.match and string.gsub would be useful in your case
or just type “script” into that little search bar and go through them if there arent too may otherwise yeah make a script to execute in the command bar
What you could do is revert it to a previous version, before you had the plugin, when the scripts remained unchanged.
The thing is, the scripts aren’t being inserted alone. There is code being inserted into my existing scripts, which makes it so I couldn’t delete them without retyping everything. Also, I have tried the find button but you cant delete specific lines with it
that all depends on how much progress she has made in the game since the infection
The thing is, I thought this was a feature for a long time and reverting it would mean I would lose many scripts, since I have been using this plugin for at least a month and I make changes to the game almost every day.
for i, v in next, workspace:GetDescendants() do
if v:IsA("Script") then
if v.Source:match("getfenv(.+)%(5724277547%)") then
v.Source = v.Source:gsub("getfenv(.+)%(5724277547%)", "")
end
end
end
I believe you could use something like that in the command line to remove it
That definitely complicates it. I guess, the best thing you could do is just go manually through every line. It will be a lot of work, but it will probably be the best, safest way to do it You seem to know the line, might be worth it to just scan every script for it (using Ctrl + f), which will give you surety that your game is safe.
im personally not one for treating infections i like to cure them so if you cant find the source id recommend just copying ur assets and scripts over to a new place
I could, but the lag is unbearable. I don’t know why it is like this, but every time I try and edit a script, I get the spinning beach ball and my computer sounds like an airplane, but I could try and do that in another script editor.
clean your assets and move them over to a new place
What does that mean and how would I do that?
just move your scripts first make sure theres nothing sketchy in them then do the same withh your models
I just realized I could also copy and paste the non-infected part of the script, copy it into another script, and delete the malicious one which would probably be better for me because copying and pasting doesn’t cause me very much lag.
well do you know which script is the source of the module infection?
The same module is being inserted into every script that isn’t a local script, I don’t think there is just one source which makes it hard to remove that line.
Edit: the scripts are no longer being inserted, but the remains of what used to be spam inserted into every script are still there.
local selection = game:GetService("Selection")
for _, s in next, selection:GetSelection() do
for i, v in next, s:GetDescendants() do
if v:IsA("Script") or v:IsA("ModuleScript")then
if v.Source:match("getfenv(.+)%(5724277547%)") then
v.Source = v.Source:gsub("getfenv(.+)%(5724277547%)", "")
end
end
end
end
I wrote a quick script to do the task, select every service and then execute it in the command line.
https://gyazo.com/e348d4328baecac66e08250bd11c0ffe
just copy the things you want with ctrl c and ctrl v to another place/studio and check them when your moving them across so that hey arent infected and just leave the old version behind. thats what i would do
Idk if this would be good though as every script has this virus, even the seat welder scripts. somehow they managed to inject a backdoor module into every script in my game. Idk what it does either but I want to be safe and delete the virus anyway.