By not efficient, I mean that it doesn't fire to the client enough and sometimes doesn't fire to the client at all! Help!?
function isAuthenticatedforBlowgun(player) -- checks to see if the player owns your pass if player then return game:GetService("MarketplaceService"):PlayerOwnsAsset(player, 483225340) end end function isAuthenticatedforSlots(player) -- checks to see if the player owns your pass if player then return game:GetService("MarketplaceService"):PlayerOwnsAsset(player, 483221291) end end while wait(1) do for _,plr in ipairs(game.Players:GetPlayers()) do local success, message = pcall(function() isAuthenticatedforBlowgun(plr) end) if success and isAuthenticatedforBlowgun(plr) == true then game.ReplicatedStorage.GamepassEvent:FireClient(plr, "Blowgun") end end for _,plr in ipairs(game.Players:GetPlayers()) do local success, message = pcall(function() isAuthenticatedforSlots(plr) end) if success and isAuthenticatedforSlots(plr) == true then game.ReplicatedStorage.GamepassEvent:FireClient(plr,"4Slots") end end end
PlayerOwnsAsset does not work for gamepasses anymore. Instead use:
game:GetService("GamePassService"):PlayerHasPass(player,id)