Why doesn't this script work anymore?
a few weeks ago this script was working but it isn't now I'm not sure if it's broken or not help?
02 | local MarketplaceService = Game:GetService( "MarketplaceService" ) |
03 | local ds = game:GetService( "DataStoreService" ):GetDataStore( "PurchaseHistory" ) |
04 | local productId = 21867340 |
06 | game.Players.PlayerAdded:connect( function () |
08 | local DeveloperProducts = game:GetService( "MarketplaceService" ):GetDeveloperProductsAsync():GetCurrentPage() |
09 | for _, DevProductContainer in pairs (DeveloperProducts) do |
10 | for Field, Value in pairs (DevProductContainer) do |
11 | print (Field .. ": " .. Value) |
19 | MarketplaceService.ProcessReceipt = function (receiptInfo) |
22 | for i, player in ipairs (game.Players:GetChildren()) do |
23 | if player.userId = = receiptInfo.PlayerId then |
27 | if receiptInfo.ProductId = = productId then |
30 | player.Character.Humanoid.Health = 100 |
32 | game.Workspace.DisplayScreen.SurfaceGui.TextBox.Text = player.Name .. " has purchased a healing potion." |
38 | local playerProductKey = "p_" .. receiptInfo.PlayerId .. "_p_" .. receiptInfo.PurchaseId |
39 | ds:IncrementAsync(playerProductKey, 1 ) |
42 | return Enum.ProductPurchaseDecision.PurchaseGranted |