local dataLink = script["Data Link"].Value

local lights = {}
for _, child in pairs(script.Parent:GetChildren()) do
	if child.Name == "Light" then
		table.insert(lights, child)
	end
end

local connect = function(powered)
	if powered then
		for _, light in pairs(lights) do
			light.Material = Enum.Material.Neon
		end
	else
		for _, light in pairs(lights) do
			light.Material = Enum.Material.SmoothPlastic
		end
	end
end
dataLink.isTardisPowered.Changed:Connect(connect)
