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.
Use the MarketplaceService's PromptPurchase method to have the player be prompted to buy an asset, such as your game pass.
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!