Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Studio Command Virus Remover?

I was wondering if there is a Script you can put in the Command bar that removes all the items name 'Infected' ? I try to delete all of them but there is a Script in them where it clones when you delete them. It would be appreciated if someone can help me out.

2 answers

You can't because script's parent may be nil well you can go to your game and then configure it then go to version history then change the version to where the infected didn't exist.

4 comments

0

Yes, but it does it even when I start a new place, I don't know why

0

It may be a plugin

0

^ I thought so too

0

So?

Yes, there's plugins for it, but I like to use the command bar. I usually do something like this.

local illegal = {"infect", "infected", "virus", "vaccine"}
local quarantine = Instance.new("Model", Game:GetService("ServerStorage"))
quarantine.Name = "Quarantine"

function verify(obj)
	local n = obj:GetFullName():lower()
	for i = 1, #illegal do
		if n:find(illegal[i]) then
			return false
		end
	end
	return true
end

function getDescendants(root)
	local d = {}
	local function scan(obj)
		for _, c in pairs(obj:GetChildren()) do
			table.insert(d, c)
			scan(c)
		end
	end
	scan(root)
	return d
end

print("Scanning game for infections...")
local inf = 0
for _, obj in pairs(getDescendants(Game)) do
	if not verify(obj) then
		print("Potentially infected instance found! Placing in quarantine.\n\t> " .. obj:GetFullName())
		inf = inf + 1
		obj.Parent = quarantine
	end
end
print("A total of " .. inf .. " infections were found. Please delete " .. quarantine:GetFullName() .. " to rid your place of discovered infections.")

This discussion is preserved as it was. New answers, comments, and votes are closed.