local C=game.ReplicatedStorage local v=script.Parent.CurrentTarget local o=script.Parent.PetsFrame function resetFrame()for C,v in pairs(o.Frame:GetChildren())do if v.Name~="\085\073\067\111\114\110\101\114"then for C,v in pairs(v.PetView:GetChildren())do v:Destroy()end v.Percentage.Text=""v.Rarity.Text=""v.ImageColor3=Color3.fromRGB(25,25,25)end end end local X=require(C.Pets.Eggs)local R=script.Parent.CostLabel local q=C.Pets.Models;(v:GetPropertyChangedSignal("\086\097\108\117\101")):Connect(function()if v.Value=="\078\111\110\101"then resetFrame()return end local J=X[v.Value]local y=J.Currency local T=0 local p={}for C,v in pairs(J.Pets)do p[#p+1]={Name=v.Name;Type=v.Type,Rarity=v.Rarity,Secret=v.Secret}T=T+v.Rarity end R.CurrencyImage.Image=(C.Pets.Settings:FindFirstChild(y.."\073\109\097\103\101")).Value R.TextLabel.Text=J.Cost table.sort(p,function(C,v)return v.Rarity<C.Rarity end)if y~="\082\036"then script.Parent.BuyButtonR.Visible=true script.Parent.BuyButtonT.Visible=true script.Parent.BuyButtonE.Size=script.Parent.BuyButtonR.Size else script.Parent.BuyButtonR.Visible=false script.Parent.BuyButtonT.Visible=false script.Parent.BuyButtonE.Size=script.Parent.CostLabel.Size end resetFrame()for v,X in pairs(p)do if X.Secret==false then local R=X.Name local J=((q:FindFirstChild(R)):FindFirstChild(X.Type)):Clone()local y=o.Frame:FindFirstChild("\083\108\111\116"..v)local p=y.PetView local g=math.floor((X.Rarity/T)*10000)/100 local t=(q:FindFirstChild(R)).Settings.Rarity.Value local O=(C.Pets.Rarities:FindFirstChild(t)).Color.Value local h=Instance.new("\067\097\109\101\114\097",p)local b=Vector3.new(0,0,0)p.CurrentCamera=h J:SetPrimaryPartCFrame(CFrame.new(b))J.Parent=p y.Percentage.Text=g.."\037"y.Rarity.Text=t y.Rarity.TextColor3=O y.ImageColor3=Color3.fromRGB(55,55,55)spawn(function()local C=180 while wait()and J.Parent~=nil do h.CFrame=CFrame.Angles(0,math.rad(C),0)*CFrame.new(b+Vector3.new(0,0,3),b+Vector3.new(0,0,0))C=C+1 end end)end end end)
-- Decompiled with the Synapse X Luau decompiler.

local l__ReplicatedStorage__1 = game.ReplicatedStorage
local l__CurrentTarget__2 = script.Parent.CurrentTarget
local l__PetsFrame__1 = script.Parent.PetsFrame
function resetFrame()
	for v6, v7 in pairs(l__PetsFrame__1.Frame:GetChildren()) do
		if v7.Name ~= "UICorner" then
			for v11, v12 in pairs(v7.PetView:GetChildren()) do
				v12:Destroy()
			end
			v7.Percentage.Text = ""
			v7.Rarity.Text = ""
			v7.ImageColor3 = Color3.fromRGB(25, 25, 25)
		end
	end
end
local u2 = require(l__ReplicatedStorage__1.Pets.Eggs)
local l__CostLabel__3 = script.Parent.CostLabel
local l__Models__4 = l__ReplicatedStorage__1.Pets.Models
l__CurrentTarget__2:GetPropertyChangedSignal("Value"):Connect(function()
	if l__CurrentTarget__2.Value == "None" then
		resetFrame()
		return
	end
	local v13 = u2[l__CurrentTarget__2.Value]
	local l__Currency__14 = v13.Currency
	local v15 = 0
	local v16 = {}
	for v17, v18 in pairs(v13.Pets) do
		v16[#v16 + 1] = {
			Name = v18.Name,
			Type = v18.Type,
			Rarity = v18.Rarity,
			Secret = v18.Secret,
		}
		v15 = v15 + v18.Rarity
	end
	l__CostLabel__3.CurrencyImage.Image =
		l__ReplicatedStorage__1.Pets.Settings:FindFirstChild(l__Currency__14 .. "Image").Value
	l__CostLabel__3.TextLabel.Text = v13.Cost
	table.sort(v16, function(p1, p2)
		return p2.Rarity < p1.Rarity
	end)
	if l__Currency__14 ~= "R$" then
		script.Parent.BuyButtonR.Visible = true
		script.Parent.BuyButtonT.Visible = true
		script.Parent.BuyButtonE.Size = script.Parent.BuyButtonR.Size
	else
		script.Parent.BuyButtonR.Visible = false
		script.Parent.BuyButtonT.Visible = false
		script.Parent.BuyButtonE.Size = script.Parent.CostLabel.Size
	end
	resetFrame()
	for v19, v20 in pairs(v16) do
		if v20.Secret == false then
			local l__Name__21 = v20.Name
			local v22 = l__Models__4:FindFirstChild(l__Name__21):FindFirstChild(v20.Type):Clone()
			local v23 = l__PetsFrame__1.Frame:FindFirstChild("Slot" .. v19)
			local l__PetView__24 = v23.PetView
			local v25 = math.floor(v20.Rarity / v15 * 10000) / 100
			local l__Value__26 = l__Models__4:FindFirstChild(l__Name__21).Settings.Rarity.Value
			local l__Value__27 = l__ReplicatedStorage__1.Pets.Rarities:FindFirstChild(l__Value__26).Color.Value
			local v28 = Instance.new("Camera", l__PetView__24)
			local v29 = Vector3.new(0, 0, 0)
			l__PetView__24.CurrentCamera = v28
			v22:SetPrimaryPartCFrame(CFrame.new(v29))
			v22.Parent = l__PetView__24
			v23.Percentage.Text = v25 .. "%"
			v23.Rarity.Text = l__Value__26
			v23.Rarity.TextColor3 = l__Value__27
			v23.ImageColor3 = Color3.fromRGB(55, 55, 55)
			spawn(function()
				local v30 = 180
				while wait() and v22.Parent ~= nil do
					v28.CFrame = CFrame.Angles(0, math.rad(v30), 0)
						* CFrame.new(v29 + Vector3.new(0, 0, 3), v29 + Vector3.new(0, 0, 0))
					v30 = v30 + 1
				end
			end)
		end
	end
end)
