So, for future reference so you can likely answer my question, i made some developer products, when you step on them they prompt you.
One gives you 2x the amount of points you had
The others gives you 5X of the amount of points you had.
When i tested them, they both gave me 2X??
Here's the script:
2X Product:
local MarketPlaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local ProductId = 971604647
local function ProcessReceipt(ReceiptInfo)
local Player = Players:GetPlayerByUserId(ReceiptInfo.PlayerId)
if not Player then
-- Player probably left
-- When they join the code below me will fire
return Enum.ProductPurchaseDecision.NotProcessedYet
end
if Player then
Player.leaderstats.Points.Value = Player.leaderstats.Points.Value * 2
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
MarketPlaceService.ProcessReceipt = ProcessReceipt
5X Product:
local MarketPlaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local ProductId = 971627619
local function ProcessReceipt(ReceiptInfo)
local Player = Players:GetPlayerByUserId(ReceiptInfo.PlayerId)
if not Player then
-- Player probably left
-- When they join the code below me will fire
return Enum.ProductPurchaseDecision.NotProcessedYet
end
if Player then
Player.leaderstats.Points.Value = Player.leaderstats.Points.Value * 5
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
MarketPlaceService.ProcessReceipt = ProcessReceipt
