local P,T,R,U=game:GetService("Players"),game:GetService("TweenService"),game:GetService("RunService"),game:GetService("UserInputService") local LP,G=P.LocalPlayer,(gethui and gethui())or game:GetService("CoreGui")or LP:WaitForChild("PlayerGui") if G:FindFirstChild("BHAFK")then G.BHAFK:Destroy()end local S=Instance.new("ScreenGui",G)S.Name="BHAFK"S.ResetOnSpawn=false local function sfx(id)local s=Instance.new("Sound",S)s.SoundId="rbxassetid://"..id s.Volume=.6 return s end local cS,onS,offS=sfx(6895079853),sfx(4590662766),sfx(4590657391) local th=P:GetUserThumbnailAsync(LP.UserId,Enum.ThumbnailType.HeadShot,Enum.ThumbnailSize.Size150x150) local function ui(c,p,pr)local o=Instance.new(c,p)for k,v in pairs(pr)do o[k]=v end return o end local OFFSET=Vector3.new(-999,0,0) local Min=ui("TextButton",S,{Size=UDim2.new(0,42,0,42),Position=UDim2.new(.04,0,.22,0),BackgroundColor3=Color3.fromRGB(12,12,15),BackgroundTransparency=.25,Text="—",TextColor3=Color3.fromRGB(245,245,250),Font=Enum.Font.GothamBold,TextSize=18}) ui("UICorner",Min,{CornerRadius=UDim.new(1,0)})ui("UIStroke",Min,{Color=Color3.new(1,1,1),Transparency=.65,Thickness=1.5}) local M=ui("Frame",S,{Size=UDim2.new(0,285,0,165),Position=UDim2.new(.5,-142,.25,0),BackgroundColor3=Color3.fromRGB(12,12,15),BackgroundTransparency=.32,ClipsDescendants=true}) local sc=ui("UIScale",M,{Scale=0})T:Create(sc,TweenInfo.new(.3,Enum.EasingStyle.Back),{Scale=1}):Play() ui("UICorner",M,{CornerRadius=UDim.new(0,14)})ui("UIStroke",M,{Color=Color3.new(1,1,1),Transparency=.75,Thickness=1.5}) ui("UIGradient",M,{Color=ColorSequence.new(Color3.fromRGB(45,45,52),Color3.fromRGB(8,8,10)),Rotation=135}) ui("TextLabel",M,{Size=UDim2.new(1,-46,0,22),Position=UDim2.new(0,10,0,6),BackgroundTransparency=1,Text="BUILD AND HIDE TO SURVIVE AFK FARM",TextColor3=Color3.fromRGB(245,245,250),Font=Enum.Font.GothamBold,TextScaled=true,TextXAlignment=0}) ui("TextLabel",M,{Size=UDim2.new(1,-46,0,14),Position=UDim2.new(0,10,0,28),BackgroundTransparency=1,Text="MADE BY N0NE",TextColor3=Color3.fromRGB(150,155,165),Font=Enum.Font.GothamSemibold,TextSize=10,TextXAlignment=0}) local Cl=ui("TextButton",M,{Size=UDim2.new(0,26,0,26),Position=UDim2.new(1,-34,0,8),BackgroundColor3=Color3.fromRGB(30,30,36),BackgroundTransparency=.2,Text="X",TextColor3=Color3.fromRGB(240,240,245),Font=Enum.Font.GothamBold,TextSize=13}) ui("UICorner",Cl,{CornerRadius=UDim.new(0,8)})ui("UIStroke",Cl,{Color=Color3.new(1,1,1),Transparency=.75,Thickness=1}) local WC=ui("Frame",M,{Size=UDim2.new(1,-20,0,42),Position=UDim2.new(0,10,0,48),BackgroundColor3=Color3.fromRGB(20,20,25),BackgroundTransparency=.35}) ui("UICorner",WC,{CornerRadius=UDim.new(0,10)})local ws=ui("UIStroke",WC,{Color=Color3.new(1,1,1),Transparency=.85,Thickness=1}) local Av1=ui("ImageLabel",WC,{Size=UDim2.new(0,32,0,32),Position=UDim2.new(0,6,.5,-16),BackgroundColor3=Color3.fromRGB(30,30,35),Image=th}) ui("UICorner",Av1,{CornerRadius=UDim.new(1,0)}) local WT=ui("TextLabel",WC,{Size=UDim2.new(1,-48,1,0),Position=UDim2.new(0,44,0,0),BackgroundTransparency=1,Text="WELCOME, "..LP.Name:upper(),TextColor3=Color3.fromRGB(235,240,248),Font=Enum.Font.GothamBold,TextScaled=true,TextXAlignment=0}) local B=ui("TextButton",M,{Size=UDim2.new(1,-20,0,52),Position=UDim2.new(0,10,0,98),BackgroundColor3=Color3.fromRGB(25,25,30),BackgroundTransparency=.25,Text="",AutoButtonColor=false}) ui("UICorner",B,{CornerRadius=UDim.new(0,10)})local bs=ui("UIStroke",B,{Color=Color3.new(1,1,1),Transparency=.8,Thickness=1.2}) local Av2=ui("ImageLabel",B,{Size=UDim2.new(0,34,0,34),Position=UDim2.new(0,8,.5,-17),BackgroundColor3=Color3.fromRGB(35,35,42),Image=th}) ui("UICorner",Av2,{CornerRadius=UDim.new(1,0)}) local BT=ui("TextLabel",B,{Size=UDim2.new(1,-95,0,22),Position=UDim2.new(0,48,0,6),BackgroundTransparency=1,Text="AFK FARM: OFF",TextColor3=Color3.fromRGB(220,225,235),Font=Enum.Font.GothamSemibold,TextSize=13,TextXAlignment=0}) local ST=ui("TextLabel",B,{Size=UDim2.new(1,-95,0,16),Position=UDim2.new(0,48,0,28),BackgroundTransparency=1,Text="IDLE",TextColor3=Color3.fromRGB(140,145,155),Font=Enum.Font.GothamBold,TextSize=11,TextXAlignment=0}) local Pill=ui("Frame",B,{Size=UDim2.new(0,34,0,18),Position=UDim2.new(1,-42,.5,-9),BackgroundColor3=Color3.fromRGB(18,18,22)}) ui("UICorner",Pill,{CornerRadius=UDim.new(1,0)})ui("UIStroke",Pill,{Color=Color3.new(1,1,1),Transparency=.82,Thickness=1}) local Knob=ui("Frame",Pill,{Size=UDim2.new(0,14,0,14),Position=UDim2.new(0,2,.5,-7),BackgroundColor3=Color3.fromRGB(150,155,165)}) ui("UICorner",Knob,{CornerRadius=UDim.new(1,0)}) task.delay(3.3,function()if WC and WC.Parent then for _,v in ipairs({{WC,{BackgroundTransparency=1}},{ws,{Transparency=1}},{Av1,{ImageTransparency=1,BackgroundTransparency=1}},{WT,{TextTransparency=1}},{B,{Position=UDim2.new(0,10,0,50)}},{M,{Size=UDim2.new(0,285,0,114)}}})do T:Create(v[1],TweenInfo.new(.35),v[2]):Play()end task.wait(.36)if WC then WC:Destroy()end end end) local on,con,gTw,cf,locked,min=false,nil,nil,nil,false,false local function sh(c,st)if not c then return end local h=c:FindFirstChildOfClass("Humanoid")if st then if not c:FindFirstChild("AFK_FF")then ui("ForceField",c,{Name="AFK_FF",Visible=false})end if h then h:SetStateEnabled(15,false)h.Health=h.MaxHealth end else local f=c:FindFirstChild("AFK_FF")if f then f:Destroy()end if h then h:SetStateEnabled(15,true)end end for _,v in ipairs(c:GetDescendants())do if v:IsA("BasePart")then v.CanTouch=not st v.CanCollide=not st if st then v.AssemblyLinearVelocity=Vector3.zero v.AssemblyAngularVelocity=Vector3.zero end end end end local function startGlide(c) local h=c and c:FindFirstChild("HumanoidRootPart")if not h then return end locked=false ST.Text="Gliding..."ST.TextColor3=Color3.fromRGB(255,210,90) sh(c,true)h.Anchored=true cf=cf or(h.CFrame+OFFSET) local dist=(h.Position-cf.Position).Magnitude local dur=math.clamp(dist/450,0.4,2.2) if gTw then gTw:Cancel()end gTw=T:Create(h,TweenInfo.new(dur,Enum.EasingStyle.Sine,Enum.EasingDirection.Out),{CFrame=cf}) gTw:Play() gTw.Completed:Connect(function(st) if on and st==Enum.PlaybackState.Completed then locked=true ST.Text="Locked"ST.TextColor3=Color3.fromRGB(110,245,160) end end) end LP.CharacterAdded:Connect(function(c)local h=c:WaitForChild("HumanoidRootPart",5)if on and h then task.wait(.1)startGlide(c)end end) B.Activated:Connect(function() on=not on cS:Play()local r=ui("Frame",B,{BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=.65,AnchorPoint=Vector2.new(.5,.5),Position=UDim2.new(.5,0,.5,0),Size=UDim2.new()})ui("UICorner",r,{CornerRadius=UDim.new(1,0)})local tw=T:Create(r,TweenInfo.new(.35),{Size=UDim2.new(1.2,0,2.4,0),BackgroundTransparency=1})tw:Play()tw.Completed:Connect(function()r:Destroy()end) local c=LP.Character local hrp=c and c:FindFirstChild("HumanoidRootPart") if on then onS:Play()BT.Text="AFK FARM: ON"T:Create(B,TweenInfo.new(.2),{BackgroundColor3=Color3.fromRGB(50,52,60),BackgroundTransparency=.15}):Play()T:Create(bs,TweenInfo.new(.2),{Transparency=.45}):Play()T:Create(Pill,TweenInfo.new(.2),{BackgroundColor3=Color3.fromRGB(235,240,245)}):Play()T:Create(Knob,TweenInfo.new(.2),{Position=UDim2.new(1,-16,.5,-7),BackgroundColor3=Color3.fromRGB(15,15,20)}):Play() if c then cf=nil startGlide(c)end if con then con:Disconnect()end con=R.Heartbeat:Connect(function()local ch=LP.Character local h=ch and ch:FindFirstChild("HumanoidRootPart")local hm=ch and ch:FindFirstChildOfClass("Humanoid")if on and h then h.Anchored=true h.AssemblyLinearVelocity=Vector3.zero if locked and cf then h.CFrame=cf end if hm and hm.Health0 then hrp.CFrame=t[math.random(1,#t)].Character.HumanoidRootPart.CFrame*CFrame.new(0,3,0)end end end end) Min.Activated:Connect(function()cS:Play()min=not min Min.Text=min and"+"or"—"if min then local tw=T:Create(sc,TweenInfo.new(.2,Enum.EasingStyle.Quad,Enum.EasingDirection.In),{Scale=0})tw:Play()tw.Completed:Connect(function()if min then M.Visible=false end end)else M.Visible=true T:Create(sc,TweenInfo.new(.25,Enum.EasingStyle.Back),{Scale=1}):Play()end end) Cl.Activated:Connect(function()cS:Play()on=false locked=false if gTw then gTw:Cancel()end if con then con:Disconnect()end if LP.Character then sh(LP.Character,false)local h=LP.Character:FindFirstChild("HumanoidRootPart")if h then h.Anchored=false end end local tw=T:Create(sc,TweenInfo.new(.22,Enum.EasingStyle.Back,Enum.EasingDirection.In),{Scale=0})tw:Play()tw.Completed:Connect(function()S:Destroy()end)end) for _,o in ipairs({M,Min})do local d,ds,sp o.InputBegan:Connect(function(i)if i.UserInputType==Enum.UserInputType.Touch or i.UserInputType==Enum.UserInputType.MouseButton1 then d=true ds=i.Position sp=o.Position i.Changed:Connect(function()if i.UserInputState==Enum.UserInputState.End then d=false end end)end end)U.InputChanged:Connect(function(i)if d and(i.UserInputType==Enum.UserInputType.Touch or i.UserInputType==Enum.UserInputType.MouseMovement)then local dl=i.Position-ds o.Position=UDim2.new(sp.X.Scale,sp.X.Offset+dl.X,sp.Y.Scale,sp.Y.Offset+dl.Y)end end)end