Daily Rewards Module
In your wally.toml file, add this to your dependencies:
You have two solutions to import this module, depending if you wish to import the Controller or the Service on your own, or if you let the module give you the right code.
Configuration
A file called DailyRewardsModule.config.lua is to be created in ReplicatedStorage/Shared/Configs.
Explanation:
ClaimCooldown: The amount of time between each claim (in seconds). Example is 24 hours (The default)
RewardList: A list of rewards
Item: The name of the item / currency to give
Amount: The amount of the item / currency to give
Type: The type of item to give (Can be anything, it depends on the rest of the code)
Usage
Events
OnPlayerClaim: Triggers when the player claims an item.
Methods
Shared
Explanation
player: The player to check the status of.
Client Side
Explanation
Client Side
Explanation
player: The player trying to claim.