Help with egg hatching system

Im making a pet simulator. im using a egg hatching system from the toolbox (bc i really cant script)… i have a issue… when i duplicate the egg and change its name it doesnt work. non of the eggs works and i really cant figure out why… i will add all scripts that i think is important… thank you for your help <3

local Eggs = {
	["Start"] = {
		["Cost"] = 250,
		["Currency"] = "Coins",
		
		["Pets"] = {
			["Bunny"] = {
				["Chance"] = 3500000,
				["Percent"] = 35
			},
			
			["Bear"] = {
				["Chance"] = 3000000,
				["Percent"] = 30
			},
			
			["Lynx"] = {
				["Chance"] = 2050000,
				["Percent"] = 20.5
			},
			
			["Frog"] = {
				["Chance"] = 1450000,
				["Percent"] = 14.5
			},
			
			["Huge Bear"] = {
				["Chance"] = 1,
				["Percent"] = 1E-05
			}
		}
	},
	
	-- New egg added here
	["Egg2"] = {
		["Cost"] = 500,
		["Currency"] = "Gems",
		
		["Pets"] = {
			["Dragon"] = {
				["Chance"] = 2000000,
				["Percent"] = 40
			},
			
			["Phoenix"] = {
				["Chance"] = 1800000,
				["Percent"] = 36
			},
			
			["Unicorn"] = {
				["Chance"] = 1200000,
				["Percent"] = 24
			}
		}
	}
}

return Eggs

local TS = game:GetService("TweenService")
local RS = game:GetService("ReplicatedStorage")
local MPS = game:GetService("MarketplaceService")
local Players = game:GetService("Players")

local MainFolder_RS = RS:WaitForChild("MainFolder_RS")
local Modules = MainFolder_RS:WaitForChild("Modules")
local Remotes = MainFolder_RS:WaitForChild("Remotes")
local Pets = MainFolder_RS:WaitForChild("Pets")

local RNG = Random.new()
local Eggs = require(Pets.EggData)

local function RandomID(Player)
	local Rand = math.random(2, 1000000)
	for _, v in pairs(Player.Pets:GetChildren()) do
		if v.PetID.Value == Rand then
			return RandomID()
		end
	end
	return Rand
end

local function TotalPets(player)
	local Pets = 0
	for _, v in pairs(player.Pets:GetChildren()) do
		Pets = Pets + 1
	end
	return Pets
end

function GetRarityTotalChance(EggPets)
	local total = 0
	for i, v in pairs(EggPets) do
		total += v.Chance
	end
	return total
end

function GetRarityMaxChance(EggPets)
	local total = 0
	for i, v in pairs(EggPets) do
		if v > total then
			total = v["Max"]
		end
	end
	return total
end

function SetRandomMinMax(EggPets, luck)
	local currentMin = 0
	local currentMax = 0
	for i, v in pairs(EggPets) do
		local PetData = require(Pets.Models[i].PetData)
		currentMin += 1
		if PetData.Rarity == "Epic" or PetData.Rarity == "Legendary" or PetData.Rarity == "Secret" then
			currentMax += (v.Chance * luck)
		else
			currentMax += v.Chance
		end
		EggPets[i]["Min"] = currentMin
		EggPets[i]["Max"] = currentMax
	end
end

function ChoosePet(EggPets, luck)
	SetRandomMinMax(EggPets, luck)

	local randomChance = RNG:NextInteger(1, GetRarityTotalChance(EggPets))

	for i, v in pairs(EggPets) do
		if randomChance >= v["Min"] and randomChance <= v["Max"] then
			return i
		end
	end
end

local function SingleEgg(player, Egg)
	local Data = Eggs[Egg]
	local Cost = Data["Cost"]
	local Currency = Data["Currency"]
	local PetsData = Data["Pets"]
	local PetChosen = ChoosePet(PetsData, player.Values.Luck.Value)
	local PetData = require(Pets.Models[PetChosen].PetData)

	if Currency ~= "R$" then
		player.leaderstats[Currency].Value -= Cost
		player.leaderstats.Eggs.Value += 1
	end

	if player["Auto Delete"][PetData.Rarity].Value == false then
		local Clone = Pets.PetFolderTemplate:Clone()
		Clone.Name = PetChosen
		Clone.Strength.Value = PetData.Strength
		Clone.Multiplier.Value = PetData.Multiplier
		Clone.Type.Value = PetData.Tier
		Clone.Equipped.Value = false
		Clone.Locked.Value = false
		Clone.PetID.Value = RandomID(player)
		Clone.Parent = player.Pets
	end

	return PetChosen
