yea I'm making an obby right now and I really wanna know how to make a gamepass for both a speed and gravity coil. If u have an answer or a script sample which I can use to practice my coding then that would be great! Thanks!
✓ ANSWER ACCEPTED
How do I make a gamepass for a gear?
2 answers
✓ Accepted answer
Please read the Roblox Developer hub before answering this question. And plus theres a special service called MarketPlaceService this service is basically a service that allows you to make gamepasses and sell them.
More info visit: https://developer.roblox.com/en-us/api-reference/class/MarketplaceService
A service you can use to check if someone owns a gamepass is called "MarketplaceService"
And a function that MarketplaceService has is called "UserOwnsGamePassAsync"
In the first argument, you add the player's userID to check, in the second argument, you add the gamepass ID to check
Example:
local player = game.Players:GetChildren()[math.random(1, #game.Players:GetChildren())] -- Checks a random player, change this localvalue so it is correct.
local MarketplaceService = game:GetService("MarketplaceService")
if MarketplaceService:UserOwnsGamePassAsync(player.UserId, 2296901) then -- change the numbers to a gamepass id
print(player.Name .. " owns the gamepass!")
else
print(player.Name .. " does not own the gamepass!")
end
1 comment
0
thx dude
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
https://developer.roblox.com/en-us/articles/Game-Passes-One-Time-Purchases
If he meant one time purchases he would've said developer product?
One time purchase in the context you're only buying it once, the article is about Game passes
yea it is one time purchase