how to make a pet gamepass where if you have the gamepass you’ll have the pet in game ?
i already make the gamepass buying gui i just need help in how to give the pet to the player who has the gamepass
You can paste those scripts into your data store script that load the data. (if have)
local ownGamepass = game:GetService("MarketplaceService"):UserOwnsGamePassAsync(Player.UserId, 1234567)
local gamepassPet = game:GetService("ReplicatedStorage"):WaitForChild("ExclusivePet")
if ownGamepass and not newPlayer.Backpack:FindFirstChild(gamepassPet.Name) then
gamepassPet:Clone().Parent = Player.Backpack
end
but if its only one time use per join try:
game.Players.PlayerAdded:Connect(function(newPlayer)
local ownGamepass = game:GetService("MarketplaceService"):UserOwnsGamePassAsync(newPlayer.UserId, 1234567)
local gamepassPet = game:GetService("ReplicatedStorage"):WaitForChild("ExclusivePet")
if ownGamepass and not newPlayer.Backpack:FindFirstChild(gamepassPet.Name) then
gamepassPet:Clone().Parent = newPlayer.Backpack
end
end)
Did you attempt to write a script which would reward gamepass owners with a pet? If so, post it here so we can assist with fixing it.
1 Like
Do you have any scripts already, please send them I can’t help without it.