local dataStoreOptions = Instance.new('DataStoreOptions')
local dataStore = dataStoreService:GetDataStore('dataStore', dataStoreOptions)
local orderedDataStore = dataStoreService:GetOrderedDataStore('dataStore', dataStoreOptions)
local success, pages = pcall(function()
return dataStoreBadges:ListKeysAsync()
end)
-- Get datastore pages
while task.wait() do
local Items = pages:GetCurrentPage()
for _, Data in ipairs(Items) do
orderedDataStore:SetAsync(Data.KeyName, Data.Money) -- if you want to store the money
end
if pages.IsFinished then break else pages:AdvanceToNextPageAsync() end
end
And you can convert the UserId to Name using Players:GetNameFromUserIdAsync function.