local a=game:GetService("Players")local b=game:GetService("TweenService")local c=game:GetService("UserInputService")local d=a.LocalPlayer local e="https://direct-link.net/1381140/BVK5NBe8Epca" local f=Instance.new("ScreenGui")f.Name="KeySystemUI"f.ResetOnSpawn=false f.Parent=d:WaitForChild("PlayerGui") local g=Instance.new("Frame")g.Size=UDim2.new(0,300,0,150)g.Position=UDim2.new(0.5,-150,0.5,-75)g.BackgroundColor3=Color3.fromRGB(40,40,40)g.Active=true g.Parent=f local h=Instance.new("UICorner",g)h.CornerRadius=UDim.new(0,10) local i=Instance.new("TextBox")i.Size=UDim2.new(0.8,0,0,40)i.Position=UDim2.new(0.1,0,0.2,0)i.PlaceholderText="Enter Key"i.Font=Enum.Font.Gotham i.TextSize=18 i.TextColor3=Color3.new(1,1,1) i.BackgroundColor3=Color3.fromRGB(60,60,60) i.Parent=g local j=Instance.new("UICorner",i)j.CornerRadius=UDim.new(0,8) local k=Instance.new("TextButton")k.Size=UDim2.new(0.8,0,0,40)k.Position=UDim2.new(0.1,0,0.5,0)k.Text="Get Key"k.Font=Enum.Font.GothamBold k.TextSize=18 k.TextColor3=Color3.new(1,1,1) k.BackgroundColor3=Color3.fromRGB(0,170,255) k.Parent=g local l=Instance.new("UICorner",k)l.CornerRadius=UDim.new(0,8) k.MouseButton1Click:Connect(function() if setclipboard then setclipboard(e) end end) local m=Instance.new("TextButton")m.Size=UDim2.new(0.8,0,0,40)m.Position=UDim2.new(0.1,0,0.75,0)m.Text="Submit"m.Font=Enum.Font.GothamBold m.TextSize=18 m.TextColor3=Color3.new(1,1,1) m.BackgroundColor3=Color3.fromRGB(0,200,120) m.Parent=g local n=Instance.new("UICorner",m)n.CornerRadius=UDim.new(0,8) m.MouseButton1Click:Connect(function() if i.Text=="user" then f:Destroy() local p=a.LocalPlayer local q=p:WaitForChild("PlayerGui"):FindFirstChild("AutofarmUI") if q then q:Destroy() end local r=Instance.new("ScreenGui") r.Name="AutofarmUI" r.ResetOnSpawn=false r.Parent=p:WaitForChild("PlayerGui") r.Enabled=true local s=Instance.new("Frame") s.Size=UDim2.new(0,480,0,200) s.Position=UDim2.new(0.5,-240,0.1,0) s.BackgroundColor3=Color3.fromRGB(28,28,30) s.BorderSizePixel=0 s.Active=true s.Parent=r local t=Instance.new("UICorner",s) t.CornerRadius=UDim.new(0,14) local u=Instance.new("UIStroke",s) u.Thickness=1.5 u.Color=Color3.fromRGB(70,70,80) u.ApplyStrokeMode=Enum.ApplyStrokeMode.Border local v=Instance.new("ImageLabel") v.Name="Shadow" v.BackgroundTransparency=1 v.AnchorPoint=Vector2.new(0.5,0.5) v.Position=UDim2.new(0.5,0,0.5,6) v.Size=UDim2.new(1,40,1,40) v.Image="rbxassetid://1316045217" v.ImageTransparency=0.45 v.ZIndex=-1 v.Parent=s local w=Instance.new("TextButton") w.Size=UDim2.new(0,32,0,32) w.Position=UDim2.new(1,-38,0,6) w.Text="❌" w.Font=Enum.Font.GothamBold w.TextSize=18 w.TextColor3=Color3.fromRGB(255,255,255) w.BackgroundColor3=Color3.fromRGB(200,60,60) w.AutoButtonColor=false w.Parent=s local x=Instance.new("UICorner",w) x.CornerRadius=UDim.new(0,8) local y=Instance.new("TextLabel") y.BackgroundTransparency=1 y.Position=UDim2.new(0,16,0,8) y.Size=UDim2.new(1,-64,0,28) y.Font=Enum.Font.GothamSemibold y.Text="Autofarm" y.TextXAlignment=Enum.TextXAlignment.Left y.TextColor3=Color3.fromRGB(235,235,245) y.TextSize=20 y.Parent=s local z=Instance.new("TextButton") z.Size=UDim2.new(1,-32,1,-64) z.Position=UDim2.new(0,16,0,48) z.Font=Enum.Font.GothamBold z.TextSize=26 z.TextColor3=Color3.new(1,1,1) z.AutoButtonColor=false z.Text="AutoFarm (OFF)" z.BackgroundColor3=Color3.fromRGB(0,170,255) z.Parent=s local A=Instance.new("UICorner",z) A.CornerRadius=UDim.new(0,12) local B=Instance.new("UIStroke",z) B.Thickness=1.5 B.Color=Color3.fromRGB(50,110,160) local C,D,E,F s.InputBegan:Connect(function(g) if g.UserInputType==Enum.UserInputType.MouseButton1 or g.UserInputType==Enum.UserInputType.Touch then C=true D=g.Position E=s.Position g.Changed:Connect(function() if g.UserInputState==Enum.UserInputState.End then C=false end end) end end) s.InputChanged:Connect(function(g) if g.UserInputType==Enum.UserInputType.MouseMovement or g.UserInputType==Enum.UserInputType.Touch then F=g end end) c.InputChanged:Connect(function(g) if g==F and C then local h=g.Position-D s.Position=UDim2.new(E.X.Scale,E.X.Offset+h.X,E.Y.Scale,E.Y.Offset+h.Y) end end) w.MouseButton1Click:Connect(function() r.Enabled=false end) local G=0 c.InputBegan:Connect(function(g,H) if H then return end if g.KeyCode==Enum.KeyCode.G then local I=tick() if I-G<0.15 then return end G=I r.Enabled=not r.Enabled end end) local J=false local K=0 local function L(M) local N=M and Color3.fromRGB(0,200,120) or Color3.fromRGB(0,170,255) local O=M and Color3.fromRGB(40,150,100) or Color3.fromRGB(50,110,160) z.Text=M and "AutoFarm (ON)" or "AutoFarm (OFF)" b:Create(z,TweenInfo.new(0.2,Enum.EasingStyle.Quad,Enum.EasingDirection.Out),{BackgroundColor3=N}):Play() B.Color=O end local function P() if J then return end J=true local Q=K task.spawn(function() while J and Q==K do local R=d.Character or d.CharacterAdded:Wait() local S=R:FindFirstChild("HumanoidRootPart") if not S then task.wait(0.2) else for T=1,100 do if not J or Q~=K then break end local U=workspace:FindFirstChild("WorldMap") local V=U and U:FindFirstChild("Checkpoints") local W=V and V:FindFirstChild(tostring(T)) if W and W:FindFirstChild("Pole") and S.Parent then S.CFrame=W.Pole.CFrame+Vector3.new(0,5,0) end task.wait(0.5) end end task.wait(0.1) end end) end local function X() if not J then return end J=false end z.MouseButton1Click:Connect(function() if J then X() L(false) else P() L(true) end end) r.Destroying:Connect(function() X() end) L(false) else i.Text="" i.PlaceholderText="❌ Wrong key!" end end)