Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

1 answer

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)

2 comments

0

i mean developer product not gamepass))

0

but still thanks:)

This discussion is preserved as it was. New answers, comments, and votes are closed.