Run it
Copy the script and paste it into your executor.
WOLF_RANGE =
HUMAN_RANGE =
TRAVEL_RANGE =
COUNTDOWN =
BLOOD_LOW =
BLOOD_TARGET =
DRINK_DISTANCE =
DRINK_COOLDOWN =
DRINK_CHECK_DELAY =
PAUSE_HEALTH =
RESUME_HEALTH =
PASS_START_DISTANCE =
PASS_BEYOND =
PASS_TIMEOUT =
ATTACK_DISTANCE =
BURST_DURATION =
HOLD_TIME =
GAP_TIME =
Pathfinding = :()
Players = :()
RunService = :()
Input = :()
player = Players.LocalPlayer
env = () == ()
old = env.WolfShuttleController
(old) ==
old.stopped (old.workerStarted old.workerFinished)
()
oldTest = env.WolfClickTest
(oldTest) == (oldTest.stop) ==
()
press, release = mouse1press, mouse1release
(press) ~= (release) ~=
()
inputOk, virtualInput = (()
Input:()
)
inputOk virtualInput
(, virtualInput)
memory = env.WolfFarmMemory
(memory) ~= memory.server ~= .JobId
memory = {server = .JobId}
env.WolfFarmMemory = memory
state = {
stopped = , attackAllowed = ,
mouseHeld = , shiftHeld = , eHeld = ,
drinkRequested = , drinkBusy = ,
workerStarted = , workerFinished = ,
reason =
}
character, humanoid, root, originalAutoRotate
wolf, wolfRoot, wolfHumanoid
human, humanRoot, humanHumanoid
phase, phaseStarted = ,
passDirection
mode =
recovering =
nextWolfSearch, nextHumanSearch = ,
nextDrinkAt = (memory.nextDrinkAt)
nextLocationSearch =
nextQuestCheck =
drinkAt, bloodBeforeDrink, lastDrinkHuman
awaitingBloodCheck =
ignoredHumans = {}
status
clicks, drinks = ,
connection
bound, cleaned = ,
bindingName =
(v)
.(v.X, , v.Z)
(message)
message ~= status
status = message
(, message)
()
value = (player:())
maximum = (player:())
value maximum maximum <=
value / maximum, value
()
state.mouseHeld
ok, err = (release)
ok
state.mouseHeld =
(, err)
()
ok
(field, key)
state[field]
ok, err = (()
virtualInput:(, key, )
)
ok
state[field] =
(, key.Name, err)
()
ok
(enabled)
enabled
state.shiftHeld
state.shiftHeld =
virtualInput:(, .KeyCode.LeftShift, )
(, .KeyCode.LeftShift)
()
()
humanoid humanoid.Parent
humanoid:(.zero, )
originalAutoRotate ~=
humanoid.AutoRotate = originalAutoRotate
resetNavigation
()
cleaned
cleaned =
resetNavigation ()
state.attackAllowed =
state.drinkRequested =
()
(, .KeyCode.E)
(, .KeyCode.LeftShift)
connection connection:()
env.WolfShuttleController == state
bound RunService:(bindingName)
(stopMovement)
env.WolfSprintTestRunning =
state.stop = (reason)
state.stopped =
state.reason = reason
()
env.WolfShuttleController = state
env.WolfSprintTestRunning =
connection = Input.InputBegan:((key)
key.KeyCode == .KeyCode.F6 state.()
)
(message)
resetNavigation ()
state.attackAllowed =
state.drinkRequested =
phase =
()
()
() ()
(, .KeyCode.E)
()
(message)
(model, modelRoot, modelHumanoid)
model model.Parent
modelRoot modelRoot.Parent
modelHumanoid modelHumanoid.Parent
modelHumanoid.Health >
(model)
(value)
(value) ==
.(.(value), , , ) ~=
(model.Name)
_, item (model:())
(item.Name)
item:() item:()
(item.Text)
item:()
(item.ActionText) (item.ObjectText)
(model)
model model:()
_, item (model:())
item:() item:()
text = item.Text
item.RichText text = text:(, )
text = text:()
.(text) ==
parent = item
visible, overhead = ,
parent parent ~= model
parent:() parent.Visible
visible =
parent:()
overhead =
parent.Enabled visible =
parent = parent.Parent
overhead visible
(folder, range, humansOnly)
folder
selected, selectedRoot, selectedHumanoid
closest = range
_, model (folder:())
allowed = humansOnly ((model) (model))
ignored = humansOnly ignoredHumans[model]
ignoredHumans[model] > .()
model:() allowed ignored
h = model:()
r = model:()
h h.Health > r r:()
distance = (r.Position - root.Position).Magnitude
distance <= closest
selected, selectedRoot, selectedHumanoid = model, r, h
closest = distance
selected, selectedRoot, selectedHumanoid
(position)
camera = .CurrentCamera
camera (position - camera.CFrame.Position).Magnitude >
camera.CFrame = .(camera.CFrame.Position, position)
(position)
delta = (position - root.Position)
delta.Magnitude >
root.CFrame = .(root.Position, root.Position + delta.Unit)
nav = {generation = , busy = , failures = , retryAt = }
departureRequested =
resetNavigation = ()
nav.generation = nav.generation +
nav.blocked nav.blocked:(); nav.blocked =
nav.path nav.path:(); nav.path =
nav.points, nav.goal, nav.anchor = , ,
nav.needsRetry =
nav.directAnchor, nav.directSince = ,
nav.detour =
nav.nextObstacleCheck =
nav.closeAnchor =
nav.failures, nav.retryAt = ,
(reason)
nav.blocked nav.blocked:(); nav.blocked =
nav.path nav.path:(); nav.path =
nav.points =
nav.failures = nav.failures +
nav.retryAt = .() +
humanoid:(.zero, )
(, reason, , nav.failures, )
nav.failures >=
state.()
(position)
nav.busy state.stopped .() < nav.retryAt
nav.busy =
nav.started = .()
generation = nav.generation
start = root.Position
goal = position
(goal - start).Magnitude >
goal = start + (goal - start).Unit *
params = RaycastParams.()
params.FilterType = .RaycastFilterType.Exclude
params.FilterDescendantsInstances = {character}
ground = :(goal + .(, , ),
.(, -, ), params)
ground goal = ground.Position
(goal - start).Magnitude >
nav.busy =
()
.(()
path
success, result = ,
candidates = {goal}
mode == humanRoot humanRoot.Parent
(goal - humanRoot.Position).Magnitude <
candidates = {}
params = RaycastParams.()
params.FilterType = .RaycastFilterType.Exclude
exclude = {character}
humansFolder = :()
humansFolder .(exclude, humansFolder)
params.FilterDescendantsInstances = exclude
toward = (start - goal)
baseAngle = .(toward.Z, toward.X)
_, radius ({, })
_, turn ({, .pi / , -.pi / , .pi})
angle = baseAngle + turn
offset = goal + .(.(angle)*radius, ,
.(angle)*radius)
hit = :(offset + .(, , ),
.(, -, ), params)
hit hit.Normal.Y >
.(candidates, hit.Position)
_, candidate (candidates)
state.stopped generation ~= nav.generation
success, result = (()
path = Pathfinding:({
AgentRadius = , AgentHeight = ,
AgentCanJump = , WaypointSpacing =
})
path:(start, candidate)
path.Status ~= .PathStatus.Success
( .. (path.Status))
path:()
)
success #result >=
goal = candidate
path path:(); path =
.()
nav.busy =
state.stopped env.WolfShuttleController ~= state
generation ~= nav.generation
path path:()
success #result <
(, success (result))
(, mode, , .((goal - start).Magnitude))
(, start, , goal)
path path:()
()
nav.path, nav.points, nav.index = path, result,
nav.anchor, nav.progressAt = root.Position, .()
nav.jumpIndex =
nav.blocked = path.Blocked:((index)
generation == nav.generation nav.points index >= nav.index
nav.needsRetry =
)
(, #result)
)
(direction)
params = RaycastParams.()
params.FilterType = .RaycastFilterType.Exclude
params.RespectCanCollide =
excluded = {character}
_, name ({, })
folder = :(name)
folder .(excluded, folder)
params.FilterDescendantsInstances = excluded
speed = (root.AssemblyLinearVelocity).Magnitude
lookAhead = .(speed * + , , )
side = .(-direction.Z, , direction.X)
_, height ({, })
_, offset ({-, , })
origin = root.Position + side * offset + .(, height, )
:(origin, direction * lookAhead, params)
(position)
now = .()
nav.goal
((position - nav.goal).Magnitude > nav.points nav.busy)
(mode == nav.humanTarget ~= human)
(nav.lastUsed now - nav.lastUsed > )
()
nav.goal = position
nav.humanTarget = human
nav.lastUsed = now
humanoid.AutoRotate =
distance = (position - root.Position).Magnitude
( (mode == distance <= ))
mode == humanRoot humanRoot.Parent distance <=
params = RaycastParams.()
params.FilterType = .RaycastFilterType.Exclude
params.FilterDescendantsInstances = {character, human}
obstruction = :(root.Position,
humanRoot.Position - root.Position, params)
obstruction
nav.closeAnchor
nav.closeAnchor, nav.closeAt = root.Position, now
(root.Position - nav.closeAnchor).Magnitude >=
nav.closeAnchor, nav.closeAt = root.Position, now
now - nav.closeAt >=
nav.closeAnchor =
()
distance
now < nav.retryAt
humanoid:(.zero, )
distance
()
delta = (humanRoot.Position - root.Position)
humanoid:(delta.Magnitude > delta.Unit .zero, )
(humanRoot.Position)
distance
nav.closeAnchor =
distance > departureRequested nav.detour
nav.points nav.busy
nav.directAnchor
nav.directAnchor, nav.directSince = root.Position, now
(root.Position - nav.directAnchor).Magnitude >=
nav.directAnchor, nav.directSince = root.Position, now
now - nav.directSince >=
nav.detour =
()
nav.detour now >= (nav.nextObstacleCheck )
nav.nextObstacleCheck = now +
direction = (position - root.Position).Unit
(direction)
nav.detour =
humanoid:(.zero, )
velocity = root.AssemblyLinearVelocity
root.AssemblyLinearVelocity = .(, velocity.Y, )
()
nav.detour
delta = (position - root.Position)
humanoid:(delta.Unit, )
(position)
distance
nav.busy
humanoid:(.zero, )
now - nav.started >
state.()
distance
nav.needsRetry
nav.needsRetry =
()
distance
nav.points
humanoid:(.zero, )
(position)
distance
waypoint = nav.points[nav.index]
waypoint
delta = (waypoint.Position - root.Position)
previous = nav.points[nav.index - ].Position
segment = (waypoint.Position - previous)
passed = segment.Magnitude >
delta:(segment.Unit) <= delta.Magnitude <
nearHeight = .(root.Position.Y - waypoint.Position.Y) <
nearHeight (delta.Magnitude <= passed)
nav.index = nav.index +
waypoint = nav.points[nav.index]
waypoint
departureRequested =
()
humanoid:(.zero, )
distance
(root.Position - nav.anchor).Magnitude >=
nav.anchor, nav.progressAt = root.Position, now
nav.failures =
now - nav.progressAt >=
()
distance
waypoint.Action == .PathWaypointAction.Jump nav.jumpIndex ~= nav.index
humanoid.Jump =
nav.jumpIndex = nav.index
delta = (waypoint.Position - root.Position)
humanoid:(delta.Magnitude > delta.Unit .zero, )
(waypoint.Position + .(, , ))
distance
()
humanoid:(.zero, )
velocity = root.AssemblyLinearVelocity
root.AssemblyLinearVelocity = .(, velocity.Y, )
()
wolf, wolfRoot, wolfHumanoid = , ,
human, humanRoot, humanHumanoid = , ,
phase =
ok, err = (()
()
()
readyAt = .() + COUNTDOWN
.() < readyAt
state.stopped env.WolfShuttleController ~= state
.()
state.stopped env.WolfShuttleController ~= state
()
state.attackAllowed =
state.stopped env.WolfShuttleController ~= state
now = .()
player.Character ~= character
()
character = player.Character
humanoid, root, originalAutoRotate = , ,
recovering =
awaitingBloodCheck =
nextWolfSearch, nextHumanSearch = ,
()
character character.Parent
()
humanoid = character:()
root = character:()
humanoid root
()
originalAutoRotate ==
originalAutoRotate = humanoid.AutoRotate
_, name ({
, ,
})
object = root:(name)
object object:()
humanoid.Health <=
()
health = humanoid.Health / .(humanoid.MaxHealth, )
health <= PAUSE_HEALTH recovering =
recovering health < RESUME_HEALTH
()
recovering =
bloodRatio, bloodValue = ()
bloodRatio
()
now >= nextLocationSearch
nextLocationSearch = now +
candidate, candidateRoot = (
:(), TRAVEL_RANGE, )
candidate memory.wolfPosition = candidateRoot.Position
mode ~= now >= nextHumanSearch
nextHumanSearch = now +
candidate, candidateRoot =
(:(), HUMAN_RANGE, )
candidate memory.humanPosition = candidateRoot.Position
bloodRatio <= BLOOD_LOW mode ~=
(wolf, wolfRoot, wolfHumanoid)
memory.wolfPosition = wolfRoot.Position
mode =
phase =
human, humanRoot, humanHumanoid = , ,
nextHumanSearch =
()
mode ==
awaitingBloodCheck drinkAt
now - drinkAt >= DRINK_CHECK_DELAY
awaitingBloodCheck =
bloodValue > bloodBeforeDrink +
(,
bloodBeforeDrink, , bloodValue)
()
lastDrinkHuman
ignoredHumans[lastDrinkHuman] = now +
human, humanRoot, humanHumanoid = , ,
nextHumanSearch =
bloodRatio >= BLOOD_TARGET
state.drinkBusy awaitingBloodCheck
state.drinkRequested =
mode =
()
departureRequested =
()
()
state.drinkBusy awaitingBloodCheck
()
()
humanRoot humanRoot.Parent
(humanRoot.Position)
(humanRoot.Position)
()
human now >= nextQuestCheck
nextQuestCheck = now +
(human) (human)
(, human:())
ignoredHumans[human] = now +
human, humanRoot, humanHumanoid = , ,
memory.humanPosition =
state.drinkRequested =
()
nextHumanSearch =
(human, humanRoot, humanHumanoid)
human, humanRoot, humanHumanoid = , ,
now >= nextHumanSearch
nextHumanSearch = now +
human, humanRoot, humanHumanoid =
(:(), HUMAN_RANGE, )
human
state.drinkRequested =
memory.humanPosition
(memory.humanPosition - root.Position).Magnitude >
()
(memory.humanPosition)
(memory.humanPosition
)
memory.humanPosition = humanRoot.Position
distance = (humanRoot.Position - root.Position).Magnitude
distance > DRINK_DISTANCE
state.drinkRequested =
()
(humanRoot.Position)
()
()
humanoid.AutoRotate =
(humanRoot.Position)
(humanRoot.Position)
now < nextDrinkAt
()
state.drinkRequested =
()
mode ==
memory.wolfPosition
(memory.wolfPosition - root.Position).Magnitude >
()
(memory.wolfPosition)
mode =
nextWolfSearch =
wolfFolder = :()
wolfFolder
memory.wolfPosition
(memory.wolfPosition - root.Position).Magnitude >
()
(memory.wolfPosition)
()
(wolf, wolfRoot, wolfHumanoid)
wolf, wolfRoot, wolfHumanoid = , ,
phase =
now >= nextWolfSearch
nextWolfSearch = now +
wolf, wolfRoot, wolfHumanoid =
(wolfFolder, WOLF_RANGE, )
wolf
memory.wolfPosition
(memory.wolfPosition - root.Position).Magnitude >
()
(memory.wolfPosition)
(memory.wolfPosition
)
(, wolf.Name)
memory.wolfPosition = wolfRoot.Position
(phase ~= )
()
center = wolfRoot.Position
(center)
delta = (center - root.Position)
distance = delta.Magnitude
direction
distance >
direction = delta.Unit
facing = (root.CFrame.LookVector)
direction = facing.Magnitude >
facing.Unit .(, , -)
phase ==
humanoid.AutoRotate =
humanoid:(direction, )
distance <= PASS_START_DISTANCE
passDirection = direction
phaseStarted = now
phase =
phase ==
progress = (root.Position - center):(passDirection)
progress >= PASS_BEYOND
()
distance <= ATTACK_DISTANCE
phase =
phaseStarted = now
()
phase =
now - phaseStarted >= PASS_TIMEOUT
phase =
humanoid.AutoRotate =
humanoid:(passDirection, )
phase ==
humanoid:(.zero, )
humanoid.AutoRotate =
now - phaseStarted >= BURST_DURATION
distance > ATTACK_DISTANCE
phase =
(center)
state.attackAllowed =
RunService:(
bindingName,
.RenderPriority.Last.Value - ,
()
frameOk, frameError = (update)
frameOk
(, frameError)
state.()
)
bound =
state.workerStarted =
.(()
workerOk, workerError = (()
state.stopped env.WolfShuttleController == state
characterReady = character == player.Character
humanoid humanoid.Parent humanoid.Health >
root root.Parent
characterReady mode ==
state.drinkRequested state.drinkBusy
(human, humanRoot, humanHumanoid)
(human) (human)
.() >= nextDrinkAt
(humanRoot.Position - root.Position).Magnitude
<= DRINK_DISTANCE
state.drinkRequested =
state.drinkBusy =
_, bloodValue = ()
bloodBeforeDrink = bloodValue
lastDrinkHuman = human
drinkAt = .()
nextDrinkAt = drinkAt + DRINK_COOLDOWN
memory.nextDrinkAt = nextDrinkAt
awaitingBloodCheck =
()
state.eHeld =
virtualInput:(, .KeyCode.E, )
.()
(, .KeyCode.E)
()
state.drinkBusy =
state.stopped env.WolfShuttleController ~= state
drinks = drinks +
()
characterReady mode ==
state.attackAllowed
humanoid.Health > humanoid.MaxHealth * PAUSE_HEALTH
(wolf, wolfRoot, wolfHumanoid)
(wolfRoot.Position - root.Position).Magnitude
<= ATTACK_DISTANCE
state.mouseHeld =
()
.(HOLD_TIME)
() ()
state.stopped env.WolfShuttleController ~= state
clicks = clicks +
.(GAP_TIME)
.()
)
()
(, .KeyCode.E)
state.drinkBusy =
workerOk
(, workerError)
state.()
state.workerFinished =
)
state.stopped env.WolfShuttleController == state
.()
)
ok
(, err)
state.reason =
state.stopped =
()
(, state.reason)
(, clicks)
(, drinks)This is the Vampire Auto Farm I will be releasing a Hybrid and a Wolf auto farm soon. If that gets a lot of interest, I will do a Witch AutoFarm.