✓ Accepted answer
###Gamepass Changes
A while ago, roblox changed how they handle gamepasses. They now have them as seperate assets. This caused a url change ("https://roblox.com/game-pass/id") aswell as the change in gamepass-fetching methods.
PlayerHasPass is broken and no longer in use. Instead, opt to use the new method UserOwnsGamePassAsync. Additonally, it now take's a players UserId, not the player object themselves.
###Solution
local id = 5348469
game.Players.PlayerAdded:Connect(function(player)
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, id) then
print(player.Name .. " has the game pass!")
else
print(player.Name .. " doesn't have the game pass...")
end
end)
4 comments
please use code blocks
I'll try it, and by the way, you didn't put code blocks between your code.
speed demon answer
Ty, it worked.