for priority, priorityName in ipairs(FarmFocusList) do 
			if priorityName == "Fruits" and coinIsFruit then
				mainCoin.priority = priorityName 
				coinPriority = priority
				break
			elseif priorityName == "Highest Multiplier" and coinHighestMultiplier then
				mainCoin.priority = priorityName
				coinPriority = priority
				break
			elseif priorityName == "Diamonds" and coinIsDiamond then
				mainCoin.priority = priorityName
				coinPriority = priority
				break
			elseif priorityName == "Lowest Life" and coin.health < coinCompare.health then
				mainCoin.priority = priorityName 
				coinPriority = priority
				break
			elseif priorityName == "Highest Life" and coin.health > coinCompare.health then
				mainCoin.priority = priorityName 
				coinPriority = priority
				break
			elseif priorityName == "Nearest" and aMagnitude < bMagnitude then
				mainCoin.priority = priorityName
				coinPriority = priority
				break
			elseif priorityName == "Longest" and aMagnitude > bMagnitude then
				mainCoin.priority = priorityName
				coinPriority = priority
				break
			elseif priorityName == "Easter Coins" and coinIsEaster then
				mainCoin.priority = priorityName
				coinPriority = priority
				break
			end
end

return coinPriority
	end
	
	local petsCurrentlyFarming = {}
	

	coroutine.wrap(function()
		while true do 
				if enableAutoFarm and not ScriptIsCurrentlyBusy then 
					CoinsTable = debug.getupvalue(getsenv(LocalPlayer.PlayerScripts.Scripts.Game.Coins).DestroyAllCoins, 1)
					RenderedPets = debug.getupvalue(getsenv(LocalPlayer.PlayerScripts.Scripts.Game.Pets).NetworkUpdate, 1)
					
					if AutoFarm_FastMode then 

						local foundCoins = SortCoinsByPriorityFastMode(CoinsTable)
						local equippedPets = Library.PetCmds.GetEquipped()
						if equippedPets and #equippedPets > 0 and #foundCoins > 0 then
							for _, pet in pairs(equippedPets) do
								local selectedCoin = foundCoins[1]
								task.spawn(function()
									Library.Network.Invoke("Join Coin", selectedCoin.coinId, {pet.uid}) 
									Library.Network.Fire("Farm Coin", selectedCoin.coinId, pet.uid)
									
								end)
								
								table.remove(foundCoins, 1)
								task.wait(AutoFarm_FarmSpeed)
							end
						end
					else
						local equippedPets = Library.PetCmds.GetEquipped()
						local foundCoins = {}

						for _, ch in ipairs(SortCoinsByPriority(WorldCoins:GetChildren())) do
							local containsMyPet = false
							local coin = CoinsTable[ch.Name]
							local coinMesh = ch:FindFirstChild("Coin")
							local mag = (HumanoidRootPart.Position - coinMesh.Position).magnitude	
			
							for _, pet in pairs(equippedPets) do
								if coin and coin.pets and table.find(coin.pets, pet.uid) then 
									containsMyPet = true
									break
								end
							end
							
							if not containsMyPet and mag <= math.max(math.min(farmMaxDistance, Library.Settings.CoinGrabDistance), 10) and Library.WorldCmds.HasArea(ch:GetAttribute("Area")) then
								table.insert(foundCoins, ch)
							end
						end
						
						
						for i, pet in pairs(RenderedPets) do 
							if ScriptIsCurrentlyBusy or not enableAutoFarm or #foundCoins <= 0 then break end
							if pet.spawned.owner == LocalPlayer and not pet.farming then
								local coin = foundCoins[1]
								if coin then 
									if not coin:FindFirstChild("Pets") then
										local petsFolder = Instance.new("Folder")
										petsFolder.Name = "Pets"
										petsFolder.Parent = coin
									end
									
									-- Legit Mode
									Library.Signal.Fire("Select Coin", coin, pet)

									table.remove(foundCoins, 1)
									wait(AutoFarm_FarmSpeed)
								end

							end
							
						end
					end
				end
			wait(0.1)
		end	
	end)()

