how do you make a script only activate after purchasing a developer product?
you have to check if the player has the game pass
1 | local id = -- your gamepass id here |
2 | local marketService = game:GetService( "MarketplaceService" ) |
3 |
4 | game.Players.PlayerAdded:Connect( function (user) |
5 | if marketService:UserOwnsGamepassAsync(user.UserId, id) then |
6 | -- put whatever you want to happen here |
7 | end |
8 | end ) |