How Do You Make A Game pass Popup With Proximity Prompts?

How Do You Make A Game pass Popup With Proximity Prompts ?

promt.Triggered:Connect(function(player)
    game.MarketplaceService:PromptGamePassPurchase(player,IdHere)
end)

replace IdHere with your gamepass id

local MPService = game:GetService("MarketplaceService")
local gamepassId = 0 --change to gamepass id
local proxPrompt = workspace:WaitForChild("ProximityPrompt")

proxPrompt.Triggered:Connect(function(player)
	MPService:PromptGamePassPurchase(player, gamepassId)
end)