So, I'am making a gamepass and I want to know how you can make a gamepass that you can buy a inside the game.
✓ ANSWER ACCEPTED
How do you make a gamepass that you can I buy inside the game?
4 answers
✓ Accepted answer
Use the MarketplaceService's PromptPurchase method to have the player be prompted to buy an asset, such as your game pass.
gamepass roblox wiki :/
local player = game.Players.LocalPlayer
local MarketplaceService = game:GetService
local id = IDHERE
script.Parent.MouseButton1Click:connect(function() --If you want a gamepass GUI, keep this. If not just delete this line and the end)
MarketplaceService:PromptPurchase(player, id)
if MarketplaceService:UserOwnsGamePassAsync(player.UserId, id) then
--Your script goes here
end
end)
This should work.
you don't need to use scripts! copy and past this link in rob lox studio then install the plugin. after, enter the world you want it on. go to the top right corner and you'll see the R$ click that and find the store in the explorer panel. click on it then enter in the game pass id and click enter! there you have it!
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
sorry here is the link: http://web.roblox.com/store-plugin-item?id=142291695