this is what i have so far and it doesnt work
local id = 5546149 game.Players.PlayerAdded:Connect(function(player) if game:GetService("GamePassService"):PlayerHasPass(player, id) then player.leaderstats1.xpmulti.Value = 0 print(player.Name .. " has the game pass!") else player.leaderstats1.xpmulti.Value = 2 print(player.Name .. " doesn't have the game pass...") end end)
GamePassService only works for old game passes.
It is now replaced with MarketplaceService:UserOwnsGamePassAsync()
and MarketplaceService:PromptGamePassPurchase()
For more information, see this article.
As for your code, this is how it should end up.
local id = 5546149 game.Players.PlayerAdded:Connect(function(player) if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, id) then player.leaderstats1.xpmulti.Value = 0 print(player.Name .. " has the game pass!") else player.leaderstats1.xpmulti.Value = 2 print(player.Name .. " doesn't have the game pass...") end end)