end

local function TripleEgg(player, Egg)
	local Data = Eggs[Egg]
	local Cost = Data["Cost"]
	local Currency = Data["Currency"]
	local PetsData = Data["Pets"]
	local PetsChosen = {}

	if Currency ~= "R$" then
		player.leaderstats[Currency].Value -= Cost * 3
		player.leaderstats.Eggs.Value += 3
	end

	for i = 1, 3 do
		local PetChosen = ChoosePet(PetsData, player.Values.Luck.Value)
		local PetData = require(Pets.Models[PetChosen].PetData)
		if player["Auto Delete"][PetData.Rarity].Value == false then
			local Clone = Pets.PetFolderTemplate:Clone()
			Clone.Name = PetChosen
			Clone.Strength.Value = PetData.Strength
			Clone.Multiplier.Value = PetData.Multiplier
			Clone.Type.Value = PetData.Tier
			Clone.Equipped.Value = false
			Clone.Locked.Value = false
			Clone.PetID.Value = RandomID(player)
			Clone.Parent = player.Pets
		end
		PetsChosen[#PetsChosen + 1] = PetChosen
	end
	return PetsChosen
end

local function UnboxEgg(player, Egg, Type)
	if Eggs[Egg] ~= nil then
		local Data = Eggs[Egg]
		local Cost = Data["Cost"]
		local Currency = Data["Currency"]
		local Pets = Data["Pets"]

		if Currency ~= "R$" then
			if Type == "Single" then
				if player.leaderstats[Currency].Value >= Cost then
					if TotalPets(player) < player.Values.MaxInventory.Value then
						local PetChosen = SingleEgg(player, Egg)
						return PetChosen
					else
						return "Error", "Not Enough Inventory Room"
					end
				else
					return "Error", "Insufficient Currency"
				end
			elseif Type == "Triple" then
				if player.leaderstats[Currency].Value >= Cost * 3 then 
					if TotalPets(player) < player.Values.MaxInventory.Value - 2 then
						local PetsChosen = TripleEgg(player, Egg)
						return PetsChosen
					else
						return "Error", "Not Enough Inventory Room"
					end
				else
					return "Error", "Insufficient Currency"
				end
			elseif Type == "Auto" then
				if player.Gamepasses["Triple Hatch"].Value ~= false then
					if player.leaderstats[Currency].Value >= Cost * 3 then 
						if TotalPets(player) < player.Values.MaxInventory.Value - 2 then
							local PetsChosen = TripleEgg(player, Egg)
							return PetsChosen
						else
							return "Error", "Not Enough Inventory Room"
						end
					else
						return "Error", "Insufficient Currency"
					end
				else
					if player.leaderstats[Currency].Value >= Cost then
						if TotalPets(player) < player.Values.MaxInventory.Value then
							local PetChosen = SingleEgg(player, Egg)
							return PetChosen
						else
							return "Error", "Inventory Full"
						end
					else
						return "Error", "Insufficient Currency"
					end
				end
			end
		else
			if TotalPets(player) < player.Values.MaxInventory.Value then
				return "Error", "Robux Purchase"
			else
				return "Error", "Not Enough Inventory Room"
			end
		end
	else
		return "Error", "Invalid Data"
	end
end

Remotes.EggOpened.OnServerInvoke = UnboxEgg

its like it doesnt find the second egg…

local MPS = game:GetService("MarketplaceService")
local RS = game:GetService("ReplicatedStorage")
local UIS = game:GetService("UserInputService")
local TS = game:GetService("TweenService")
local RUS = game:GetService("RunService")
local Players = game:GetService("Players")

local Player = Players.LocalPlayer
local Camera = workspace.Camera

local MainFolder_Workspace = workspace:WaitForChild("MainFolder_Workspace")
local MainFolder_RS = RS:WaitForChild("MainFolder_RS")

local Eggs = MainFolder_Workspace:WaitForChild("Eggs")

local Remotes = MainFolder_RS:WaitForChild("Remotes")
local Modules = MainFolder_RS:WaitForChild("Modules")
local Pets = MainFolder_RS:WaitForChild("Pets")

local Y = Player.PlayerGui.Eggs.EggFrame.Settings.Y
local Z = Player.PlayerGui.Eggs.EggFrame.Settings.Z
local R = Player.PlayerGui.Eggs.EggFrame.Settings.R

local FrameTrigger = require(Player.PlayerGui:WaitForChild("FrameTrigger"))
local Notification = require(Modules.NotificationModule)
local FormatNumberAlt = require(Modules.FormatNumberAlt)
local EggData = require(Pets.EggData)

local canHatch = true
local CanRotate = false
local dropdownDone = false
local isAutoHatching = false
local cantOpenBillboard = false

local HatchSpeed = Player.Values.HatchSpeed.Value

local function animateBillboard(billboard, openClose)
	if openClose == true then
		TS:Create(billboard, TweenInfo.new(.2), {Size = UDim2.fromScale(5, 7)}):Play()
	else
		local closeTween = TS:Create(billboard, TweenInfo.new(.2), {Size = UDim2.fromScale(0, 0)})
		closeTween:Play()
		closeTween.Completed:Wait(0.1)
		billboard.Enabled = false
	end
end

local function disableBillboards()
	cantOpenBillboard = true
	for i, v in pairs(script.Parent.Billboards:GetChildren()) do
		if v:IsA("BillboardGui") then
			animateBillboard(v, false)
		end
	end
end

local function enableBillboards()
	cantOpenBillboard = false
	for i, v in pairs(script.Parent.Billboards:GetChildren()) do
		if v:IsA("BillboardGui") then
			animateBillboard(v, true)
		end
	end
end

for _, v in pairs(Eggs:GetChildren()) do
	if v:IsA("Model") then
		local Data = EggData[v.Name]
		local EggPets = Data["Pets"]

		if EggPets ~= nil then
			local BillboardTemplate = script:WaitForChild("Template"):Clone()
			local Container = BillboardTemplate:WaitForChild("Container")
			local MainFrame = Container:WaitForChild("MainFrame")
			local Template = Player.PlayerGui.Assets.Template

			BillboardTemplate.Parent = script.Parent.Billboards
			BillboardTemplate.Name = v.Name
			BillboardTemplate.Adornee = v.EggMesh

			for i, pet in pairs(EggPets) do
				local PetData = require(Pets.Models[i].PetData)
				if PetData.Secret ~= true then
					local ClonedTemplate = Template:Clone()
					ClonedTemplate.Name = i
					ClonedTemplate.Rarity.Text = pet.Percent.."%"
					ClonedTemplate.Rarity.TextColor3 = PetData.Colour
					ClonedTemplate.Visible = true
					ClonedTemplate.Parent = MainFrame
					ClonedTemplate.ImageLabel.Image = PetData.Thumbnail
				end
			end

			v.Details.SurfaceGui.Frame.Cost.Text = FormatNumberAlt.FormatCompact(Data.Cost, 1)

			RUS.Heartbeat:Connect(function()
				if Data["Currency"] ~= "R$" then
					if Player.leaderstats[Data["Currency"]].Value >= Data["Cost"] then
						v.PrimaryPart.Attachment.BillboardGui.Enabled = true
					else
						v.PrimaryPart.Attachment.BillboardGui.Enabled = false
					end
				else
					v.PrimaryPart.Attachment.BillboardGui.Enabled = false
				end

				if Player:DistanceFromCharacter(v.EggMesh.PrimaryPart.Position) < 10 then
					if cantOpenBillboard == false then
						BillboardTemplate.Enabled = true
						animateBillboard(BillboardTemplate, true)
					end
				else
					if cantOpenBillboard == false then
						animateBillboard(BillboardTemplate, false)
					end
				end
			end)
		end
	end
end

local function SingleHatch(pet, egg)
	if Player.Values.isHatching.Value == false then
		Player.Values.isHatching.Value = true
		Player.CameraMinZoomDistance = 10

		for _, v in pairs(Player.PlayerGui:GetChildren()) do
			if v:IsA("ScreenGui") and v ~= Player.PlayerGui.Eggs then
				v.Enabled = false
			end
		end

		disableBillboards()

		local PetData = require(Pets.Models[pet].PetData)
		local PetModel = PetData.Model:Clone()
		local EggMesh = Eggs[tostring(egg)]:FindFirstChild("EggMesh"):Clone()
		EggMesh.Parent = Camera
		for i, v in pairs(EggMesh:GetChildren()) do
			if v:IsA("BasePart") then
				v.Anchored = true
				v.CanCollide = false
				v.CastShadow = false
				v.Attachment:Destroy()
			end
		end

		TS:Create(Y, TweenInfo.new(1 / HatchSpeed, Enum.EasingStyle.Bounce), {Value = 0}):Play()

		local hatchConnection
		local Eggs1 = Player.PlayerGui.Eggs.EggFrame.Egg1
		hatchConnection = RUS.RenderStepped:Connect(function()
			local cf = nil

			if dropdownDone == true then
				if CanRotate == false then
					cf = CFrame.new(0, Y.Value, -EggMesh.PrimaryPart.Size.Z * 2 - Z.Value)
				else
					cf = CFrame.new(0, Y.Value, -EggMesh.PrimaryPart.Size.Z * 2 - Z.Value) * CFrame.Angles(0, 0, math.sin(time() * (6 + HatchSpeed)) / 2.5)
				end
			else
				cf = CFrame.new(0, Y.Value, -EggMesh.PrimaryPart.Size.Z * 2 - Z.Value)
			end

			EggMesh:PivotTo(Camera.CFrame * cf)
		end)

		task.wait(1 / HatchSpeed)
		dropdownDone = true
		CanRotate = true
		task.wait(3 / HatchSpeed)
		CanRotate = false
		TS:Create(Z, TweenInfo.new(0.5 / HatchSpeed), {Value = 2}):Play()
		task.wait(0.3 / HatchSpeed)
		TS:Create(Player.PlayerGui.Eggs.EggFrame.Flash, TweenInfo.new(0.2 / HatchSpeed), {BackgroundTransparency = 0}):Play()
		hatchConnection:Disconnect()
		EggMesh.PrimaryPart.Transparency = 1
		task.wait(0.2 / HatchSpeed)
		TS:Create(Player.PlayerGui.Eggs.EggFrame.Flash, TweenInfo.new(0.2 / HatchSpeed), {BackgroundTransparency = 1}):Play()
		PetModel.Parent = Camera

		for _, v in pairs(PetModel:GetChildren()) do
			if v:IsA("BasePart") then
				v.Anchored = true
				v.CanCollide = false
				v.CastShadow = false
			end
		end

		TS:Create(R, TweenInfo.new(1 / HatchSpeed, Enum.EasingStyle.Back), {Value = 180}):Play()

		hatchConnection = RUS.RenderStepped:Connect(function()
			local cf = CFrame.new(0, Y.Value, -EggMesh.PrimaryPart.Size.Z * 1.5) * CFrame.Angles(0, math.rad(R.Value), 0)
			PetModel:PivotTo(Camera.CFrame * cf)
		end)

		for _, v in pairs(Eggs1:GetChildren()) do
			if v:IsA("TextLabel") then
				if v.Name == "Deleted" then
					if Player["Auto Delete"][PetData.Rarity].Value == true then
						TS:Create(v, TweenInfo.new(0.5 / HatchSpeed), {TextTransparency = 0}):Play()
						TS:Create(v.UIStroke, TweenInfo.new(0.5 / HatchSpeed), {Transparency = 0}):Play()
					end
				elseif v.Name ~= "Deleted" then
					TS:Create(v, TweenInfo.new(0.5 / HatchSpeed), {TextTransparency = 0}):Play()
					TS:Create(v.UIStroke, TweenInfo.new(0.5 / HatchSpeed), {Transparency = 0}):Play()
				end
			end
		end

		Eggs1.NameLabel.Text = pet
		Eggs1.RarityLabel.Text = PetData.Rarity
		Eggs1.RarityLabel.TextColor3 = PetData.Colour

		task.wait(3 / HatchSpeed)

		for _, v in pairs(Eggs1:GetChildren()) do
			TS:Create(v, TweenInfo.new(0.5 / HatchSpeed), {TextTransparency = 1}):Play()
			TS:Create(v.UIStroke, TweenInfo.new(0.5 / HatchSpeed), {Transparency = 1}):Play()
		end

		TS:Create(Y, TweenInfo.new(1 / HatchSpeed), {Value = -25}):Play()
		task.wait(1)
		hatchConnection:Disconnect()
		Camera:ClearAllChildren()

		Player.CameraMinZoomDistance = 0.5
		enableBillboards()

		Z.Value = 0
		Y.Value = 25
		R.Value = 0
		dropdownDone = false
		CanRotate = false

		for _, v in pairs(Player.PlayerGui:GetChildren()) do
			if v:IsA("ScreenGui") and v ~= Player.PlayerGui.Eggs then
				v.Enabled = true
			end
		end

		Player.Values.isHatching.Value = false
	end
end

local function TripleHatch(pets, egg)
	if Player.Values.isHatching.Value == false then
		Player.Values.isHatching.Value = true
		Player.CameraMinZoomDistance = 10

		for _, v in pairs(Player.PlayerGui:GetChildren()) do
			if v:IsA("ScreenGui") and v ~= Player.PlayerGui.Eggs then
				v.Enabled = false
			end
		end

		disableBillboards()

		local EggMesh1 = Eggs:FindFirstChild(tostring(egg)):FindFirstChild("EggMesh"):Clone()
		local EggMesh2 = Eggs:FindFirstChild(tostring(egg)):FindFirstChild("EggMesh"):Clone()
		local EggMesh3 = Eggs:FindFirstChild(tostring(egg)):FindFirstChild("EggMesh"):Clone()
		EggMesh1.Parent = Camera
		EggMesh2.Parent = Camera
		EggMesh3.Parent = Camera

		for _, v in pairs(Camera:GetDescendants()) do
			if v:IsA("BasePart") then
				v.Anchored = true
				v.CanCollide = false
				v.CastShadow = false
				v.Attachment:Destroy()
			end
		end

		TS:Create(Y, TweenInfo.new(1 / HatchSpeed, Enum.EasingStyle.Bounce), {Value = 0}):Play()

		local hatchConnection

		hatchConnection = RUS.RenderStepped:Connect(function()
			local cf1 = nil
			local cf2 = nil
			local cf3 = nil
			if dropdownDone == true then
				if CanRotate == false then 
					cf1 = CFrame.new(0, Y.Value, -EggMesh1.PrimaryPart.Size.Z * 2 - Z.Value)
					cf2 = CFrame.new(-5, Y.Value, -EggMesh1.PrimaryPart.Size.Z * 2.5 - Z.Value)
					cf3 = CFrame.new(5, Y.Value, -EggMesh1.PrimaryPart.Size.Z * 2.5 - Z.Value)
				else
					cf1 = CFrame.new(0, Y.Value, -EggMesh1.PrimaryPart.Size.Z * 2 - Z.Value) * CFrame.Angles(0, 0, math.sin(time() * (6 + HatchSpeed)) / 2.5) 
					cf2 = CFrame.new(-5, Y.Value, -EggMesh1.PrimaryPart.Size.Z * 2.5 - Z.Value) * CFrame.Angles(0, 0, math.sin(time() * (6 + HatchSpeed)) / 2.5)
					cf3 = CFrame.new(5, Y.Value, -EggMesh1.PrimaryPart.Size.Z * 2.5 - Z.Value) * CFrame.Angles(0, 0, math.sin(time() * (6 + HatchSpeed)) / 2.5)
				end
			else
				cf1 = CFrame.new(0, Y.Value, -EggMesh1.PrimaryPart.Size.Z * 2 - Z.Value)
				cf2 = CFrame.new(-5, Y.Value, -EggMesh1.PrimaryPart.Size.Z * 2.5 - Z.Value)
				cf3 = CFrame.new(5, Y.Value, -EggMesh1.PrimaryPart.Size.Z * 2.5 - Z.Value)
			end
			EggMesh1:PivotTo(Camera.CFrame * cf1)
			EggMesh2:PivotTo(Camera.CFrame * cf2)
			EggMesh3:PivotTo(Camera.CFrame * cf3)
		end)

		task.wait(1 / HatchSpeed)
		dropdownDone = true
		CanRotate = true
		task.wait(3 / HatchSpeed)
		CanRotate = false
		TS:Create(Z, TweenInfo.new(0.5 / HatchSpeed), {Value = 2}):Play()
		task.wait(0.3 / HatchSpeed)
		TS:Create(Player.PlayerGui.Eggs.EggFrame.Flash, TweenInfo.new(0.2 / HatchSpeed), {BackgroundTransparency = 0}):Play()
		hatchConnection:Disconnect()
		EggMesh1.PrimaryPart.Transparency = 1
		EggMesh2.PrimaryPart.Transparency = 1
		EggMesh3.PrimaryPart.Transparency = 1
		local PetModel1
		local PetModel2
		local PetModel3
		for i = 1, 3 do
			if i == 1 then
				PetModel1 = Pets.Models[pets[i]].Normal:Clone()
				PetModel1.Parent = Camera
			elseif i == 2 then
				PetModel2 = Pets.Models[pets[i]].Normal:Clone()
				PetModel2.Parent = Camera
			elseif i == 3 then
				PetModel3 = Pets.Models[pets[i]].Normal:Clone()
				PetModel3.Parent = Camera
			end
		end
		task.wait(0.2 / HatchSpeed)
		TS:Create(Player.PlayerGui.Eggs.EggFrame.Flash, TweenInfo.new(0.2 / HatchSpeed), {BackgroundTransparency = 1}):Play()

		for _, v in pairs(Camera:GetDescendants()) do
			if v:IsA("BasePart") then
				v.Anchored = true
				v.CanCollide = false
				v.CastShadow = false
			end
		end

		TS:Create(R, TweenInfo.new(1 / HatchSpeed, Enum.EasingStyle.Back), {Value = 180}):Play()

		hatchConnection = RUS.RenderStepped:Connect(function()
			local cf1 = CFrame.new(0, Y.Value, -EggMesh1.PrimaryPart.Size.Z * 1.5) * CFrame.Angles(0, math.rad(R.Value), 0)
			local cf2 = CFrame.new(-5.5, Y.Value, -EggMesh1.PrimaryPart.Size.Z * 2) * CFrame.Angles(0, math.rad(R.Value), 0)
			local cf3 = CFrame.new(5.5, Y.Value, -EggMesh1.PrimaryPart.Size.Z * 2) * CFrame.Angles(0, math.rad(R.Value), 0)

			PetModel1:PivotTo(Camera.CFrame * cf1)
			PetModel2:PivotTo(Camera.CFrame * cf2)
			PetModel3:PivotTo(Camera.CFrame * cf3)
		end)

		for i = 1, 3 do
			local PetData = require(Pets.Models[pets[i]].PetData)
			for _, v in pairs(Player.PlayerGui.Eggs.EggFrame["Egg"..i]:GetChildren()) do
				if v.Name == "Deleted" then
					if Player["Auto Delete"][PetData.Rarity].Value == true then
						TS:Create(v, TweenInfo.new(0.5 / HatchSpeed), {TextTransparency = 0}):Play()
						TS:Create(v.UIStroke, TweenInfo.new(0.5 / HatchSpeed), {Transparency = 0}):Play()
					end
				elseif v.Name ~= "Deleted" then
					TS:Create(v, TweenInfo.new(0.5 / HatchSpeed), {TextTransparency = 0}):Play()
					TS:Create(v.UIStroke, TweenInfo.new(0.5 / HatchSpeed), {Transparency = 0}):Play()
				end
			end
			Player.PlayerGui.Eggs.EggFrame["Egg"..i].NameLabel.Text = pets[i]
			Player.PlayerGui.Eggs.EggFrame["Egg"..i].RarityLabel.Text = PetData.Rarity
			Player.PlayerGui.Eggs.EggFrame["Egg"..i].RarityLabel.TextColor3 = PetData.Colour
		end

		task.wait(3 / HatchSpeed)

		for i = 1, 3 do
			local PetData = require(Pets.Models[pets[i]].PetData)
			for _, v in pairs(Player.PlayerGui.Eggs.EggFrame["Egg"..i]:GetChildren()) do
				TS:Create(v, TweenInfo.new(0.5 / HatchSpeed), {TextTransparency = 1}):Play()
				TS:Create(v.UIStroke, TweenInfo.new(0.5 / HatchSpeed), {Transparency = 1}):Play()
			end
		end

		TS:Create(Y, TweenInfo.new(1 / HatchSpeed, Enum.EasingStyle.Bounce), {Value = -25}):Play()
		task.wait(1 / HatchSpeed)
		hatchConnection:Disconnect()
		Camera:ClearAllChildren()

		Player.CameraMinZoomDistance = 0.5
		enableBillboards()

		Z.Value = 0
		Y.Value = 25
		R.Value = 0
		dropdownDone = false
		CanRotate = false

		for _, v in pairs(Player.PlayerGui:GetChildren()) do
			if v:IsA("ScreenGui") and v ~= Player.PlayerGui.Eggs then
				v.Enabled = true
			end
		end

		Player.Values.isHatching.Value = false
	end
end

UIS.InputBegan:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.E then
		if Player.Character ~= nil and Player.Values.isHatching.Value == false then
			local nearestEgg
			local playerPos = Player.Character.HumanoidRootPart.Position

			for i, v in	pairs(Eggs:GetChildren()) do
				if v:IsA("Model") then
					if nearestEgg == nil then
						nearestEgg = v
					else
						if (playerPos - v.PrimaryPart.Position).Magnitude < (nearestEgg.PrimaryPart.Position - playerPos).Magnitude then
							nearestEgg = v
						end
					end
				end
			end

			if Player:DistanceFromCharacter(nearestEgg.EggMesh.PrimaryPart.Position) < 10 then
				canHatch = true
			else
				canHatch = false
			end

			if canHatch == true then
				if Player.Values.isHatching.Value == false then
					local result, message = Remotes.EggOpened:InvokeServer(nearestEgg.Name, "Single")
					if result ~= "Error" then
						SingleHatch(result, nearestEgg.Name)
					elseif message ~= nil then
						Notification.Notify(message.."!", Color3.fromRGB(255, 84, 84), 5)
					end
				end
			end
		end
	end
	if input.KeyCode == Enum.KeyCode.R then
		if Player.Character ~= nil and Player.Values.isHatching.Value == false then
			local nearestEgg
			local playerPos = Player.Character.HumanoidRootPart.Position

			for i, v in	pairs(Eggs:GetChildren()) do
				if v:IsA("Model") then
					if nearestEgg == nil then
						nearestEgg = v
					else
						if (playerPos - v.PrimaryPart.Position).Magnitude < (nearestEgg.PrimaryPart.Position - playerPos).Magnitude then
							nearestEgg = v
						end
					end
				end
			end

			if Player:DistanceFromCharacter(nearestEgg.EggMesh.PrimaryPart.Position) < 10 then
				canHatch = true
			else
				canHatch = false
			end

			if canHatch == true then
				if Player.Values.isHatching.Value == false then
					local result, message = Remotes.EggOpened:InvokeServer(nearestEgg.Name, "Triple")
					if result ~= "Error" then
						TripleHatch(result, nearestEgg.Name)
					elseif message ~= nil then
						Notification.Notify(message.."!", Color3.fromRGB(255, 84, 84), 5)
					end
				end
			end
		end
	end
	if input.KeyCode == Enum.KeyCode.T then
		local DB = false
		if Player.Character ~= nil and Player.Values.isHatching.Value == false then
			local nearestEgg
			local playerPos = Player.Character.HumanoidRootPart.Position

			for i, v in	pairs(Eggs:GetChildren()) do
				if v:IsA("Model") then
					if nearestEgg == nil then
						nearestEgg = v
					else
						if (playerPos - v.PrimaryPart.Position).Magnitude < (nearestEgg.PrimaryPart.Position - playerPos).Magnitude then
							nearestEgg = v
						end
					end
				end
			end

			if Player:DistanceFromCharacter(nearestEgg.EggMesh.PrimaryPart.Position) < 10 then
				canHatch = true
			else
				canHatch = false
			end

			if canHatch == true then
				if Player.Values.isHatching.Value == false then
					isAutoHatching = true
					while isAutoHatching == true do
						if Player:DistanceFromCharacter(nearestEgg.EggMesh.PrimaryPart.Position) < 10 then
							if DB == false then
								DB = true
								local result, message = Remotes.EggOpened:InvokeServer(nearestEgg.Name, "Auto")
								if result ~= "Error" then
									if Player.Gamepasses["Triple Hatch"].Value == true then
										TripleHatch(result, nearestEgg.Name)
										task.wait(0.3)
										DB = false
									else
										SingleHatch(result, nearestEgg.Name)
										task.wait(0.3)
										DB = false
									end
								elseif message ~= nil then
									Notification.Notify(message.."!", Color3.fromRGB(255, 84, 84), 5)
									Notification.Notify("Auto Hatch is now Disabled!", Color3.fromRGB(255, 84, 84), 5)
									isAutoHatching = false
									break
								end
							end
						else
							isAutoHatching = false
							break
						end
					end
				end
			end
		end
	end
end)

