Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how do you make a script only activate after purchasing a developer product?

Asked by
2jxi 4
3 years ago

how do you make a script only activate after purchasing a developer product?

1 answer

Log in to vote
0
Answered by 3 years ago

you have to check if the player has the game pass

1local id = -- your gamepass id here
2local marketService = game:GetService("MarketplaceService")
3 
4game.Players.PlayerAdded:Connect(function(user)
5    if marketService:UserOwnsGamepassAsync(user.UserId, id) then
6        -- put whatever you want to happen here
7    end
8end)
0
i mean developer product not gamepass)) 2jxi 4 — 3y
0
but still thanks:) 2jxi 4 — 3y
Ad

Answer this question