My buddy Vissequ actually made a script post-update using the "UserOwnsGamepassAsync" function. All you have to do is edit the gamepass Id, and edit the variable outcome (what you want it to do, if it reads you own the script) Here is a copy of the script if you would like to use it:
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local gamePassID = 0000000
function onPlayerSpawned(player)
local hasPass = false
local success, message = pcall(function()
hasPass = MarketplaceService:UserOwnsGamePassAsync(player.userId, gamePassID)
print("Has Game Pass")
end)
if not success then
warn("Error while checking if player has pass: " .. tostring(message))
return
end
if hasPass == true then
end
end
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function()
onPlayerSpawned(player)
end)
end)
Players.PlayerAdded:Connect(onPlayerSpawned)