Trouble with custom rewarding system

I’m currently trying to find ways in order to make a reward system similar to this game named “Colorful Stage” or “Project Sekai”.

The system works as such: The developers of this game can send out gifts to players anytime (example: their game hitting 10M players, etc). They can give for example, 500 of the currency.

Now my problem is: I know how to make the UI stuff. However, I have no idea on how to save multiple data to ensure players don’t claim the reward/gift twice.

Here’s a small picture on how it looks:

did you atleast make a local script? (so i can help you)

Decided to make a simple script to show you how to make it: MAKE SURE YOU HAVE Enable Studio Access to API services

--Put This in ServerScriptService

local data = game:GetService("DataStoreService")

game:GetService("ReplicatedStorage").DailyThing.OnServerInvoke = function(plr)
	local Rewards = data:GetDataStore("RewardThing_Reward1")
	local Redeemed = Rewards:GetAsync(plr.UserId)
	
	if not Redeemed then
		print("give reward")
		Rewards:SetAsync(plr.UserId, true)
		return true
	else
		print("no rewards!!!")
		return false
	end
end
-- make sure its atleast parented to your gui

local buttonthing = script.Parent -- path to button here

buttonthing.MouseButton1Click:Connect(function()
	local Checkifreedemed = game.ReplicatedStorage.DailyThing:InvokeServer()
	
	if Checkifreedemed then
		-- gives reward
		print("reward lets go!!")
	else
		print("smh no rewards")
	end
end)
-- finally, create a remote function, name it DailyThing and put it under 

ReplicatedStorage

Make sure to reply to my message, this is just a simple script so show briefly show you how its works

Thank you for the response, I have already done stuff like this however I only used one value, and I’m not certain if it’s correct but I heard you can only have up to 5 datastores? In my case, I would use it for multiple reasons, ex: the game hitting a milestone of visits, favorites, etc. and other misc stuff such as apologies for game issues, and other stuff.

If needed, here’s the script for the one I’m currently using:

local remote = game:GetService("ReplicatedStorage"):WaitForChild("100K",5)
local DSS = game:GetService("DataStoreService")
local Rewarded = DSS:GetDataStore("100kEvent")
local SSS = game:GetService("ServerScriptService")
local badgeService = game:GetService("BadgeService")
local playerService = game:GetService("Players")

playerService.PlayerAdded:Connect(function(player)
	local rewardedValue = Instance.new("BoolValue")
	rewardedValue.Name = "100kEventValue"
	rewardedValue.Parent = player
	rewardedValue.Value = false
	
	local playerUserId = "Player_"..player.UserId
	local data
	local success, errmessage = pcall(function()
		data = Rewarded:GetAsync(playerUserId)
	end)
	if success then
		rewardedValue.Value = data
	end
	if not success then
		print("Data failed to load")
	end
	
	warn(player.Name, "has joined")
	task.wait(2)
	local HasBadge
	local AwardBadge
	local s, e = pcall(function()
		HasBadge = badgeService:UserHasBadgeAsync(player.UserId, 2127421931)
	end)
	if s then
		if HasBadge or rewardedValue.Value == true then		
			warn(player.Name, "already owns badge")
			local pGui = player.PlayerGui
			pGui:WaitForChild("Reward"):Destroy()
		else
			rewardedValue.Value = true
			local np = player:WaitForChild("NEAT Points")
			badgeService:AwardBadge(player.UserId, 2127421931)
			np.Value += 5000
		end
	end
	if e then
		warn("Error while checking: ", e)
	end
end)

game.Players.PlayerRemoving:Connect(function(player)
	local playerUserId = "Player_"..player.UserId
	local data = player:WaitForChild("100kEventValue").Value

	local success, errmessage = pcall(function()
		Rewarded:SetAsync(playerUserId, data)
	end)

	if success then
		print("100K data saved")
	end

	if not success then
		print("100K data failed to save")
	end
end)

-- this one is for only 1 reward at a time

so what are you specifically trying to do in the script itself?