Hello,
Does anyone know how to fire a function after a gamepass has been purchased? This is my current script that is not working, I am not sure how to fix it!
local plr = game.Players.LocalPlayer
local Id = 5892397
script.Parent.MouseButton1Click:connect(function()
game:GetService("MarketplaceService"):PromptGamePassPurchase(plr, Id)
end)
game:GetService("MarketplaceService"):PromptPurchaseFinished:connect(function(plr,Id,purchased)
if purchased then
game.ServerScriptService.GamePassCheck.LoadInventory:FireServer()
end
end)

1 comment
Thank you very much! It helped a lot!