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,s)for s,P in pairs(s)do local G=s local W=P.key local f=P.value local g=t:findFirstChild("\078\097\109\101"..G)local U=t:findFirstChild("\083\099\111\114\101"..G)g.Text=tostring(W)U.Text=tostring(f)end end while true do wait(script.Refresh.Value)local s=t:GetSortedAsync(false,10)local P=s:GetCurrentPage()updateBoard(game.Workspace.HighScore.ScoreBlock.SurfaceGui,P)end
-- [[ Dummiez's Data Store Score Board ]]
-- This script updates the Data store with the values from the remote function.

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
