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)
✓ ANSWER ACCEPTED
Would this award player points if you clicked on a Gui?
2 answers
✓ Accepted answer
It looks like it should. This site needs to allow side-scrolling for scripts though, as yours runs over the allowed size...
2 comments
1
OMG are you that guy who does youtube vids D: :D
0
Yes...Yes I am... :P
I'm not sure, but change line 8 to
if (pointsToAward <1000) then
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Lol well your checking method for if theres enough points is gonna be way off.. 'if theres more points than 0 then award them a thousand'. Might just wanna change that. But yes, this should work.