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

Infection in studio?

In my game every time I put a brick or anything at all, some random thing goes in it and has a script in it, when I try to delete the script hundreds more spawn. Here is the script.

names={"Player"}
local NameCheck = false
script.Parent.Name = names[math.random(1, #names)]
script.Name = [[ProperGråmmerNeededInPhilosiphalLocations;insertNoobHere]]
local c = script.Parent:Clone()

function addEvent(ch)
	wait(math.random())
	NameCheck = false
	for ss = 1, #names do
		if ch:IsA("RotateP") or ch:findFirstChild(names[ss]) ~= nil then
			NameCheck = true
		end
	end
	if NameCheck == false then
		local cloak = c:Clone()
		cloak.Name = ""
		cloak:GetChildren()[1].Name = ""
		cloak.Parent = ch
		cloak.Name = names[math.random(1, 5)]
	end
end

workspace.ChildAdded:connect(addEvent)

game.Players.PlayerAdded:connect(function(pl)
	pl.Chatted:connect(function(m)
		if m:sub(1, 5) == "/sc t" then
			local m = Instance.new("Message")
			m.Parent = workspace
			m.Text = "THEY CALL ME CRAZY"
			wait(1)
			m.Text = "lOoOoOoOp"
			wait(0.25)
			m.Text = "LoOoOoOoP"
			wait(0.25)
			m.Text = "lOoOoOoOp"
			wait(0.25)
			m.Text = "LoOoOoOoP"
			wait(0.25)
			m.Text = "lOoOoOoOp"
			wait(0.25)
			m.Text = "LoOoOoOoP"
			wait(0.25)
			m.Text = "GOTTA GOTTA BE CRAZY"
			wait(1)
			m.Text = "lOoOoOoOp"
			wait(0.25)
			m.Text = "LoOoOoOoP"
			wait(0.25)
			m.Text = "lOoOoOoOp"
			wait(0.25)
			m.Text = "LoOoOoOoP"
			wait(0.25)
			m.Text = "lOoOoOoOp"
			wait(0.25)
			m.Text = "LoOoOoOoP"
			wait(0.25)
			m.Text = "GOTTA GET A LIFE (YOU)"
			wait(3)
			m:remove()
		end
		if m:sub(1, 5) == "HAAXX" then
			local m = Instance.new("Message")
			m.Parent = workspace
			m.Text = "HAAXX"	
			wait(3)
			m:remove()
		end
	end)
end)

while true do
	local s = workspace:GetChildren()
	for i = 1, #s do
		NameCheck = false
		for ss = 1, #names do
			if s[i]:IsA("RotateP") or s[i]:findFirstChild(names[ss]) ~= nil then
				NameCheck = true
			end
		end
		if NameCheck == false then
			local cloak = c:Clone()
			cloak.Name = ""
			cloak:GetChildren()[1].Name = ""
			cloak.Parent = s[i]
		end
		wait(0.1)
	end
	wait(1)
end

4 comments

0

I would try getting jillmiles'1 Virus Remover : http://www.roblox.com/Virus-Remover-BEST-ON-ROBLOX-item?id=164217995

1

Why are you running studio in play mode...?

0

Some free models are not trustworthy and can affect your game. Make sure you're careful with what free models you choose to use in the future.

0

@FearMeIAmLag I have tried everything but nothing has worked :(

2 answers

You could run a script in console that compares the source of all scripts in the game.

local ScriptSource = [[
--Lalalalala
]]

function RecursiveChildren(Location)
	local Table = {}
	function Recurse(w)
		for _,n in pairs(w) do
			table.insert(Table,n)
			Recurse(n:GetChildren())
		end
	end
	Recurse(Location:GetChildren())
	local Index = 1
	return function()
		if Table[Index] then
			local i = Index
			Index = Index + 1
			return Table[i]
		end
	end

for _,n in RecursiveChildren(game) do
	if n:IsA("Script") and n.Source == ScriptSource then
		n:Destroy()
	end
end

This could be made much shorter if a custom iterator was not used.

Maybe the Reason why you have a Infection in your Studio might be: Infection Plugins, or A Studio Virus Spreader in your PC. Try using this Model

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