Menus
How to Make a Roblox Daily Rewards GUI
A daily rewards screen shows a row of day cards — claimed days dimmed, today's ready, future days locked — and a button to claim. The visual states are just background colors; the real logic is server-side: track when the player last claimed and their streak, and only grant a reward if a new day has begun.
Open the Daily Rewards template →1. A 7-day grid with visual states
Each day is a Frame colored by its state: claimed (dimmed), current (highlighted), or locked (muted). Lay them out with a UIListLayout or manual positions — the editor's daily-rewards template does this for you.
2. Track the streak on the server
Store lastClaimTime and streak per player (DataStore). On a claim request, compare server time to the last claim: if less than a day has passed, ignore it; if within two days, advance the streak; otherwise reset it to day 1.
local DAY = 86400
claimEvent.OnServerEvent:Connect(function(player)
local data = playerData[player.UserId] -- { last = 0, streak = 0 }
local now = os.time()
if now - data.last < DAY then return end -- already claimed today
data.streak = (now - data.last < 2 * DAY) and data.streak + 1 or 1
data.last = now
grantDayReward(player, data.streak)
end)3. Reflect the result in the UI
After the server grants, it tells the client the new streak and last-claim day. The client recolors the day cards (mark today claimed, highlight tomorrow) so the calendar stays in sync with the server's truth.
FAQ
How do I store the streak between sessions?
Save lastClaimTime and streak in a DataStore keyed by UserId. Load it when the player joins and save after each claim.
What happens if a player skips a day?
Your call: reset the streak to 1, or keep it within a grace window (e.g. two days). The code above resets after a two-day gap.
