Red=script.Parent.Red.Lamp Yellow=script.Parent.Yellow.Lamp Green=script.Parent.Green.Lamp DRed=script.Parent.Red.DynamicLight DYellow=script.Parent.Yellow.DynamicLight DGreen=script.Parent.Green.DynamicLight function Active()if Signal.Value==0 then Green.Enabled=false Yellow.Enabled=false Red.Enabled=false DGreen.Enabled=false DYellow.Enabled=false DRed.Enabled=false GArrow.Enabled=false YArrow.Enabled=false FYellow.Enabled=false DGArrow.Enabled=false DYArrow.Enabled=false DFYellow.Enabled=false elseif Signal.Value==1 then while Signal.Value==1 do Green.Enabled=true Yellow.Enabled=false Red.Enabled=false DGreen.Enabled=true DYellow.Enabled=false DRed.Enabled=false while Signal.Value==1 do YArrow.Enabled=false FYellow.Enabled=true GArrow.Enabled=false DRed.Enabled=false DYellow.Enabled=false DFYellow.Enabled=true DGArrow.Enabled=false wait(.5)FYellow.Enabled=false DFYellow.Enabled=false wait(.5)if Signal.Value~=1 then break end if Turn.Value==1 then break end if Turn.Value==2 then break end if Turn.Value==3 then break end if Turn.Value==0 then break end end end elseif Signal.Value==2 then Green.Enabled=false Yellow.Enabled=true Red.Enabled=false DGreen.Enabled=false DYellow.Enabled=true DRed.Enabled=false GArrow.Enabled=false FYellow.Enabled=false YArrow.Enabled=true FYellow.Enabled=false DGArrow.Enabled=false DYArrow.Enabled=true elseif Signal.Value==3 then Green.Enabled=false Yellow.Enabled=false Red.Enabled=true DGreen.Enabled=false DYellow.Enabled=false DRed.Enabled=true GArrow.Enabled=false FYellow.Enabled=false YArrow.Enabled=false DGArrow.Enabled=false DFYellow.Enabled=false DYArrow.Enabled=false end end Signal.Changed:connect(Active)
--Main Control------------------------------------------------------------------------
Red = script.Parent.Red.Lamp
Yellow = script.Parent.Yellow.Lamp
Green = script.Parent.Green.Lamp
DRed = script.Parent.Red.DynamicLight
DYellow = script.Parent.Yellow.DynamicLight
DGreen = script.Parent.Green.DynamicLight
function Active()
	if Signal.Value == 0 then
		Green.Enabled = false
		Yellow.Enabled = false
		Red.Enabled = false
		DGreen.Enabled = false
		DYellow.Enabled = false
		DRed.Enabled = false
		GArrow.Enabled = false
		YArrow.Enabled = false
		FYellow.Enabled = false
		DGArrow.Enabled = false
		DYArrow.Enabled = false
		DFYellow.Enabled = false
	elseif Signal.Value == 1 then
		while Signal.Value == 1 do
			Green.Enabled = true
			Yellow.Enabled = false
			Red.Enabled = false
			DGreen.Enabled = true
			DYellow.Enabled = false
			DRed.Enabled = false
			while Signal.Value == 1 do
				YArrow.Enabled = false
				FYellow.Enabled = true
				GArrow.Enabled = false
				DRed.Enabled = false
				DYellow.Enabled = false
				DFYellow.Enabled = true
				DGArrow.Enabled = false
				wait(0.5)
				FYellow.Enabled = false
				DFYellow.Enabled = false
				wait(0.5)
				if Signal.Value ~= 1 then
					break
				end
				if Turn.Value == 1 then
					break
				end
				if Turn.Value == 2 then
					break
				end
				if Turn.Value == 3 then
					break
				end
				if Turn.Value == 0 then
					break
				end
			end
		end
	elseif Signal.Value == 2 then
		Green.Enabled = false
		Yellow.Enabled = true
		Red.Enabled = false
		DGreen.Enabled = false
		DYellow.Enabled = true
		DRed.Enabled = false
		GArrow.Enabled = false
		FYellow.Enabled = false
		YArrow.Enabled = true
		FYellow.Enabled = false
		DGArrow.Enabled = false
		DYArrow.Enabled = true
	elseif Signal.Value == 3 then
		Green.Enabled = false
		Yellow.Enabled = false
		Red.Enabled = true
		DGreen.Enabled = false
		DYellow.Enabled = false
		DRed.Enabled = true
		GArrow.Enabled = false
		FYellow.Enabled = false
		YArrow.Enabled = false
		DGArrow.Enabled = false
		DFYellow.Enabled = false
		DYArrow.Enabled = false
	end
end
Signal.Changed:connect(Active)
