Need help removing a virus from all of my scripts at once

so require%(34343%)%)?


there are other magic characters too

for _, service in ipairs(game:GetChildren()) do
	local success, result = pcall(function()
		for _, instance in ipairs(service:GetDescendants()) do
			if instance:IsA("LuaSourceContainer") then
				instance.Source = instance.Source:gsub("[^\n]*require[^\n]*", "")

If you want to remove all lines which contain require. That includes times in which it is called without the use of brackets, i.e; require"PathToModuleScript".

This will also be more performant as you limit the pcall() call to the DataModel’s services only (where it is necessary) and not to the descendants of those services (where it is not neccessary).

i tried this and it just deletes the whole code if it has the keyword “require”
Edit: it works now

thank you and thank you all for helping me

Alright, for some reason the script’s source is read as one long line of text, the updated code snippet works (tested).