# Managed Codes & In-Game Rewards (Coming Soon)

Welcome to Giftoin's Managed Codes & In-Game Rewards system! This powerful tool allows you to easily implement a secure and flexible code redemption system in your Roblox game.

Key features:

* Instant implementation with GiftoinModule
* Secure server-side processing
* Flexible reward types
* Customizable UI integration
* Centralized code management through Giftoin platform

By using our system, you can focus on creating unique gameplay experiences while we handle the complexities of code management and reward distribution.

### Register Reward Type

Our module is built in a modular way - allowing all kinds of rewards.&#x20;

You simply need to register each reward type - name and the function to run to grant the reward to the user.

```lua
-- 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)

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.giftoin.org/platform-guides/roblox/additional-example-use-cases/managed-codes-and-in-game-rewards-coming-soon.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
