-- In LocalScript --

local PointsService = Game:GetService("PointsService")
local productId = 21263542
local players = game.Players.LocalPlayer

script.Parent.MouseButton1Click:connect(function()
    Game:GetService("MarketplaceService"):PromptProductPurchase(players, productId)
    game.Players.PlayerAdded:connect(function(player)
        while wait(1) do
            local pointsToAward = PointsService:GetAwardablePoints()
            if ( pointsToAward >= 100) then 
                pcall(function()
                    PointsService:AwardPoints(player.userId, 100) 
                end)
            end
        end
    end)
end)

I want it to so when you buy a dev product you get player points.

4 comments

3

Player point stores are not allowed so I would advise against selling player points for a product.

0

Ignoring the fact that as Superburke1 said, selling player points are not allowed, player point global leaderboards have been removed so it'd be pointless to have a game like this anyway. In addition, you can only access PointsService through a global script.

0

No, im not sellig them. Im using it so when people by a tip tom y game, they get some player points. Heaps of people do this including loleris, so I should be allowed

0

"when people BUY a tip"... nice. but I don't disapprove it, only fools would buy PPs and there is a lot of people that do, that is why users like loleris are making money