Run it
Copy the script and paste it into your executor.
CONFIG = {
CONTAINER = ,
MAX_INDEX = ,
USE_PHYSICS = ,
INFINITE = ,
SPEED = ,
FRONT_DISTANCE = ,
FRONT_DIST_MIN = ,
ARRIVE_EPS = ,
PHYS_EPS = ,
WAYPOINT_EPS = ,
APPROACH_TIMEOUT = ,
MIN_SPEED = ,
LOW_SPEED_TIME = ,
SPEED_SAMPLE = ,
SPACE_INTERVAL = ,
SPACE_HOLD = ,
RECOVERY_CYCLE = ,
RECOVERY_PAUSE = ,
RECOVERY_REPATH = ,
MIN_NORMAL_Y = ,
MAX_GROUND_DELTA = ,
PROBE_UP = ,
PROBE_DOWN = ,
PROBE_SIDE = ,
WAYPOINT_TIMEOUT = ,
STUCK_WINDOW = ,
STUCK_MIN_MOVE = ,
STUCK_RETRIES = ,
REPATH_DIST = ,
REPATH_COOLDOWN = ,
SETTLE_DELAY = ,
PRESS_COUNT = ,
PRESS_HOLD = ,
PRESS_INTERVAL = ,
NPC_COOLDOWN = ,
COOLDOWN = ,
COOLDOWN_PAD = ,
FAIL_COOLDOWN = ,
MAX_WAIT = ,
OFFSET_Y = ,
FRONT_MODE = ,
}
AGENT_PARAMS = {
AgentRadius = ,
AgentHeight = ,
AgentCanJump = ,
AgentJumpHeight = ,
AgentMaxSlope = ,
WaypointSpacing = ,
}
Players = :()
Workspace = :()
VIM = :()
UIS = :()
RunService = :()
TweenService = :()
Pathfinding = :()
CoreGui = :()
LP = Players.LocalPlayer
running =
dragging, dragStart, startPos = , ,
cooldowns = {}
activeContainer =
()
ok, hui = (()
gethui ()
)
ok hui hui
ok2, cg = (() CoreGui )
ok2 cg cg
LP:()
gui = .()
gui.Name =
gui.ResetOnSpawn =
gui.IgnoreGuiInset =
gui.ZIndexBehavior = .ZIndexBehavior.Sibling
gui.DisplayOrder =
gui.Parent = ()
(() .(gui) )
main = .()
main.Size = .(, , , )
main.Position = .(, , , )
main.BackgroundColor3 = .(, , )
main.BorderSizePixel =
main.Active =
main.Parent = gui
corner = .()
corner.CornerRadius = .(, )
corner.Parent = main
stroke = .()
stroke.Color = .(, , )
stroke.Thickness =
stroke.Parent = main
header = .()
header.Size = .(, , , )
header.BackgroundColor3 = .(, , )
header.BorderSizePixel =
header.Parent = main
headerCorner = .()
headerCorner.CornerRadius = .(, )
headerCorner.Parent = header
title = .()
title.Size = .(, -, , )
title.Position = .(, , , )
title.BackgroundTransparency =
title.Font = .Font.GothamBold
title.TextSize =
title.TextColor3 = .(, , )
title.TextXAlignment = .TextXAlignment.Left
title.Text =
title.Parent = header
status = .()
status.Size = .(, -, , )
status.Position = .(, , , )
status.BackgroundTransparency =
status.Font = .Font.Gotham
status.TextSize =
status.TextColor3 = .(, , )
status.TextXAlignment = .TextXAlignment.Left
status.Text =
status.Parent = main
progress = .()
progress.Size = .(, -, , )
progress.Position = .(, , , )
progress.BackgroundTransparency =
progress.Font = .Font.GothamMedium
progress.TextSize =
progress.TextColor3 = .(, , )
progress.TextXAlignment = .TextXAlignment.Left
progress.Text =
progress.Parent = main
speedLabel = .()
speedLabel.Size = .(, , , )
speedLabel.Position = .(, , , )
speedLabel.BackgroundTransparency =
speedLabel.Font = .Font.Gotham
speedLabel.TextSize =
speedLabel.TextColor3 = .(, , )
speedLabel.TextXAlignment = .TextXAlignment.Left
speedLabel.Text =
speedLabel.Parent = main
speedBox = .()
speedBox.Size = .(, , , )
speedBox.Position = .(, , , )
speedBox.BackgroundColor3 = .(, , )
speedBox.BorderSizePixel =
speedBox.Font = .Font.GothamMedium
speedBox.TextSize =
speedBox.TextColor3 = .(, , )
speedBox.Text = (CONFIG.SPEED)
speedBox.ClearTextOnFocus =
speedBox.Parent = main
sbCorner = .()
sbCorner.CornerRadius = .(, )
sbCorner.Parent = speedBox
speedHint = .()
speedHint.Size = .(, , , )
speedHint.Position = .(, , , )
speedHint.BackgroundTransparency =
speedHint.Font = .Font.Gotham
speedHint.TextSize =
speedHint.TextColor3 = .(, , )
speedHint.TextXAlignment = .TextXAlignment.Left
speedHint.Text =
speedHint.Parent = main
()
n = (speedBox.Text)
n
CONFIG.SPEED = .(n, , )
speedBox.Text = (CONFIG.SPEED)
speedBox.Text = (CONFIG.SPEED)
speedBox.FocusLost:(applySpeed)
frontBtn = .()
frontBtn.Size = .(, -, , )
frontBtn.Position = .(, , , )
frontBtn.BackgroundColor3 = .(, , )
frontBtn.BorderSizePixel =
frontBtn.AutoButtonColor =
frontBtn.Font = .Font.GothamMedium
frontBtn.TextSize =
frontBtn.TextColor3 = .(, , )
frontBtn.Text =
frontBtn.Parent = main
fbCorner = .()
fbCorner.CornerRadius = .(, )
fbCorner.Parent = frontBtn
()
CONFIG.FRONT_MODE ==
frontBtn.Text =
frontBtn.TextColor3 = .(, , )
frontBtn.Text =
frontBtn.TextColor3 = .(, , )
frontBtn.MouseButton1Click:(()
CONFIG.FRONT_MODE = (CONFIG.FRONT_MODE == )
()
)
moveBtn = .()
moveBtn.Size = .(, -, , )
moveBtn.Position = .(, , , )
moveBtn.BackgroundColor3 = .(, , )
moveBtn.BorderSizePixel =
moveBtn.AutoButtonColor =
moveBtn.Font = .Font.GothamMedium
moveBtn.TextSize =
moveBtn.TextColor3 = .(, , )
moveBtn.Text =
moveBtn.Parent = main
mbCorner = .()
mbCorner.CornerRadius = .(, )
mbCorner.Parent = moveBtn
()
CONFIG.USE_PHYSICS
moveBtn.Text =
moveBtn.TextColor3 = .(, , )
moveBtn.Text =
moveBtn.TextColor3 = .(, , )
moveBtn.MouseButton1Click:(()
CONFIG.USE_PHYSICS = CONFIG.USE_PHYSICS
()
)
loopBtn = .()
loopBtn.Size = .(, -, , )
loopBtn.Position = .(, , , )
loopBtn.BackgroundColor3 = .(, , )
loopBtn.BorderSizePixel =
loopBtn.AutoButtonColor =
loopBtn.Font = .Font.GothamMedium
loopBtn.TextSize =
loopBtn.TextColor3 = .(, , )
loopBtn.Text =
loopBtn.Parent = main
lbCorner = .()
lbCorner.CornerRadius = .(, )
lbCorner.Parent = loopBtn
()
CONFIG.INFINITE
loopBtn.Text =
loopBtn.TextColor3 = .(, , )
loopBtn.Text =
loopBtn.TextColor3 = .(, , )
loopBtn.MouseButton1Click:(()
CONFIG.INFINITE = CONFIG.INFINITE
()
)
button = .()
button.Size = .(, -, , )
button.Position = .(, , , -)
button.BackgroundColor3 = .(, , )
button.BorderSizePixel =
button.AutoButtonColor =
button.Font = .Font.GothamBold
button.TextSize =
button.TextColor3 = .(, , )
button.Text =
button.Parent = main
btnCorner = .()
btnCorner.CornerRadius = .(, )
btnCorner.Parent = button
header.InputBegan:((input)
input.UserInputType == .UserInputType.MouseButton1
input.UserInputType == .UserInputType.Touch
dragging =
dragStart = input.Position
startPos = main.Position
)
UIS.InputChanged:((input)
dragging
input.UserInputType == .UserInputType.MouseMovement
input.UserInputType == .UserInputType.Touch
delta = input.Position - dragStart
main.Position = .(
startPos.X.Scale, startPos.X.Offset + delta.X,
startPos.Y.Scale, startPos.Y.Offset + delta.Y
)
)
UIS.InputEnded:((input)
input.UserInputType == .UserInputType.MouseButton1
input.UserInputType == .UserInputType.Touch
dragging =
)
(txt, color)
status.Text = txt
color status.TextColor3 = color
(active)
active
button.Text =
button.BackgroundColor3 = .(, , )
button.Text =
button.BackgroundColor3 = .(, , )
()
direct = Workspace:(CONFIG.CONTAINER)
direct direct
_, d (Workspace:())
d.Name == CONFIG.CONTAINER d
(npc)
npc:() npc
hrp = npc:()
hrp hrp:() hrp
npc.PrimaryPart npc.PrimaryPart
_, d (npc:())
d:() d
(npc)
hum = npc:()
hum hum.Health <=
()
char = LP.Character
char char:()
()
char = LP.Character
char char:()
(npc)
until_ = cooldowns[npc]
until_
npc.Parent
cooldowns[npc] =
.() >= until_
cooldowns[npc] =
(npc, seconds)
cooldowns[npc] = .() + seconds
()
soonest = .huge
npc, until_ (cooldowns)
npc.Parent
left = until_ - .()
left < soonest soonest = left
cooldowns[npc] =
soonest == .huge
.(soonest, )
()
n =
npc (cooldowns)
npc.Parent (npc) n +=
n
(npc)
(npc) (npc) ~= (npc)
(container)
n =
_, obj (container:())
(obj) n +=
n
(container)
hrp = ()
hrp
myPos = hrp.Position
best, bestDist = , .huge
_, obj (container:())
(obj)
part = (obj)
part
d = (part.Position - myPos).Magnitude
d < bestDist
best, bestDist = obj, d
best, bestDist
(npc)
_, d (npc:())
d:()
(()
d.MaxActivationDistance = .(d.MaxActivationDistance, )
d.HoldDuration =
)
(ignore)
params = RaycastParams.()
okFilter = (()
params.FilterType = .RaycastFilterType.Exclude
)
okFilter
(()
params.FilterType = .RaycastFilterType.Blacklist
)
params.FilterDescendantsInstances = ignore
params.IgnoreWater =
(() params.RespectCanCollide = )
params
(fromPos, toPos, ignore)
res = Workspace:(fromPos, toPos - fromPos, (ignore))
res res.Distance
(part, npc)
npcPos = part.Position
dir
CONFIG.FRONT_MODE ==
dir = part.CFrame.LookVector
hrp = ()
dir = hrp (npcPos - hrp.Position) part.CFrame.LookVector
dir = .(dir.X, , dir.Z)
dir.Magnitude <
dir = .(part.CFrame.LookVector.X, , part.CFrame.LookVector.Z)
dir.Magnitude <
dir = .(, , )
dir = dir.Unit
sign = (CONFIG.FRONT_MODE == ) -
baseY = npcPos.Y + CONFIG.OFFSET_Y
dist = CONFIG.FRONT_DISTANCE
ignore = { npc }
LP.Character ignore[#ignore + ] = LP.Character
fromPos = npcPos + .(, , )
hitDist = (fromPos, fromPos + dir * sign * (dist + ), ignore)
hitDist
dist = .(hitDist - , CONFIG.FRONT_DIST_MIN, CONFIG.FRONT_DISTANCE)
standPos = .(
npcPos.X + dir.X * dist * sign,
baseY,
npcPos.Z + dir.Z * dist * sign
)
facePos = .(npcPos.X, baseY, npcPos.Z)
.(standPos, facePos)
(a, b)
dx = a.X - b.X
dz = a.Z - b.Z
.(dx * dx + dz * dz)
()
.(()
(()
VIM:(, , , )
.(CONFIG.SPACE_HOLD)
VIM:(, , , )
)
)
()
(()
VIM:(, , , )
)
(pos, ignore)
from = pos + .(, CONFIG.PROBE_UP, )
to = pos - .(, CONFIG.PROBE_DOWN, )
Workspace:(from, to - from, (ignore))
(hit, refY)
hit
hit.Normal.Y < CONFIG.MIN_NORMAL_Y
.(hit.Position.Y - refY) > CONFIG.MAX_GROUND_DELTA
(wpPos, wpY, fromPos, ignore)
dir = .(wpPos.X - fromPos.X, , wpPos.Z - fromPos.Z)
dir.Magnitude < dir = .(, , )
dir = dir.Unit
side = .(-dir.Z, , dir.X) * CONFIG.PROBE_SIDE
((wpPos, ignore), wpY)
left = ((wpPos + side, ignore), wpY)
right = ((wpPos - side, ignore), wpY)
left right
(getTarget, eps, timeout, extraIgnore, label)
hrp = ()
hum = ()
hrp hum
ignore = {}
LP.Character ignore[#ignore + ] = LP.Character
activeContainer ignore[#ignore + ] = activeContainer
extraIgnore
_, v (extraIgnore) ignore[#ignore + ] = v
oldSpeed = hum.WalkSpeed
hum.WalkSpeed = CONFIG.SPEED
t0 = .()
arrived =
lastCompute =
lastTarget =
waypoints, wpIndex = ,
forceRepath =
blockConn =
computing =
validIdx, validOk = ,
wpStartT = .()
progPos = hrp.Position
progT = .()
stuckHits =
recovering =
lowT =
samplePos = hrp.Position
sampleT = .()
lastSpace =
cycleStart =
()
blockConn
(() blockConn:() )
blockConn =
waypoints =
wpIndex =
validIdx =
()
wpIndex +=
validIdx =
wpStartT = .()
progPos = hrp.Position
progT = .()
stuckHits =
(fromPos, toPos)
computing
computing =
.(()
path = Pathfinding:(AGENT_PARAMS)
ok = (()
path:(fromPos, toPos)
)
ok running path.Status == .PathStatus.Success
wps = path:()
#wps > .(wps, )
#wps >
blockConn
(() blockConn:() )
blockConn = path.Blocked:(()
forceRepath =
)
waypoints = wps
wpIndex =
validIdx =
wpStartT = .()
progPos = hrp.Position
progT = .()
stuckHits =
computing =
)
running
.() - t0 > timeout
raw = ()
raw
targetPos = .(raw.X, hrp.Position.Y, raw.Z)
(targetPos, hrp.Position) <= eps
arrived =
now = .()
now - sampleT >= CONFIG.SPEED_SAMPLE
v = (hrp.Position, samplePos) / .(now - sampleT, )
samplePos = hrp.Position
sampleT = now
v < CONFIG.MIN_SPEED
lowT += CONFIG.SPEED_SAMPLE
lowT >= CONFIG.LOW_SPEED_TIME recovering
recovering =
cycleStart = .()
lastSpace =
label
( .. label, .(, , ))
forceRepath =
lastCompute =
lowT =
recovering
t = .()
(t - cycleStart) >= (CONFIG.RECOVERY_CYCLE + CONFIG.RECOVERY_PAUSE)
cycleStart = t
(t - cycleStart) < CONFIG.RECOVERY_CYCLE (t - lastSpace) >= CONFIG.SPACE_INTERVAL
lastSpace = t
()
needRepath = forceRepath recovering ( waypoints)
(lastTarget (targetPos, lastTarget) > CONFIG.REPATH_DIST)
repathGap = recovering CONFIG.RECOVERY_REPATH CONFIG.REPATH_COOLDOWN
needRepath computing (.() - lastCompute) >= repathGap
forceRepath =
lastCompute = .()
lastTarget = targetPos
(hrp.Position, targetPos)
moved =
guard =
wp = waypoints waypoints[wpIndex]
wp guard <
guard +=
wpPos = .(wp.Position.X, hrp.Position.Y, wp.Position.Z)
(wpPos, hrp.Position) <= CONFIG.WAYPOINT_EPS
wp.Action == .PathWaypointAction.Jump
hum.Jump =
()
wp = waypoints waypoints[wpIndex]
recovering
validOk =
validIdx ~= wpIndex
validOk = (wpPos, wp.Position.Y, hrp.Position, ignore)
validIdx = wpIndex
validOk
hum:(wpPos)
moved =
()
wp = waypoints waypoints[wpIndex]
moved
hum:(targetPos)
waypoints wpIndex > #waypoints computing
forceRepath =
lastCompute =
dt = RunService.Heartbeat:()
recovering wp validIdx == wpIndex
limit = .(
CONFIG.WAYPOINT_TIMEOUT,
((wp.Position, hrp.Position) / .(CONFIG.SPEED, )) *
)
.() - wpStartT > limit
()
computing
forceRepath =
lastCompute =
.() - progT >= CONFIG.STUCK_WINDOW
movedDist = (hrp.Position, progPos)
progPos = hrp.Position
progT = .()
movedDist < CONFIG.STUCK_MIN_MOVE
stuckHits +=
hum.Jump =
stuckHits >= CONFIG.STUCK_RETRIES
stuckHits =
()
computing
forceRepath =
lastCompute =
stuckHits =
()
hum:(hrp.Position)
hum.WalkSpeed = oldSpeed
()
arrived
(npc, part)
(()
npc.Parent
part part.Parent
part = (npc)
part
(part, npc).Position
, CONFIG.PHYS_EPS, CONFIG.APPROACH_TIMEOUT, { npc }, npc.Name)
(npc, part, speed)
hrp = ()
hrp
part
wasAnchored = hrp.Anchored
hrp.Anchored =
cv = .()
cv.Value = hrp.CFrame
conn = cv:():(()
h = ()
h h.CFrame = cv.Value
)
tween
(targetCF, dur)
tween (() tween:() )
tween = TweenService:(cv, TweenInfo.(dur, .EasingStyle.Linear), { Value = targetCF })
tween:()
t0 = .()
arrived =
dt = /
running
.() - t0 > CONFIG.APPROACH_TIMEOUT
npc.Parent
part.Parent
part = (npc)
part
target = (part, npc)
dist = (target.Position - hrp.Position).Magnitude
dist <= CONFIG.ARRIVE_EPS
(target, .(dist / .(speed, ), ))
tw = tween
running tw.PlaybackState == .PlaybackState.Playing
RunService.Heartbeat:()
arrived =
(target, .(dist / .(speed, ), dt * ))
dt = RunService.Heartbeat:()
tween (() tween:() )
conn:()
cv:()
hrp.Anchored = wasAnchored
arrived
(npc, part, speed)
CONFIG.USE_PHYSICS
(npc, part)
(npc, part, speed)
()
i = , CONFIG.PRESS_COUNT
running
(()
VIM:(, , , )
.(CONFIG.PRESS_HOLD)
VIM:(, , , )
)
i < CONFIG.PRESS_COUNT
.(CONFIG.PRESS_INTERVAL)
()
running =
()
hrp = ()
hum = ()
hrp hum (() hum:(hrp.Position) )
(, .(, , ))
()
()
running
()
hrp = ()
hrp
(, .(, , ))
cooldowns = {}
running =
()
(, .(, , ))
.(()
container = ()
container
(, .(, , ))
()
activeContainer = container
remaining = (container)
remaining ==
(, .(, , ))
()
(, .(, , ))
done =
running
container container.Parent
container = ()
container
(, .(, , ))
activeContainer = container
npc = (container)
npc
CONFIG.INFINITE running
waitSec = .(() + , CONFIG.MAX_WAIT)
(
.(, waitSec),
.(, , )
)
wt = .()
running (.() - wt) < waitSec
.()
(npc)
( .. npc.Name, .(, , ))
part = (npc)
ok =
part
ok = (npc, part, CONFIG.SPEED)
ok running
( .. npc.Name, .(, , ))
.(CONFIG.SETTLE_DELAY)
()
(npc, CONFIG.COOLDOWN + CONFIG.COOLDOWN_PAD)
done +=
remaining = (container)
progress.Text = .(
,
done, remaining, ()
)
running
( .. npc.Name, .(, , ))
(npc, CONFIG.FAIL_COOLDOWN)
.(CONFIG.NPC_COOLDOWN)
(, .(, , ))
()
running =
)
button.MouseButton1Click:(()
running () ()
)
()
()
()
(, .(, , ))auto farm de npcs pra prestígio ou apoio, bem simples por sinal, vou fazer updates por aqui de vez em quando. Listarei as melhorias na descrição mesmo. sem key ou condição, é só pegar e usar