I need to know how to make the player point balance in my game add 100 when a developer product is purchased, this is what I have:
productId = 20619401 local MarketplaceService = Game:GetService("MarketplaceService") function UsernameFromID(ID) if type(ID) ~= "number" then return end local sets = game:service("InsertService"):GetUserSets(ID) for k, v in next, sets do if v.Name == "My Models" then return v.CreatorName end end end function giveRewards(player) points = Game:GetService("PointsService") player.Character:PromptPurchase(20619401) -- HELP NEEDED HERE return Enum.ProductPurcaseDecision.PurchaseGranted end MarketplaceService.ProcessReceipt = function(receiptInfo) giveRewards(UsernameFromID(receiptInfo.PlayerId)) end script.Parent.MouseButton1Down:connect(function() Game:GetService("MarketplaceService"):PromptProductPurchase(script.Parent.Parent.Parent.Parent, productId) end)