Gamepass Player Decting in a If then

This is a bad question.

But how would I know if a player has 2 passes in a if then statement.

if touchPlayer -- Make say it has gamepass 1 and gamepass 2 then

Hopefully that makes sense!

Thank You

This doesn’t make too much sense to me. Please define better.

ok here

if plr (Check if owns gamepass one) and (Make check if they own gamepass 2) then
 stuff happens here

The stuff in the () is the thing I need help doing.

Check out MarketplaceService:UserOwnsGamePassAsync.

2 Likes

Can you give me an example?

I dont understand.

Seems like you know what to do…Could you try it on your own, and if you have an error, report it to us?

Sure.

local marketplaceService = game:GetService('MarketplaceService')

local gamepassID1 = 123456
local gamePassID2 = 123456

local player = game:GetService('Players').LocalPlayer -- using localplayer as an example

if marketplaceService:UserOwnsGamePassAsync(player, gamepassID1) and marketplaceService:UserOwnsGamePassAsync(player, gamepassID2) then
    print(player,'owns GamePass1 and GamePass2!')
end
2 Likes

Thanks Man!

I realize that was a “Dumb question” but I appreciate you helping me out!

2 Likes

There’s no such thing as a “dumb question”, we all start out somewhere! And that’s what the devforum is for.

2 Likes