I MADE SOME SCRIPT BUT IT'S NOT WORKING AANYMORE. HERE'S SCRIPT
local pet = game.ReplicatedStorage.basic
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") ~= nil then
local ply = game.Players:GetPlayerFromCharacter(hit.Parent)
game:GetService("MarketplaceService"):PromptProductPurchase(ply, 9069958)
end
end)
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(game.Players[char.Name].UserId,9069958) then
function givePet (player)
if player then
local character = player.Character
if character then
local humRootPart = character.HumanoidRootPart
local newPet = pet:Clone ()
newPet.Parent = character
local bodyPos = Instance.new("BodyPosition", newPet)
bodyPos.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
local bodyGyro = Instance.new("BodyGyro", newPet)
bodyGyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
while wait() do
bodyPos.Position = humRootPart.Position + Vector3.new(2, 2, 3)
bodyGyro.CFrame = humRootPart.CFrame
end
end)

4 comments
You never called givePet?
did u try an else? after your if character and if player?
you didnt put all of your ends in
Make sure you dont delete your ends the are very important.