Why is my More Pet Slots Script Not Working in Game?
local plr = game:GetService("Players").LocalPlayer;
local id = 7920230
local tr = 0
while true do
wait()
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId, id) then
script.Parent.Text = tostring(tr).."/8"
else
script.Parent.Text = tostring(tr).."/4"
end
for i, v in pairs(plr:WaitForChild("PetsEquiped"):GetChildren()) do
if #plr:WaitForChild("PetsEquiped"):GetChildren() >= 1 then
tr=tr+1
end
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId, id) then
script.Parent.Text = tostring(tr).."/8"
else
script.Parent.Text = tostring(tr).."/4"
end
end
tr = 0
end