If we use this, we would have to rejoin for it to work, so is there any way of getting it to work with the ~~~~~~~~~~~~~~~~~
player still in game?
local passId = 0000000 -- change this to your game pass ID.
function isAuthenticated(player) -- checks to see if the player owns your pass return game:GetService("GamePassService"):PlayerHasPass(player, passId) end game.Players.PlayerAdded:connect(function(plr) if isAuthenticated(plr) then print(plr.Name .. " has bought the game pass with id " .. passId) end end)
~~~~~~~~~~~~~~~~~
If the game passes are being bought in game with MarketplaceService
you can use the PromptPurchaseFinish
event.
local Market = game:GetService("MarketplaceService") Market.PromtPurchaseFinish:connect(function(Player,Asset,Bought) if Bought then if Asset == 312312312312321312 then print("yey") elseif Asset == 321312354364 then print("No!") end end end)