β° TimedProduct
Setupβ
newβ
local Framework = require(path).GetServer()
local TimedProducts = Framework.TimedProducts
--Product ID, TimeStarted, TimeEnd, BoughtFunction
local Product = TimedProducts.new(32834, tick(), tick() + 10800, function(player: Player)
print("Player has bought the pass")
end)
PromptProductPurchaseβ
Prompts the purchase for the product, fails if it goes overtime
Product:PromptProductPurchase(player, function(player: Player)
print("Player has bought the pass")
end)
GetTimeStringβ
Returns a cool string like:
'1 Day Left'
Product:GetTimeString()