Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would I make a gamepass give the player a pet?

So, I am making a game, and I want to make a gamepass that gives you a pet. For example you open up the shop GUI then buy a gamepass, you then receive a pet that is there every time you lo back on.

I really need to know how to do this, if anyone knows please let me know as soon as possible!

1 comment

1 answer

✓ Accepted answer
local passId = 0000000 -- change this to your game pass ID.
 
function isAuthenticated(player) -- checks to see if the player owns your pass
    return game:GetService("MarketplaceService"):PlayerOwnsAsset(player, passId)
end
 
game.Players.PlayerAdded:connect(function(plr)
    if isAuthenticated(plr) then
        --Your code and what you want it to do here
    end
end)

3 comments

0

Thanks! This will help me a lot!

0

are this working?

This discussion is preserved as it was. New answers, comments, and votes are closed.