-- 3D TextGen


This = script.Parent
Btn = This.Parent
Characters = require(script.Characters)

function ChangeFloor(SF)
	if string.len(SF) == 1 then
		SetLabel(1,SF,-0.03)	
		SetLabel(2,"NIL",0)
	else
		SetLabel(1,SF:sub(1,1),0)	
		SetLabel(2,SF:sub(2,2),0)
	end
end


function SetLabel(ID,CHAR,OFFSET)
	if This:FindFirstChild("L"..ID) and Characters[CHAR] ~= nil then
		This["L"..ID].Mesh.Offset = Vector3.new(OFFSET, -0.004, 0)
		for i,l in pairs(Characters[CHAR]) do 
			This["L"..ID].Mesh.MeshId = "rbxassetid://"..l
		end
	end
end


ChangeFloor(Btn.Name)

script:Destroy()
