Installation
7KB
Verifying Installation
File Structure
GiftoinModule (Folder)
βββ init.lua
βββ API.lua
βββ Utils.lua
βββ Events.lua
βββ [Other module files]
GiftoinModuleConfig (File)
return {
API = {
BASE_URL = "https://api.giftoin.org/v1/api-reseller/api/v1",
API_KEY = "123"
},
}
local ServerScriptService = game:GetService("ServerScriptService")
local GiftoinModule = require(ServerScriptService:WaitForChild("GiftoinModule"):WaitForChild("init"))
local GiftoinEvents = GiftoinModule.Events
--local claimGiftoinEvent = game.ReplicatedStorage.GiftoinModule.ClaimGiftoinEvent
-- Create the ClaimGiftoinEvent if it doesn't exist
local claimGiftoinEvent = game.ReplicatedStorage:FindFirstChild("ClaimGiftoinEvent")
if not claimGiftoinEvent then
claimGiftoinEvent = Instance.new("RemoteEvent")
claimGiftoinEvent.Name = "ClaimGiftoinEvent"
claimGiftoinEvent.Parent = game.ReplicatedStorage
end
claimGiftoinEvent.OnServerEvent:Connect(function(player)
GiftoinEvents.claimDaily(player)
end)