function IsEggUnlocked(eggId)
		local egg = Library.Directory.Eggs[eggId]
		local saveData = Library.Save.Get()
		if egg.areaRequired then
			if not Library.WorldCmds.HasArea(egg.area) then
				return false
			end
		end
		
		if egg.eggRequired ~= "" then
			if egg.eggRequired ~= eggId then
				if not IsEggUnlocked(egg.eggRequired) then
					return false
				end
			end
		end
		
		if egg.eggRequiredOpenAmount > 0 then
			if egg.eggRequired ~= "" then
				local eggsHatched = (IsHardcore and saveData.Hardcore.EggsOpened or saveData.EggsOpened)[egg.eggRequired]
				if eggsHatched then
					if eggsHatched < egg.eggRequiredOpenAmount then
						return false
					end
				else
					return false
				end
			end
		end
		
		if eggId == "Dominus Egg" then	
			if IsHardcore and not saveData.Hardcore.OwnsDominusGate then return false end
			if not IsHardcore and not saveData.OwnsDominusGate then return false end
		elseif eggId == "Hacker Egg" or eggId == "Hacker Golden Egg" then
			if IsHardcore and not saveData.Hardcore.OwnsHackerGate then return false end
			if not IsHardcore and not saveData.OwnsHackerGate then return false end
		end
		
		return true
	end
	
	function HatchEgg(eggId, tripleHatch, octupleHatch, teleportToEgg) 
		if ScriptIsCurrentlyBusy then return false, "Script is currently busy!" end
		
		if not eggId or eggId == "None" then return false, "No egg provided!" end
		local eggToHatch = Library.Directory.Eggs[eggId]
		if not eggToHatch then return false, "Didn't found this egg!" end
		
		if tripleHatch == nil then tripleHatch = false end	
		if octupleHatch == nil then  octupleHatch = false end
		
		if not eggToHatch.hatchable or eggToHatch.disabled then return false, "This is egg is not available!" end
		if not IsEggUnlocked(eggId) then return false, "This egg is not unlocked yet!" end
		
		local eggArea = Library.Directory.Areas[eggToHatch.area]
		if eggArea then
			if teleportToEgg and Library.WorldCmds.Get() ~= eggArea.world then 
				Library.WorldCmds.Load(eggArea.world)
				wait(0.25)
			elseif not teleportToEgg and Library.WorldCmds.Get() ~= eggArea.world then return false, "You're not in the right world!" end
			
			local mapEgg = nil
			
			for i,v in pairs(Library.WorldCmds.GetAllEggs()) do 
				if v:GetAttribute("ID") and v:GetAttribute("ID") == eggId then 
					mapEgg = v
					break
				end
			end
			
			if not mapEgg then return false, "Didn't found the egg in map!" end
			
			local isNearEgg = Library.LocalPlayer:DistanceFromCharacter(mapEgg.PrimaryPart.CFrame.p) <= 30
			
			if teleportToEgg and not isNearEgg then 
				HumanoidRootPart.CFrame = CFrame.new(mapEgg.PrimaryPart.CFrame.p) + (mapEgg.PrimaryPart.CFrame.RightVector * 10)
				wait(0.25)
			elseif not teleportToEgg and not isNearEgg then return false, "You're too far from the egg!" end
		end

		return Library.Network.Invoke("Buy Egg", eggId, tripleHatch, octupleHatch)
	end
	
	-- local easterEventTab = Window:CreateTab("Easter Event", "13075572975", true)
	-- local easterEventSection = easterEventTab:CreateSection("Easter Event", true)
	-- easterEventTab:CreateButton({
		-- Name = "Teleport to Easter Isle",
		-- Callback = function()
			-- if Library.WorldCmds.Get() ~= "Spawn" then 
				-- if not Library.WorldCmds.Load("Spawn") then return end
			-- end
			-- wait(0.25)
			
			-- local areaTeleport = Library.WorldCmds.GetMap().Teleports:FindFirstChild("Easter")
			-- if areaTeleport then 
				-- Character:PivotTo(areaTeleport.CFrame + areaTeleport.CFrame.UpVector * (Humanoid.HipHeight + HumanoidRootPart.Size.Y / 2))
			-- end	
		-- end
	-- })
	
	-- local Easter_AutoEggHunt = false
	-- local isEggHuntHappening = false
	-- local eggHuntTimeSeed = 0
	-- local lastEggHuntSeed = 0
	
	-- task.spawn(function() 
		-- task.wait(1)
		-- local checkEggHuntSeed = Library.Network.Invoke("Easter Egg Hunt: Get Time Seed")
		-- if checkEggHuntSeed and checkEggHuntSeed and checkEggHuntSeed > 0 and os.time() >= checkEggHuntSeed and os.time() < checkEggHuntSeed + (60 * 60) then 
			-- isEggHuntHappening = true
			-- eggHuntTimeSeed = checkEggHuntSeed
			-- lastEggHuntSeed = 0
		-- end
	-- end)

