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


Displays = 2 -- Sets how many displays this scripts will use...
DisplayColor = Color3.fromRGB(255, 175, 175)

This = script.Parent
Elevator = This.Parent.Parent.Parent.Parent.Parent
CustomLabel = require(Elevator.CustomLabel)
Characters = require(Elevator.LandingCharacters)

CustomText = CustomLabel["CUSTOMFLOORLABEL"]

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

function ChangeFloor(SF)
	if CustomText[tonumber(SF)] then
		if string.len(CustomText[tonumber(SF)]) > 1 or tonumber(SF) > 9  then
			script.Parent.Display.Position = UDim2.new(-0.07, 0,0, 0)
		else
			script.Parent.Display.Position = UDim2.new(-0.15, 0,0, 0)
		end
		SF = CustomText[tonumber(SF)]
	end
	SetDisplay(2,(string.len(SF) == 2 and SF:sub(1,1) or "NIL"))        
	SetDisplay(3,(string.len(SF) == 2 and SF:sub(2,2) or SF))
end

function SetDisplay(ID,CHAR,TOP)
	if This.Display:FindFirstChild("Matrix"..ID) and Characters[CHAR] ~= nil then
		for i,l in pairs(Characters[CHAR]) do 
			for r=1,7 do    
				This.Display["Matrix"..ID]["Row"..i]["D"..r].ImageTransparency = (l:sub(r,r) == "1" and 0 or 1)
			end
		end
	end
end

for M = 1, Displays do
	for R = 1, 15 do
		for D = 1, 7 do
			This.Display["Matrix"..M]["Row"..R]["D"..D].ImageColor3 = DisplayColor
		end
	end
end
