Help needed with script (gamepass)

I need help with “x2 Wins game pass which gives 2 wins when you touch the part”

For example, if I touch the part I get x2 Wins game pass but if I don’t own the game pass it stays normal.

Thankyou for your help!

hello!

it is not possible to add gamepasses to a players inventory without them buying it.

you would have to integrate this into the game, by making a folder inside the player for your gamepasses, which contains all the game’s passes as bool values.

this way, you can simply change the bool’s value to “add” the gamepass to a player.

Why don’t you use :UserOwnsGamePassAsync() It can be used like the example below (Now of course your going to need to change it, I don’t have the set up for it, this is just a basic example):

if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(Player.UserId, GamepassID) then
Player.Wins.Value += 2
else
Player.Wins.Value += 1
end