-- local easterEventAutoEggHunt = easterEventTab:CreateToggle({
		-- Name = "Auto Egg Hunt",
		-- CurrentValue = false,
		-- Flag = "Easter_AutoEggHunt",
		-- Callback = function(value) 
			-- Easter_AutoEggHunt = value
			-- lastEggHuntSeed = 0
			
			-- if not value then return end
			
			-- local checkEggHuntSeed = Library.Network.Invoke("Easter Egg Hunt: Get Time Seed")
			-- if checkEggHuntSeed and checkEggHuntSeed and checkEggHuntSeed > 0 and os.time() >= checkEggHuntSeed and os.time() < checkEggHuntSeed + (60 * 60) then 
				-- isEggHuntHappening = true
				-- eggHuntTimeSeed = checkEggHuntSeed
				-- lastEggHuntSeed = 0
			-- end
			
			-- wait()
			-- task.spawn(function() 
				-- while Easter_AutoEggHunt do
					-- local saveData = Library.Save.Get()
					-- if isEggHuntHappening and eggHuntTimeSeed > 0 and lastEggHuntSeed == 0 then
						-- if not (saveData and saveData.Easter2023.FoundEggs and saveData.Easter2023.FoundEggs[tostring(eggHuntTimeSeed)] and #saveData.Easter2023.FoundEggs[tostring(eggHuntTimeSeed)] >= 100) then		
							-- if ScriptIsCurrentlyBusy then 
								-- while ScriptIsCurrentlyBusy do wait() end
								-- ScriptIsCurrentlyBusy = true
								-- wait(1)
							-- end
							
							-- ScriptIsCurrentlyBusy = true
							-- CurrentWorld = Library.WorldCmds.Get()		
							-- CurrentPosition = HumanoidRootPart.CFrame
			
							-- for i, world in ipairs(AllGameWorlds) do
								-- if not Easter_AutoEggHunt then break end
								-- if not world.requiredArea or Library.WorldCmds.HasArea(world.requiredArea) then
									
									-- if Library.WorldCmds.Get() ~= world.name then
										-- Library.WorldCmds.Load(world.name)
									-- end
									
									-- for i,v in pairs(Library.WorldCmds.GetMap():WaitForChild("EasterEggs"):GetChildren()) do
										-- if not Easter_AutoEggHunt then break end
										-- if v:GetAttribute("Enabled") then	
											-- task.spawn(function()
												-- local success, errorMessage = Library.Network.Invoke("Easter Egg Hunt: Claim", v.Name, (v:GetAttribute("TextureIDX")))
												-- if not success then print(errorMessage) end
											-- end)
											-- wait(0.05)
										-- end
										
									-- end
								-- end
							-- end
							
							-- wait(5)
							-- TeleportBack()
							-- wait(1)
							-- ScriptIsCurrentlyBusy = false
						-- end
						-- lastEggHuntSeed = eggHuntTimeSeed
					-- end
					
					-- wait(5)
				-- end
			-- end)
		-- end
	-- })
	
	
	-- Library.Network.Fired("Easter Egg Hunt: End"):Connect(function()
		-- isEggHuntHappening = false
		-- eggHuntTimeSeed = 0
		-- lastEggHuntSeed = 0
	-- end)
	
	-- Library.Network.Fired("Easter Egg Hunt: Start"):Connect(function(eggHuntData)
		-- isEggHuntHappening = true
		-- eggHuntTimeSeed = Library.Network.Invoke("Easter Egg Hunt: Get Time Seed")
		-- lastEggHuntSeed = 0
	-- end)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: