local Players = game:GetService("Players") local Workspace = game:GetService("Workspace") local UserInputService = game:GetService("UserInputService") local CoreGui = game:GetService("CoreGui") local player = Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local rootPart = character:WaitForChild("HumanoidRootPart") getgenv().AutoFarmGems = false local toggleKey = Enum.KeyCode.F -- Ekran Butonu local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "GemFarmGui" ScreenGui.Parent = CoreGui local TextButton = Instance.new("TextButton") TextButton.Name = "ToggleBtn" TextButton.Parent = ScreenGui TextButton.BackgroundColor3 = Color3.fromRGB(30, 30, 30) TextButton.Position = UDim2.new(0.05, 0, 0.1, 0) TextButton.Size = UDim2.new(0, 160, 0, 50) TextButton.Font = Enum.Font.SourceSansBold TextButton.Text = "Auto Farm: OFF" TextButton.TextColor3 = Color3.fromRGB(255, 50, 50) TextButton.TextSize = 18 TextButton.Active = true TextButton.Draggable = true local function updateUI() if getgenv().AutoFarmGems then TextButton.Text = "Auto Farm: ON" TextButton.TextColor3 = Color3.fromRGB(50, 255, 50) TextButton.BackgroundColor3 = Color3.fromRGB(40, 40, 40) else TextButton.Text = "Auto Farm: OFF" TextButton.TextColor3 = Color3.fromRGB(255, 50, 50) TextButton.BackgroundColor3 = Color3.fromRGB(30, 30, 30) end end local function toggleFarm() getgenv().AutoFarmGems = not getgenv().AutoFarmGems updateUI() end TextButton.MouseButton1Click:Connect(toggleFarm) UserInputService.InputBegan:Connect(function(input, gameProcessed) if not gameProcessed and input.KeyCode == toggleKey then toggleFarm() end end) -- Mikro Işınlanma (Anti-Kick ve Ekran Bug'ı Önleyici) local function microTeleport(targetCFrame) if not player.Character or not player.Character:FindFirstChild("HumanoidRootPart") then return end local currentRoot = player.Character.HumanoidRootPart local distance = (currentRoot.Position - targetCFrame.Position).Magnitude local steps = math.clamp(math.floor(distance / 15), 2, 20) for i = 1, steps do if not getgenv().AutoFarmGems then break end -- Karakter veya rootpart kaybolduysa döngüyü kır if not player.Character or not player.Character:FindFirstChild("HumanoidRootPart") then break end local alpha = i / steps currentRoot.CFrame = currentRoot.CFrame:Lerp(targetCFrame + Vector3.new(0, 3, 0), alpha) task.wait(0.02) end end local function getGemsFolder() return Workspace:FindFirstChild("Gems") end -- Sadece gerçekten var olan, görünür ve aktif gemleri filtreleyen fonksiyon local function getSortedGems() local gemsFolder = getGemsFolder() if not gemsFolder then return {} end if not player.Character or not player.Character:FindFirstChild("HumanoidRootPart") then return {} end local currentPos = player.Character.HumanoidRootPart.Position local gemList = {} for _, gem in ipairs(gemsFolder:GetChildren()) do if gem.Name == "Gem" then local targetPart = gem:IsA("Model") and gem.PrimaryPart or gem -- Parçanın var olup olmadığını, silinmediğini (Parent) ve Transparency değerini kontrol et (Görünmezse alma) if targetPart and targetPart:IsA("BasePart") and targetPart.Parent and targetPart.Transparency < 1 then local dist = (currentPos - targetPart.Position).Magnitude table.insert(gemList, {Instance = gem, Part = targetPart, Distance = dist}) end end end table.sort(gemList, function(a, b) return a.Distance < b.Distance end) return gemList end local function teleportToGems() local sortedGems = getSortedGems() if #sortedGems == 0 then return end for _, gemData in ipairs(sortedGems) do if not getgenv().AutoFarmGems then break end local targetPart = gemData.Part local gemInstance = gemData.Instance -- Gem hala oyunda duruyor mu ve yok olmadı mı? (Alındıysa parent'ı değişir veya silinir) if targetPart and targetPart.Parent and gemInstance and gemInstance.Parent and targetPart.Transparency < 1 then microTeleport(targetPart.CFrame) task.wait(0.15) end end end task.spawn(function() while true do if getgenv().AutoFarmGems then pcall(function() teleportToGems() end) else -- Kapalıyken sistemi yormamak için bekleme task.wait(1) end -- Ortamda gem bittiyse (1-2 dakika sonra yenilenene kadar) boşa döngüye sokup CPU/Ekranı kasmasın diye kısa bekleme task.wait(0.5) end end)