Not giving the money from the Developer Product?
Works, but when they buy they get no money?
03 | local devProductId = 33890734 |
04 | local player = script.Parent.Parent.Parent.Parent.Parent |
09 | script.Parent.MouseButton 1 Click:connect( function () |
10 | game:GetService( "MarketplaceService" ):PromptProductPurchase(player, devProductId) |
14 | local MarketplaceService = game:GetService( "MarketplaceService" ) |
15 | local ds = game:GetService( "DataStoreService" ):GetDataStore( "PurchaseHistory" ) |
16 | MarketplaceService.ProcessReceipt = function (receiptInfo) |
17 | for i, player in ipairs (game.Players:GetChildren()) do |
18 | if player.userId = = receiptInfo.PlayerId then |
19 | if receiptInfo.ProductId = = devProductId then |
20 | local L = game.ServerStorage.MoneyStorage [ player.Name ] |
22 | L.Value = L.Value + 5000 |
26 | local playerProductKey = "player_" .. receiptInfo.PlayerId .. "_purchase_" .. receiptInfo.ProductId |
27 | ds:IncrementAsync(playerProductKey, 1 ) |
28 | return Enum.ProductPurchaseDecision.PurchaseGranted |