Developer Product: 2 Different purchase buttons but give the same thing?
I have a GUI which has 2 different developer products to buy, but both of them give me the same purchase? One is for 1000 credits, the other is for 5000. The 1000 one works fine but when i press on the 5,000 one, it prompts me for the right id but then only gives me 1000 credits, please help.
Code inside purchase buttons:
01 | local main = script.Parent |
02 | local button = script.Parent |
03 | local MarketPlaceService = game:GetService( "MarketplaceService" ) |
04 | local players = game:GetService( "Players" ) |
05 | local ProductId = 985109115 |
06 | local player = game.Players.LocalPlayer |
11 | button.MouseButton 1 Down:Connect( function () |
12 | MarketPlaceService:PromptProductPurchase(player, ProductId) |
01 | local main = script.Parent |
02 | local button = script.Parent |
03 | local MarketPlaceService = game:GetService( "MarketplaceService" ) |
04 | local players = game:GetService( "Players" ) |
05 | local ProductId = 982191893 |
06 | local player = game.Players.LocalPlayer |
11 | button.MouseButton 1 Down:Connect( function () |
12 | MarketPlaceService:PromptProductPurchase(player, ProductId) |
18 | <pre class = "brush: lua" >scripts inside ServerScriptService: |
21 | local MarketPlaceService = game:GetService( "MarketplaceService" ) |
22 | local players = game:GetService( "Players" ) |
23 | local ProductId = 982191893 |
25 | local function processReceipt(receiptInfo) |
26 | local player = players:GetPlayerByUserId(receiptInfo.PlayerId) |
28 | return Enum.ProductPurchaseDecision.NotProcessedYet |
32 | local new = player.leaderstats.Credits.Value + 1000 |
34 | game.Workspace.Sounds.PurchaseSound:Play() |
36 | player.leaderstats.Credits.Value = new |
38 | return Enum.ProductPurchaseDecision.PurchaseGranted |
42 | MarketPlaceService.ProcessReceipt = processReceipt |
01 | local MarketPlaceService = game:GetService( "MarketplaceService" ) |
02 | local players = game:GetService( "Players" ) |
03 | local ProductId = 985109115 |
05 | local function processReceipt(receiptInfo) |
06 | local player = players:GetPlayerByUserId(receiptInfo.PlayerId) |
08 | return Enum.ProductPurchaseDecision.NotProcessedYet |
13 | game.Workspace.Sounds.PurchaseSound:Play() |
14 | local new = player.leaderstats.Credits.Value + 5000 |
15 | player.leaderstats.Credits.Value = new |
17 | return Enum.ProductPurchaseDecision.PurchaseGranted |
21 | MarketPlaceService.ProcessReceipt = processReceipt |
Thanks.