-- Light System.


LightSystem = script.Parent				-- Hello, Variables here
Lights = LightSystem.Lights
Switch = LightSystem.Button
Switch1 = Switch.Button1
Switch2 = Switch.Button2


on = false

children = Lights:GetChildren()

function onClicked()	
	if on == false then
		on = true
		Switch1.Transparency = 0
		Switch2.Transparency = 1
		for i = 1, #children do
			children[i].PointLight.Enabled = true
			print("Lights On")
		end
	elseif on == true then
		on = false
		Switch1.Transparency = 1
		Switch2.Transparency = 0
		for i = 1, #children do
			children[i].PointLight.Enabled = false
			print("Lights Off")
		end
	end
end

Switch.ClickDetector.MouseClick:connect(onClicked)


