--Main Control------------------------------------------------------------------------

Red = script.Parent.Red.Lamp.ImageLabel
Yellow = script.Parent.Yellow.Lamp.ImageLabel
Green = script.Parent.Green.Lamp.ImageLabel
DRed = script.Parent.Red.DynamicLight
DYellow = script.Parent.Yellow.DynamicLight
DGreen = script.Parent.Green.DynamicLight
function Active()
	if Signal.Value == 0 then
		repeat 
		Yellow.ImageTransparency = Yellow.ImageTransparency + 0.175
		Red.ImageTransparency = Red.ImageTransparency + 0.175
		Green.ImageTransparency = Green.ImageTransparency + 0.175
		DYellow.Brightness = DYellow.Brightness - 0.35
		DRed.Brightness = DRed.Brightness - 0.35
		DGreen.Brightness = DGreen.Brightness - 0.35
		wait()
		if Signal.Value ~= 0 then break end
		until 
		Red.ImageTransparency == 1
		and
		Yellow.ImageTransparency == 1
		and
		Green.ImageTransparency == 1
		and
		DYellow.Brightness <= 0
		and
		DGreen.Brightness <= 0
		and
		DRed.Brightness <= 0
	elseif Signal.Value == 1 then
		repeat 
		Yellow.ImageTransparency = Yellow.ImageTransparency + 0.175
		Red.ImageTransparency = Red.ImageTransparency + 0.175
		Green.ImageTransparency = Green.ImageTransparency - 0.125
		DYellow.Brightness = DYellow.Brightness - 0.35
		DRed.Brightness = DRed.Brightness - 0.35
		DGreen.Brightness = DGreen.Brightness + 0.25
		wait()
		if Signal.Value ~= 1 then break end
		until 
		Red.ImageTransparency == 1
		and
		Yellow.ImageTransparency == 1
		and
		Green.ImageTransparency == 0
		and
		DYellow.Brightness <= 0
		and
		DGreen.Brightness >= 2
		and
		DRed.Brightness == 0
	elseif Signal.Value == 2 then
		repeat 
		Yellow.ImageTransparency = Yellow.ImageTransparency - 0.125
		Red.ImageTransparency = Red.ImageTransparency + 0.175
		Green.ImageTransparency = Green.ImageTransparency + 0.175
		DYellow.Brightness = DYellow.Brightness + 0.25
		DRed.Brightness = DRed.Brightness - 0.35
		DGreen.Brightness = DGreen.Brightness - 0.35
		wait()
		if Signal.Value ~= 2 then break end
		until 
		Red.ImageTransparency == 1
		and
		Yellow.ImageTransparency == 0
		and
		Green.ImageTransparency == 1
		and
		DYellow.Brightness >= 2
		and
		DGreen.Brightness <= 0
		and
		DRed.Brightness <= 0
	elseif Signal.Value == 3 then
		repeat 
		Yellow.ImageTransparency = Yellow.ImageTransparency + 0.175
		Red.ImageTransparency = Red.ImageTransparency - 0.125
		Green.ImageTransparency = Green.ImageTransparency + 0.175
		DYellow.Brightness = DYellow.Brightness - 0.35
		DRed.Brightness = DRed.Brightness + 0.25
		DGreen.Brightness = DGreen.Brightness - 0.35
		wait()
		if Signal.Value ~= 3 then break end
		until 
		Red.ImageTransparency == 0
		and
		Yellow.ImageTransparency == 1
		and
		Green.ImageTransparency == 1
		and
		DYellow.Brightness <= 0
		and
		DGreen.Brightness <= 0
		and
		DRed.Brightness >= 2
	end
end
Signal.Changed:connect(Active)

	
	
