--BROUGHT TO YOU BY RobloxScripter.com!--
_G.enables = true -- to disable, change to false and re execute
local human = game.Workspace[game.Players.LocalPlayer.Name].Humanoid
local vu = game:GetService("VirtualUser")
game:GetService("Players").LocalPlayer.Idled:connect(
function()
vu:Button2Down(Vector2.new(0, 0), workspace.CurrentCamera.CFrame)
wait(1)
vu:Button2Up(Vector2.new(0, 0), workspace.CurrentCamera.CFrame)
end
)
local function MoveToPart(partName)
local serv = game:GetService("PathfindingService")
local body = game.Players.LocalPlayer.Character.Torso or game.Players.LocalPlayer.Character.HumanoidRootPart
local dest = partName
local path = serv:CreatePath()
path:ComputeAsync(body.Position, dest.Position)
print(path.Status)
if path.Status == Enum.PathStatus.Success then
local wayPoints = path:GetWaypoints()
for i = 1, #wayPoints do
local point = wayPoints[i]
human:MoveTo(point.Position)
local success = human.MoveToFinished:Wait()
if point.Action == Enum.PathWaypointAction.Jump then
-- human.WalkSpeed = 0
-- wait(0.2)
-- human.WalkSpeed = 16
human.Jump = true
end
if not success then
-- print("trying again")
--human.Jump = true
human:MoveTo(point.Position)
if not human.MoveToFinished:Wait() then
break
end
end
end
end
end
while _G.enables do
for i, v in pairs(game.workspace.GrassObjects:GetChildren()) do
if (game.workspace[game.Players.LocalPlayer.Name].Torso.Position - v.Position).Magnitude < 500 then
MoveToPart(v)
end
end
end