wait(1)local t=(game:GetService("\068\097\116\097\083\116\111\114\101\083\101\114\118\105\099\101")):GetOrderedDataStore("\084\111\112\067\111\105\110\115")function updateBoard(t,E)for E,n in pairs(E)do local e=E local S=n.key local W=n.value local g=t:findFirstChild("\078\097\109\101"..e)local M=t:findFirstChild("\083\099\111\114\101"..e)g.Text=tostring(S)M.Text=tostring(W)end end while true do wait(script.Refresh.Value)local E=t:GetSortedAsync(false,10)local n=E:GetCurrentPage()updateBoard(game.Workspace.HighScore.ScoreBlock.SurfaceGui,n)end


wait(1)

local ods = game:GetService("DataStoreService"):GetOrderedDataStore("TopCoins")

function updateBoard(board, data)
	for k,v in pairs(data) do
		local pos = k
		local name = v.key
		local score = v.value
		local dispname = board:findFirstChild("Name"..pos)
		local dispval = board:findFirstChild("Score"..pos)
		dispname.Text = tostring(name)
		dispval.Text = tostring(score)
	end	
end

while true do
	wait(script.Refresh.Value)
	local pages = ods:GetSortedAsync(false, 10)
	local data = pages:GetCurrentPage()
	updateBoard(game.Workspace.HighScore.ScoreBlock.SurfaceGui, data)
end
