How to prompt purchase?

Hello! I am trying to make a shop GUI but I have no idea how to make it work.
I have FE on but I can turn it off. I looked on the dev hub but I do not understand any of it.
This is my code:

local MarketPlaceService = game:GetService('MarketplaceService')
script.Parent.MouseButton1Click:Connect(function()
	--What do I put here???
end)
3 Likes

This might help you

2 Likes

I did look at that but I am still really confused.

What’s so difficult in doing :

 local Ms = game:GetService("MarketplaceService")
 Ms:PromptGamePassPurchase(player, gamepass Id)

To prompt a user to purchase a gamepass, use MarketplaceService:PromptPurchase.

local MarketplaceService = game:GetService("MarketplaceService")
script.Parent.MouseButton1Click:Connect(function()
      MarketplaceService:PromptPurchase(game.Players.LocalPlayer, GamepassId)
end)
2 Likes