RedeemService | Twitter Codes? Easy!

RedeemService

Redeem Service is a module that you can install into your Experience to bring players a easy way to earn exclusive rewards and in game currency.

You can click the banner above to get the module.


RedeemService:SetCodes(Dictionary)

Returns: nil
:warning: Only call this function once per session.

About This Function
RedeemService:SetCodes({
	[CodeName: string] = callback(player): Function
})

The callback function runs when the code is successfully redeemed.

Example Usage:

RedeemService:SetCodes({
	["1MILLION"] = function(player)
		print("4KWOO Redeemed")
	end,
	["SuperSecretTwitterCode"] = function(player)
		
	end,
})

RedeemService.Redeem(Player, Code: string)

Returns: boolean, int

If the code is valid the callback function will be ran.

RedeemService.Unredeem(Player, Code: string)

Returns: nil

This function “unredeems” the code and makes it so it can be redeemed again.

RedeemService:WipeData(UserID)

Wipes all player data (GDPR compliance)


Example Code:

local RedeemService = require(game:GetService("ServerStorage").Packages.RedeemService)

RedeemService:SetCodes({
	["1MILLION"] = function(player)
		print("Redeemed")
	end,
})

game.Players.PlayerAdded:Connect(function(plr)
	task.wait(2)
	print(RedeemService.Redeem(plr, "1MILLION")) --> ✅ Redeemed: 1MILLION fvazer
end)

It’s a pretty straight forward module, not too hard to use.
It comes with automatic saving using ProfileService, so all the Datastores are handled for you.

You can make suggestions on this thread.

Thanks! :heart:

10 Likes