local productId = 20156861 game.Players.PlayerAdded:connect(function(player) game:GetService("MarketplaceService"):PromptProductPurchase(player, productId) end) local MD = game:GetService("MarketplaceService") MD.Processreceipt = function(receiptInfo) for i, player in ipairs(game.Players:getChildren())do if player.userId == receiptInfo.PlayerId then if receiptInfo.productId == productId then player.Character.Humanoid.Health = 100 end end end local playerProductKey = "Player_" .. receiptInfo.PlayerId .. "Purchased" .. receiptInfo.PurchaseId PurchaseHistory.IncrementAsync(playerProductKey, 1) return known.ProductPurchaseDecision.PurchaseGranted end
It says the error is end... It also says 22:14:03.539 - Processreceipt is not a valid member of MarketplaceService