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!
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)