for D,d in pairs(model:GetChildren())do if(string.sub(d.Name,1,1)=="\097"or string.sub(d.Name,1,1)=="\099")and d:IsA("\066\097\115\101\080\097\114\116")then table.insert(a,1,d)end end for D,d in pairs(model:GetChildren())do if(string.sub(d.Name,1,1)=="\098"or string.sub(d.Name,1,1)=="\099")and d:IsA("\066\097\115\101\080\097\114\116")then table.insert(b,1,d)end end function lightOn(D)for D,d in pairs(D)do d.SurfaceLight.Enabled=true if d:FindFirstChild("\083\112\111\116\076\105\103\104\116")then d.SpotLight.Enabled=true end end end function lightOff(D)for D,d in pairs(D)do d.SurfaceLight.Enabled=false if d:FindFirstChild("\083\112\111\116\076\105\103\104\116")then d.SpotLight.Enabled=false end end end function run()while on do lightOn(a)wait(.18)lightOff(a)wait(.04)lightOn(a)wait(.13)lightOff(a)wait(.03)lightOn(b)wait(.18)lightOff(b)wait(.04)lightOn(b)wait(.13)lightOff(b)wait(.03)end end script.Parent.RemoteEvent.OnServerEvent:Connect(function()if on==true then on=false else on=true run()end end)

for i,part in pairs(model:GetChildren()) do
	if (string.sub(part.Name, 1,1) == "a" or string.sub(part.Name, 1,1) == "c") and part:IsA("BasePart") then
		table.insert(a, 1, part)
	end
end
for i,part in pairs(model:GetChildren()) do
	if (string.sub(part.Name, 1,1) == "b" or string.sub(part.Name, 1,1) == "c") and part:IsA("BasePart") then
		table.insert(b, 1, part)
	end
end

function lightOn(T)
	for i, part in pairs (T) do
		part.SurfaceLight.Enabled = true
		if part:FindFirstChild("SpotLight") then 
			part.SpotLight.Enabled = true
		end
	end
end

function lightOff(T)
	for i, part in pairs (T) do
		part.SurfaceLight.Enabled = false
		if part:FindFirstChild("SpotLight") then
			part.SpotLight.Enabled = false
		end
	end
end

function run()
	while on do
		lightOn(a)
		wait(0.18)
	
		lightOff(a)
		wait(0.04)
	
		lightOn(a)
		wait(0.13)
	
		lightOff(a)
		wait(0.03)
		
		lightOn(b)
		wait(0.18)
	
		lightOff(b)
		wait(0.04)
		
		lightOn(b)
		wait(0.13)
	
		lightOff(b)
		wait(0.03)
	end
end

script.Parent.RemoteEvent.OnServerEvent:Connect(function()
	if on == true then
		on = false
	else
		on = true
		run()
	end
end)