for _, v in pairs(script.Parent.Billboards:GetChildren()) do
	local Button_E = v.Buttons.Button_E.E
	local Button_R = v.Buttons.Button_R.R
	local Button_T = v.Buttons.Button_T.T
	local Button_S = v.Buttons.Button_S.S

	Button_E.MouseButton1Click:Connect(function()
		if Player.Character ~= nil and Player.Values.isHatching.Value == false then
			local nearestEgg
			local playerPos = Player.Character.HumanoidRootPart.Position

			for i, v in	pairs(Eggs:GetChildren()) do
				if v:IsA("Model") then
					if nearestEgg == nil then
						nearestEgg = v
					else
						if (playerPos - v.PrimaryPart.Position).Magnitude < (nearestEgg.PrimaryPart.Position - playerPos).Magnitude then
							nearestEgg = v
						end
					end
				end
			end

			if Player:DistanceFromCharacter(nearestEgg.EggMesh.PrimaryPart.Position) < 10 then
				canHatch = true
			else
				canHatch = false
			end

			if canHatch == true then
				if Player.Values.isHatching.Value == false then
					local result, message = Remotes.EggOpened:InvokeServer(nearestEgg.Name, "Single")
					if result ~= "Error" then
						SingleHatch(result, nearestEgg.Name)
					elseif message ~= nil then
						Notification.Notify(message.."!", Color3.fromRGB(255, 84, 84), 5)
					end
				end
			end
		end
	end)

	Button_R.MouseButton1Click:Connect(function()
		if Player.Character ~= nil and Player.Values.isHatching.Value == false then
			local nearestEgg
			local playerPos = Player.Character.HumanoidRootPart.Position

			for i, v in	pairs(Eggs:GetChildren()) do
				if v:IsA("Model") then
					if nearestEgg == nil then
						nearestEgg = v
					else
						if (playerPos - v.PrimaryPart.Position).Magnitude < (nearestEgg.PrimaryPart.Position - playerPos).Magnitude then
							nearestEgg = v
						end
					end
				end
			end

			if Player:DistanceFromCharacter(nearestEgg.EggMesh.PrimaryPart.Position) < 10 then
				canHatch = true
			else
				canHatch = false
			end

			if canHatch == true then
				if Player.Values.isHatching.Value == false then
					local result, message = Remotes.EggOpened:InvokeServer(nearestEgg.Name, "Triple")
					if result ~= "Error" then
						TripleHatch(result, nearestEgg.Name)
					elseif message ~= nil then
						Notification.Notify(message.."!", Color3.fromRGB(255, 84, 84), 5)
					end
				end
			end
		end
	end)

	Button_T.MouseButton1Click:Connect(function()
		local DB = false
		if Player.Character ~= nil and Player.Values.isHatching.Value == false then
			local nearestEgg
			local playerPos = Player.Character.HumanoidRootPart.Position

			for i, v in	pairs(Eggs:GetChildren()) do
				if v:IsA("Model") then
					if nearestEgg == nil then
						nearestEgg = v
					else
						if (playerPos - v.PrimaryPart.Position).Magnitude < (nearestEgg.PrimaryPart.Position - playerPos).Magnitude then
							nearestEgg = v
						end
					end
				end
			end

			if Player:DistanceFromCharacter(nearestEgg.EggMesh.PrimaryPart.Position) < 10 then
				canHatch = true
			else
				canHatch = false
			end

			if canHatch == true then
				if Player.Values.isHatching.Value == false then
					isAutoHatching = true
					while isAutoHatching == true do
						if Player:DistanceFromCharacter(nearestEgg.EggMesh.PrimaryPart.Position) < 10 then
							if DB == false then
								DB = true
								local result, message = Remotes.EggOpened:InvokeServer(nearestEgg.Name, "Auto")
								if result ~= "Error" then
									if Player.Gamepasses["Triple Hatch"].Value == true then
										TripleHatch(result, nearestEgg.Name)
										task.wait(0.3)
										DB = false
									else
										SingleHatch(result, nearestEgg.Name)
										task.wait(0.3)
										DB = false
									end
								elseif message ~= nil then
									Notification.Notify(message.."!", Color3.fromRGB(255, 84, 84), 5)
									Notification.Notify("Auto Hatch is now Disabled!", Color3.fromRGB(255, 84, 84), 5)
									isAutoHatching = false
									break
								end
							end
						else
							isAutoHatching = false
							break
						end
					end
				end
			end
		end
	end)

	Button_S.MouseButton1Click:Connect(function()
		FrameTrigger.OpenFrame("Auto Delete")
	end)
end

i have been trying this for 2 days… and now when i posted it i fixed it… i couldnt have the same pets in 2 eggs

That’s really life when scripting :joy:

Mark something as solution if it’s fixed.