So I'm trying to make so when you have a gamepass in my game, you get your exp gain multiplied by 2. When I use
if passService:PlayerHasPass(player,5429209) then
end
it prints the error: GamePassId '5429209' is not of type Game Pass. Please use MarketplaceService:PlayerOwnsAsset instead. The first thing I tried was to do it like
if game.MarketplaceService:PlayerOwnsAsset(player,5429209) then
end
and it doesn't print an error, but the game doesn't think I own the gamepass, and ignores the if statement.
Script:
local testers = {"FoxOwO","S_naZY","jurassicsonic","Knineteen19","Black_Xenon","Phoen_ix25","Dragonwizarder","NovaGaming1234","Axiom_Vang"}
local passService = game:GetService("GamePassService")
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
local multi = script:WaitForChild("XP Multiplier")
local multiplier = multi:Clone()
if player.Name == "Knineteen19" then
multiplier.Value = multiplier.Value * 10
print(multiplier.Value)
end
for i,Testers in pairs(testers) do
if Testers == player.Name then
multiplier.Value = multiplier.Value * 2
print(multiplier.Value)
break
end
end
if passService:PlayerHasPass(player,5429209) then
multiplier.Value = multiplier.Value * 2
print(multiplier.Value)
end
multiplier.Parent = game.Workspace:WaitForChild(player.Name).Humanoid
end)
end)
Any help would be appreciated!

1 comment
Kind of weird, but it worked. Thanks!