Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

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

Asked by 8 years ago

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 answer

Log in to vote
0
Answered by 8 years ago
01local passId = 0000000 -- change this to your game pass ID.
02 
03function isAuthenticated(player) -- checks to see if the player owns your pass
04    return game:GetService("MarketplaceService"):PlayerOwnsAsset(player, passId)
05end
06 
07game.Players.PlayerAdded:connect(function(plr)
08    if isAuthenticated(plr) then
09        --Your code and what you want it to do here
10    end
11end)
0
Thanks! This will help me a lot! Pot8o_Penguin 50 — 8y
0
are this working? User#28973 0 — 5y
Ad

Answer this question