Managed Codes & In-Game Rewards (Coming Soon)
Learn how to implement and use Giftoin's advanced code redemption and reward system in your Roblox game.
Register Reward Type
-- For updating leaderboard stats
local ServerScriptService = game:GetService("ServerScriptService")
local GiftoinModule = require(ServerScriptService:WaitForChild("GiftoinModule"):WaitForChild("init"))
local GiftoinRedemptionSystem = GiftoinModule.Redemption
GiftoinRedemptionSystem.RegisterCallback("points", function(player, amount)
print("points added")
local leaderstats = player:FindFirstChild("leaderstats")
if leaderstats then
local points = leaderstats:FindFirstChild("Points")
if points then
points.Value = points.Value + amount
end
else
print("Player leaderstats are missing")
end
end)