My gamepass doesn't work tis says its not fore sale but it is
Script
--gravity coil
game.Players.PlayerAdded:Connect(function(p)
if game:GetService("MarketplaceService"):PlayerOwnsAsset(p,5700504) then
local coil = game:GetService("ServerStorage"):WaitForChild("GravityCoil"):Clone()
coil.Parent = p.StarterPack
local coil2 = coil:Clone()
coil2.Parent = p.Backpack
end
end)
local script
local player = game.Players.LocalPlayer
local id = 5700504
script.Parent.MouseButton1Click:Connect(function()
game:GetService("MarketplaceService"):PromptPurchase(player,id)
end)
Plz help!?

3 comments
How do I use promptgamepasspurchasefinished?
its an event
so MarketPlaceService.PromptGamePassPurchaseFinished:Connect(function(...)