---------------------------------------------------

This = script.Parent
Lift = This.Parent.Parent.Parent
CustomLabel = require(Lift.CustomLabel)
Characters = require(script.Characters)

CustomText = CustomLabel["CUSTOMFLOORLABEL"]

Lift:WaitForChild("Floor").Changed:connect(function(floor)
  --custom indicator code--
  ChangeFloor(tostring(floor))
end)

function ChangeFloor(SF)
	if CustomText[tonumber(SF)] then
		SF = CustomText[tonumber(SF)]
	end
	SetDisplay(1,(string.len(SF) == 2 and SF:sub(1,1) or "NIL"))		
	SetDisplay(2,(string.len(SF) == 2 and SF:sub(2,2) or SF))
end



function SetDisplay(ID,CHAR)
	if This.Display:FindFirstChild("DIG"..ID) and Characters[CHAR] ~= nil then
 		for i,l in pairs(Characters[CHAR]) do 
			for r=1,16 do	
				This.Display["DIG"..ID]["D"..r].Transparency = (l:sub(r,r) == "1" and 0 or 0.95)
			end
		end
	end
end

while true do
	
	-- -- -- -- -- -- --
	--DIRECTION SCROLL--
	-- -- -- -- -- -- --
    if Lift:WaitForChild("Direction").Value == 1 then
		This.Display.ARW1.UP.Transparency = 0
		This.Display.ARW1.MID.Transparency = 0
		This.Display.ARW1.DOWN.Transparency = 0.95
    elseif Lift:WaitForChild("Direction").Value == -1 then
		This.Display.ARW1.UP.Transparency = 0.95
		This.Display.ARW1.MID.Transparency = 0
		This.Display.ARW1.DOWN.Transparency = 0
	else
		This.Display.ARW1.UP.Transparency = 0.95
		This.Display.ARW1.MID.Transparency = 0.95
		This.Display.ARW1.DOWN.Transparency = 0.95
    end

    if This.Chinese.Value == true then
		This.Legends.NSC.Transparency = 0
		This.Legends.NSE.Transparency = 0.95
		This.Legends.NSCT.SurfaceGui.Text.TextTransparency = 0
		This.Legends.NSET.SurfaceGui.Text.TextTransparency = 0.9
	else
		This.Legends.NSC.Transparency = 0.95
		This.Legends.NSE.Transparency = 0
		This.Legends.NSCT.SurfaceGui.Text.TextTransparency = 0.9
		This.Legends.NSET.SurfaceGui.Text.TextTransparency = 0
    end

    if Lift:WaitForChild("Mode").Value == "fire" then
	    if This.Chinese.Value == true then
			This.Legends.FRC.Transparency = 0
			This.Legends.FRE.Transparency = 0.95
			This.Legends.FRCT.SurfaceGui.Text.TextTransparency = 0
			This.Legends.FRET.SurfaceGui.Text.TextTransparency = 0.9
		else
			This.Legends.FRC.Transparency = 0.95
			This.Legends.FRE.Transparency = 0
			This.Legends.FRCT.SurfaceGui.Text.TextTransparency = 0.9
			This.Legends.FRET.SurfaceGui.Text.TextTransparency = 0
	    end
	else
		This.Legends.FRC.Transparency = 0.95
		This.Legends.FRE.Transparency = 0.95
		This.Legends.FRCT.SurfaceGui.Text.TextTransparency = 0.9
		This.Legends.FRET.SurfaceGui.Text.TextTransparency = 0.9
    end

    if Lift.Car.Sensor:FindFirstChild("Overloaded") then
	    if Lift.Car.Sensor.Overloaded.Value == true then
		    if This.Chinese.Value == true then
				This.Legends.OLC.Transparency = 0
				This.Legends.OLE.Transparency = 0.95
				This.Legends.OLCT.SurfaceGui.Text.TextTransparency = 0
				This.Legends.OLET.SurfaceGui.Text.TextTransparency = 0.9
			else
				This.Legends.OLC.Transparency = 0.95
				This.Legends.OLE.Transparency = 0
				This.Legends.OLCT.SurfaceGui.Text.TextTransparency = 0.9
				This.Legends.OLET.SurfaceGui.Text.TextTransparency = 0
		    end
		else
			This.Legends.OLC.Transparency = 0.95
			This.Legends.OLE.Transparency = 0.95
			This.Legends.OLCT.SurfaceGui.Text.TextTransparency = 0.9
			This.Legends.OLET.SurfaceGui.Text.TextTransparency = 0.9
	    end
	end

	wait()
end