[[
local Players=game:GetService("Players")
local RS=game:GetService("ReplicatedStorage")
local TS=game:GetService("TweenService")
local UIS=game:GetService("UserInputService")
local VIM=game:GetService("VirtualInputManager")
local lp=Players.LocalPlayer
local pg=lp:WaitForChild("PlayerGui")
local farming,guiOn=false,true
local lastClick,lastSell,lastCache=0,0,0
local target,zoneCenter,rockList=nil,nil,{}
local ZONE=48
local ACCENT=Color3.fromRGB(255,145,45)
local BG=Color3.fromRGB(14,10,8)
local CARD=Color3.fromRGB(24,16,12)
local TEXT=Color3.fromRGB(255,236,210)
local DIM=Color3.fromRGB(160,120,90)
local function tw(o,p,t)TS:Create(o,TweenInfo.new(t or 0.15,Enum.EasingStyle.Quint,Enum.EasingDirection.Out),p):Play()end
local function hrp()local c=lp.Character return c and c:FindFirstChild("HumanoidRootPart")end
local function hum()local c=lp.Character return c and c:FindFirstChildOfClass("Humanoid")end
local function inZone(pos)if not zoneCenter or not pos then return false end return (pos-zoneCenter).Magnitude<=ZONE end
local function partOf(obj)if obj:IsA("BasePart")then return obj end if obj:IsA("Model")then return obj.PrimaryPart or obj:FindFirstChildWhichIsA("BasePart",true)end return nil end
local function rebuild()
rockList={}
if not zoneCenter then return end
for _,obj in ipairs(workspace:GetDescendants())do
local n=obj.Name local ok=false
if typeof(n)=="string"then local low=n:lower() if low:find("rockspawn")or(low:find("rock")and not low:find("bedrock"))then ok=true end end
if not ok and obj:IsA("Model")then if obj:FindFirstChildWhichIsA("BillboardGui",true)then ok=true end end
if ok then local p=partOf(obj) if p and p.Parent and p.Transparency<0.85 and p.Size.Magnitude<50 and inZone(p.Position)then table.insert(rockList,{part=p,model=obj})end end
end
end
local function nearest()
local root=hrp() if not root then return nil end
local best,bestD=nil,ZONE+1
for i=#rockList,1,-1 do
local e=rockList[i]
if not e.part or not e.part.Parent or e.part.Transparency>=0.85 or not inZone(e.part.Position)then table.remove(rockList,i)
else local d=(e.part.Position-root.Position).Magnitude if d<bestD then bestD=d best=e end end
end
return best
end
local function alive(t)return t and t.part and t.part.Parent and t.part.Transparency<0.85 and inZone(t.part.Position)end
local function walkTo(pos)if not inZone(pos)then return end local h=hum() if h then pcall(function()h:MoveTo(pos)end)end end
local function equip()
local c=lp.Character if not c then return end local h=hum()
local tool=c:FindFirstChildOfClass("Tool") if tool then return tool end
tool=lp.Backpack:FindFirstChildOfClass("Tool") if tool and h then pcall(function()h:EquipTool(tool)end)return tool end
end
local function hit(t)
if not alive(t)then return end local p,m=t.part,t.model
local tool=equip() if tool then pcall(function()tool:Activate()end)end
for _,name in ipairs({"Mine","Hit","Swing","BreakRock","Click"})do
local r=RS:FindFirstChild(name,true) if r and r:IsA("RemoteEvent")then pcall(function()r:FireServer(m)end)end
end
pcall(function()
local cam=workspace.CurrentCamera if not cam then return end
local sp,on=cam:WorldToViewportPoint(p.Position)
if on and sp.Z>0 then VIM:SendMouseButtonEvent(sp.X,sp.Y,0,true,game,1)VIM:SendMouseButtonEvent(sp.X,sp.Y,0,false,game,1)end
end)
end
local function sell()
for _,name in ipairs({"Sell","SellAll"})do local r=RS:FindFirstChild(name,true) if r and r:IsA("RemoteEvent")then pcall(function()r:FireServer()end)end end
end
local sg=Instance.new("ScreenGui")sg.Name="VexoronFarm2"sg.ResetOnSpawn=false sg.ZIndexBehavior=Enum.ZIndexBehavior.Sibling sg.Parent=pg
local main=Instance.new("Frame")main.Size=UDim2.fromOffset(250,150)main.Position=UDim2.fromOffset(40,120)main.BackgroundColor3=BG main.BorderSizePixel=0 main.Active=true main.Draggable=true main.Parent=sg
Instance.new("UICorner",main).CornerRadius=UDim.new(0,16)
local stroke=Instance.new("UIStroke",main)stroke.Color=ACCENT stroke.Thickness=1.2 stroke.Transparency=0.25
local glow=Instance.new("Frame")glow.Size=UDim2.new(1,0,0,3)glow.BackgroundColor3=ACCENT glow.BorderSizePixel=0 glow.Parent=main
local title=Instance.new("TextLabel")title.Size=UDim2.new(1,-48,0,22)title.Position=UDim2.fromOffset(14,12)title.BackgroundTransparency=1 title.Text="Vexoron"title.Font=Enum.Font.GothamBold title.TextSize=15 title.TextXAlignment=Enum.TextXAlignment.Left title.TextColor3=ACCENT title.Parent=main
local xbtn=Instance.new("TextButton")xbtn.Size=UDim2.fromOffset(26,26)xbtn.Position=UDim2.new(1,-34,0,10)xbtn.BackgroundColor3=CARD xbtn.Text="×"xbtn.Font=Enum.Font.GothamBold xbtn.TextSize=14 xbtn.TextColor3=DIM xbtn.Parent=main
Instance.new("UICorner",xbtn).CornerRadius=UDim.new(0,8)
xbtn.MouseButton1Click:Connect(function()guiOn=not guiOn main.Visible=guiOn end)
local status=Instance.new("TextLabel")status.Size=UDim2.new(1,-28,0,16)status.Position=UDim2.fromOffset(14,40)status.BackgroundTransparency=1 status.Text="Stand in rocks → enable"status.Font=Enum.Font.Gotham status.TextSize=11 status.TextXAlignment=Enum.TextXAlignment.Left status.TextColor3=DIM status.Parent=main
local info=Instance.new("TextLabel")info.Size=UDim2.new(1,-28,0,14)info.Position=UDim2.fromOffset(14,56)info.BackgroundTransparency=1 info.Text="Zone locked when you start"info.Font=Enum.Font.Gotham info.TextSize=10 info.TextXAlignment=Enum.TextXAlignment.Left info.TextColor3=ACCENT info.Parent=main
local row=Instance.new("Frame")row.Size=UDim2.new(1,-28,0,36)row.Position=UDim2.fromOffset(14,80)row.BackgroundColor3=CARD row.BorderSizePixel=0 row.Parent=main
Instance.new("UICorner",row).CornerRadius=UDim.new(0,10)
local farmLab=Instance.new("TextLabel")farmLab.Size=UDim2.new(1,-56,1,0)farmLab.Position=UDim2.fromOffset(12,0)farmLab.BackgroundTransparency=1 farmLab.Text="Auto Farm"farmLab.Font=Enum.Font.GothamBold farmLab.TextSize=13 farmLab.TextXAlignment=Enum.TextXAlignment.Left farmLab.TextColor3=TEXT farmLab.Parent=row
local track=Instance.new("Frame")track.Size=UDim2.fromOffset(42,22)track.Position=UDim2.new(1,-52,0.5,-11)track.BackgroundColor3=Color3.fromRGB(40,28,20)track.Parent=row
Instance.new("UICorner",track).CornerRadius=UDim.new(1,0)
local knob=Instance.new("Frame")knob.Size=UDim2.fromOffset(18,18)knob.Position=UDim2.fromOffset(2,2)knob.BackgroundColor3=Color3.fromRGB(255,230,200)knob.Parent=track
Instance.new("UICorner",knob).CornerRadius=UDim.new(1,0)
local farmBtn=Instance.new("TextButton")farmBtn.Size=UDim2.fromScale(1,1)farmBtn.BackgroundTransparency=1 farmBtn.Text=""farmBtn.Parent=track
farmBtn.MouseButton1Click:Connect(function()
farming=not farming
tw(track,{BackgroundColor3=farming and ACCENT or Color3.fromRGB(40,28,20)})
tw(knob,{Position=farming and UDim2.new(1,-20,0.5,-9)or UDim2.fromOffset(2,2)})
if farming then
local root=hrp()
if root then zoneCenter=root.Position rebuild() info.Text="Locked · "..#rockList.." rocks · "..ZONE.." studs" status.Text=#rockList>0 and "Farming this zone"or"No rocks — stand closer"end
else
target=nil zoneCenter=nil rockList={}
local h=hum() if h and hrp()then pcall(function()h:MoveTo(hrp().Position)end)end
status.Text="Idle" info.Text="Zone locked when you start"
end
end)
local hint=Instance.new("TextLabel")hint.Size=UDim2.new(1,-28,0,14)hint.Position=UDim2.fromOffset(14,124)hint.BackgroundTransparency=1 hint.Text="only this zone · walks · RightShift hide"hint.Font=Enum.Font.Gotham hint.TextSize=10 hint.TextXAlignment=Enum.TextXAlignment.Left hint.TextColor3=DIM hint.Parent=main
UIS.InputBegan:Connect(function(inp,g)if g then return end if inp.KeyCode==Enum.KeyCode.RightShift then guiOn=not guiOn main.Visible=guiOn end end)
task.spawn(function()
while true do
local now=tick()
if farming and zoneCenter then
if now-lastCache>2.5 then rebuild() lastCache=now info.Text="Locked · "..#rockList.." rocks · "..ZONE.." studs"end
if not alive(target)then
target=nearest()
if target then walkTo(target.part.Position) status.Text="Walk → "..tostring(target.model.Name):sub(1,12)
else status.Text="No rocks in lock"end
else
local root=hrp()
if root then
local d=(target.part.Position-root.Position).Magnitude
if d>11 then
if now-lastClick>0.6 then walkTo(target.part.Position) lastClick=now end
status.Text="Walk · "..math.floor(d)
else
if now-lastClick>0.05 then hit(target) lastClick=now status.Text="Mine · "..tostring(target.model.Name):sub(1,12)end
end
end
end
if now-lastSell>10 then sell() lastSell=now end
end
task.wait(0.08)
end
end)
]]