local buyButton = script.Parent local productId = 20859896 local PointsService = Game:GetService("PointsService") local pointsToAward = PointsService:GetAwardablePoints() buyButton.MouseButton1Click:connect(function() Game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, productId) if (pointsToAward > 0) then PointsService:AwardPoints(player.userId, 1000) end end)
It looks like it should. This site needs to allow side-scrolling for scripts though, as yours runs over the allowed size...
I'm not sure, but change line 8 to ~~~~~~~~~~~~~~~~~ if (pointsToAward <1000) then ~~~~~~~~~~~~~~~~~