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
2 years ago

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

1 answer

Log in to vote
0
Answered by 2 years ago

you have to check if the player has the game pass

local id = -- your gamepass id here
local marketService = game:GetService("MarketplaceService")

game.Players.PlayerAdded:Connect(function(user)
    if marketService:UserOwnsGamepassAsync(user.UserId, id) then
        -- put whatever you want to happen here
    end
end)
0
i mean developer product not gamepass)) 2jxi 4 — 2y
0
but still thanks:) 2jxi 4 — 2y
Ad

Answer this question