-- Robscript Team - Fatal Apes ESP & Auto Farm
-- Game: Fatal Apes | original script by DevXelw (v2.4), ported to Robly Airflow
-- Window: RightControl | Unload: Settings -> Unload | API: getgenv().RobScriptFatalApes
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local Workspace = game:GetService("Workspace")
local LocalPlayer = Players.LocalPlayer
-- Unload a previous copy first, so its loops, highlights and billboards die.
do
local existing = getgenv().RobScriptFatalApes
if type(existing) == "table" and type(existing.Destroy) == "function" then
pcall(existing.Destroy)
end
end
----- Library -----
local LIBRARY_URLS = {
"https://raw.githubusercontent.com/bobloscript/Robly_Airflow/main/Source.luau",
"https://raw.githubusercontent.com/PookiePepelsss/Airflow-UI/refs/heads/main/Source.luau",
}
local Airflow = nil
for _, url in ipairs(LIBRARY_URLS) do
local ok, library = pcall(function()
return loadstring(game:HttpGet(url))()
end)
if ok and type(library) == "table" and type(library.CreateWindow) == "function" then
Airflow = library
break
end
end
if not Airflow then
error("[RobScript Fatal Apes] Airflow UI could not be loaded")
end
local Window = nil
local Log = nil
----- Theme -----
local THEME = {
Background = Color3.fromHex("#0A0A0C"),
Surface = Color3.fromHex("#141418"),
Surface2 = Color3.fromHex("#1A1A20"),
Surface3 = Color3.fromHex("#2A2A33"),
Stroke = Color3.fromHex("#26262E"),
StrokeHover = Color3.fromHex("#3C3C49"),
Accent = Color3.fromHex("#FF3B7F"),
AccentDark = Color3.fromHex("#1A0710"),
Text = Color3.fromHex("#F5F5F7"),
Muted = Color3.fromHex("#8D8D99"),
}
Airflow.ThemePresets.Robscript = THEME
Airflow:SetDefaultTheme(THEME)
----- Language -----
Airflow:AddLanguage("ru", {
Name = "Русский",
Flag = "ru",
Strings = {
["esp, auto farm, scraps"] = "esp, автофарм, шлак",
["Visuals"] = "Визуалы",
["Farm"] = "Фарм",
["Logs"] = "Логи",
["Settings"] = "Настройки",
["Monsters"] = "Монстры",
["Appearance"] = "Внешний вид",
["Scrap"] = "Шлак",
["Auto farm"] = "Автофарм",
["Status"] = "Статус",
["Position"] = "Позиция",
["Activity"] = "Активность",
["Unload"] = "Выгрузка",
["Monster outlines"] = "Обводка монстров",
["Purple outline on every ape inside the monster folders"] = "Фиолетовая обводка на каждой обезьяне из папок монстров",
["Monster names"] = "Имена монстров",
["Name above each outlined ape"] = "Имя над каждой обведённой обезьяной",
["Monster color"] = "Цвет монстров",
["Outline colour for monsters"] = "Цвет обводки монстров",
["Fill opacity"] = "Заливка",
["How solid the highlight fill looks"] = "Насколько плотной будет заливка подсветки",
["Scrap outlines"] = "Обводка шлака",
["Coloured outline on every scrap in the Scrap folder"] = "Цветная обводка на каждом предмете из папки Scrap",
["Hide collected"] = "Скрывать собранное",
["Removes the outline the moment a scrap is picked up"] = "Убирает обводку сразу после подбора",
["Types"] = "Типы",
["Which scrap types get an outline"] = "Какие типы шлака обводить",
["Visible"] = "Видно",
["Colour key"] = "Цвета",
["Gold yellow, Meat red, Emerald green, Diamond blue, Copper orange."] = "Золото жёлтое, мясо красное, изумруд зелёный, алмаз синий, медь оранжевая.",
["Teleports to the nearest scrap and fires its prompt"] = "Телепортируется к ближайшему шлаку и вызывает промпт",
["Attempts before stop"] = "Попыток до остановки",
["Empty searches in a row before the farm stops itself"] = "Пустых поисков подряд до самовыключения",
["Prompts per scrap"] = "Промптов на предмет",
["How many times one scrap is poked before moving on"] = "Сколько раз дёргать предмет перед переходом",
["Delay between scraps"] = "Пауза между предметами",
["Pause after every scrap"] = "Пауза после каждого предмета",
["# s"] = "# с",
["Return on stop"] = "Возврат при стопе",
["Flies back to the saved position when the farm stops"] = "Возвращает на сохранённую позицию при остановке",
["Anti fall"] = "Антипадение",
["Holds you in place while the farm runs"] = "Удерживает на месте во время фарма",
["State"] = "Состояние",
["Target"] = "Цель",
["Collected"] = "Собрано",
["Misses"] = "Промахи",
["Last prompt"] = "Последний промпт",
["Save position"] = "Сохранить позицию",
["Return now"] = "Вернуться",
["Home"] = "Дом",
["saved"] = "сохранён",
["not saved"] = "не сохранён",
["Nothing yet"] = "Пока пусто",
["Configs"] = "Конфиги",
["Theme"] = "Тема",
["Removes the hub and restores the game"] = "Убирает хаб и возвращает игру в исходное состояние",
["Running"] = "Работает",
["Idle"] = "Ожидание",
["none"] = "нет",
["prompt fired"] = "промпт отправлен",
["prompt hold"] = "удержание",
["nearby prompt"] = "промпт рядом",
["no prompt"] = "нет промпта",
["target lost"] = "цель потеряна",
["Farm started"] = "Фарм запущен",
["Farm stopped"] = "Фарм остановлен",
["Hub loaded"] = "Хаб загружен",
["No scraps left"] = "Шлак закончился",
["No scrap could be reached"] = "Не удалось добраться до шлака",
["Manually stopped"] = "Остановлено вручную",
["Loop error"] = "Ошибка цикла",
["Collected %s"] = "Собрано: %s",
["Back at the saved position"] = "Вернулся на сохранённую позицию",
["Character respawned"] = "Персонаж возродился",
["No monster folders found yet"] = "Папки монстров пока не найдены",
["No scrap folder found yet"] = "Папка шлака пока не найдена",
["%d monsters, %d scraps in the map"] = "Монстров: %d, шлака: %d",
["Starting position saved"] = "Стартовая позиция сохранена",
["No saved position"] = "Нет сохранённой позиции",
["Your character is not spawned yet"] = "Персонаж ещё не появился",
["Loaded"] = "Загружено",
["Fatal Apes hub is ready"] = "Хаб Fatal Apes готов",
["Gold"] = "Золото",
["Meat"] = "Мясо",
["Emerald"] = "Изумруд",
["Diamond"] = "Алмаз",
["Copper"] = "Медь",
["Other"] = "Прочее",
},
})
----- Constants -----
local ESP_INTERVAL = 0.5
local FOLDER_RETRY = 2
local PROMPT_RADIUS = 10
-- Folder names exactly as the original script lists them. "Sandman/Ashy" is a nested path,
-- so it is resolved piece by piece instead of being looked up as one child name.
local MONSTER_PATHS = {
"Sandman/Ashy",
"KusMonster",
"DusMonster",
"GusMonster",
"LostMonster",
}
local SCRAP_PATHS = {
"Scraps",
}
local MONSTER_COLOR = Color3.fromRGB(153, 0, 255)
local SCRAP_TYPES = { "Gold", "Meat", "Emerald", "Diamond", "Copper", "Other" }
local SCRAP_COLORS = {
Gold = Color3.fromRGB(255, 204, 0),
Meat = Color3.fromRGB(255, 60, 60),
Emerald = Color3.fromRGB(0, 255, 90),
Diamond = Color3.fromRGB(0, 153, 255),
Copper = Color3.fromRGB(204, 102, 0),
Other = Color3.fromRGB(255, 255, 255),
}
local SCRAP_ORDER = { "Gold", "Meat", "Emerald", "Diamond", "Copper" }
local STOP = false
local CONNECTIONS = {}
local function track(connection)
if connection then
table.insert(CONNECTIONS, connection)
end
return connection
end
----- Helpers -----
local function flag(name, fallback)
if not Airflow.Flags then
return fallback
end
local handle = Airflow.Flags[name]
if not handle then
return fallback
end
local ok, value = pcall(function()
if type(handle.Get) == "function" then
return handle:Get()
end
return handle.Value
end)
if ok and value ~= nil then
return value
end
return fallback
end
-- Libraries differ on Airflow:T; fall back to a plain format so a missing helper never
-- turns a log line into an error.
local function translate(template, ...)
local args = table.pack(...)
if type(Airflow.T) == "function" then
local ok, result = pcall(Airflow.T, Airflow, template, table.unpack(args, 1, args.n))
if ok and type(result) == "string" then
return result
end
end
if args.n > 0 then
local ok, result = pcall(string.format, template, table.unpack(args, 1, args.n))
if ok then
return result
end
end
return template
end
local function pushLog(line)
if Log then
pcall(function()
Log:Push(line)
end)
end
end
local function notify(title, content, kind)
if Window then
pcall(function()
Window:Notify({ Title = title, Content = content, Duration = 4, Type = kind or "Info" })
end)
end
end
-- Player and scrap names go into rich text labels, so they must not carry tags.
local function safe(text)
local value = tostring(text)
value = string.gsub(value, "&", "&")
value = string.gsub(value, "<", "<")
value = string.gsub(value, ">", ">")
return value
end
local function character()
local current = LocalPlayer.Character
if not current or not current.Parent then
return nil
end
return current
end
local function rootPart()
local current = character()
return current and current:FindFirstChild("HumanoidRootPart") or nil
end
local function humanoid()
local current = character()
return current and current:FindFirstChildOfClass("Humanoid") or nil
end
-- Workspace folder cache: the monster and scrap folders are looked up every refresh, so the
-- result is kept until the instance is gone and a miss is retried at most every FOLDER_RETRY.
local folderCache = {}
local function resolveFolder(path)
local cached = folderCache[path]
local now = os.clock()
if cached then
if cached.node and cached.node.Parent then
return cached.node
end
if not cached.node and now - cached.at < FOLDER_RETRY then
return nil
end
end
local current = Workspace
local lastPiece = nil
for piece in string.gmatch(path, "[^/]+") do
lastPiece = piece
local nextNode = current:FindFirstChild(piece)
if not nextNode then
current = nil
break
end
current = nextNode
end
local node = current
if not node and lastPiece then
-- The folder may sit deeper in the tree than the original script assumed.
node = Workspace:FindFirstChild(lastPiece, true)
end
if node == Workspace then
node = nil
end
folderCache[path] = { node = node, at = now }
return node
end
local function baseParts(instance)
local parts = {}
if instance:IsA("BasePart") then
parts[1] = instance
return parts
end
for _, child in ipairs(instance:GetDescendants()) do
if child:IsA("BasePart") then
table.insert(parts, child)
end
end
return parts
end
local function mainPart(instance)
if instance:IsA("BasePart") then
return instance
end
local preferred = instance:FindFirstChild("HumanoidRootPart")
or instance:FindFirstChild("Base")
or instance:FindFirstChild("Part")
if preferred and preferred:IsA("BasePart") then
return preferred
end
for _, child in ipairs(instance:GetDescendants()) do
if child:IsA("BasePart") then
return child
end
end
return nil
end
local function isMonster(instance)
if not instance:IsA("Model") then
return false
end
if not instance:FindFirstChildOfClass("Humanoid") then
return false
end
if instance == LocalPlayer.Character then
return false
end
return true
end
-- A scrap still counts as collectable while at least one of its parts is visible and sits in
-- the playable height range. Picked scraps turn transparent, which is how they disappear here.
local function isScrapVisible(instance)
if not instance or not instance.Parent then
return false
end
local parts = baseParts(instance)
if #parts == 0 then
return true
end
for _, part in ipairs(parts) do
local position = part.Position
if part.Transparency < 0.9 and position.Y > -100 and position.Y < 1000 then
return true
end
end
return false
end
local function scrapType(instance)
local name = string.lower(instance.Name)
for _, kind in ipairs(SCRAP_ORDER) do
if string.find(name, string.lower(kind), 1, true) then
return kind
end
end
return "Other"
end
local function selectedTypes()
local picked = flag("ScrapTypes", SCRAP_TYPES)
local set = {}
local answered = false
if type(picked) == "table" then
answered = true
for _, label in ipairs(picked) do
set[label] = true
end
elseif type(picked) == "string" then
answered = true
set[picked] = true
end
if not answered then
-- The dropdown has not answered yet: outline every type instead of nothing.
for _, label in ipairs(SCRAP_TYPES) do
set[label] = true
end
end
return set
end
local function collectFrom(paths, kind)
local list = {}
for _, path in ipairs(paths) do
local folder = resolveFolder(path)
if folder then
for _, child in ipairs(folder:GetChildren()) do
if kind == "monster" then
if isMonster(child) then
table.insert(list, child)
end
else
table.insert(list, child)
end
end
end
end
return list
end
local function collectMonsters()
return collectFrom(MONSTER_PATHS, "monster")
end
local function collectScraps()
return collectFrom(SCRAP_PATHS, "scrap")
end
----- ESP -----
local monsterEsp = {}
local scrapEsp = {}
local Stats = { monsters = 0, scraps = 0, visible = 0, total = 0 }
local function removeMonsterEsp(model)
local entry = monsterEsp[model]
if not entry then
return
end
monsterEsp[model] = nil
if entry.highlight then
pcall(function()
entry.highlight:Destroy()
end)
end
if entry.billboard then
pcall(function()
entry.billboard:Destroy()
end)
end
end
local function removeScrapEsp(instance)
local entry = scrapEsp[instance]
if not entry then
return
end
scrapEsp[instance] = nil
if entry.highlight then
pcall(function()
entry.highlight:Destroy()
end)
end
end
local function clearEsp()
for model in pairs(monsterEsp) do
removeMonsterEsp(model)
end
for instance in pairs(scrapEsp) do
removeScrapEsp(instance)
end
Stats.monsters = 0
Stats.scraps = 0
end
local function addNamePlate(model, entry, color)
local anchor = model:FindFirstChild("Head") or model:FindFirstChild("HumanoidRootPart")
if not anchor then
return
end
local billboard = Instance.new("BillboardGui")
billboard.Name = "RobScriptApeName"
billboard.Adornee = anchor
billboard.Size = UDim2.fromOffset(170, 24)
billboard.StudsOffset = Vector3.new(0, 3.2, 0)
billboard.AlwaysOnTop = true
local label = Instance.new("TextLabel")
label.Size = UDim2.fromScale(1, 1)
label.BackgroundTransparency = 1
label.Text = model.Name
label.TextSize = 13
label.Font = Enum.Font.GothamBold
label.TextColor3 = color
label.TextStrokeTransparency = 0.45
label.Parent = billboard
billboard.Parent = model
entry.billboard = billboard
entry.label = label
end
local function addMonsterEsp(model, color, fillTransparency, showNames)
local highlight = Instance.new("Highlight")
highlight.Name = "RobScriptApeOutline"
highlight.Adornee = model
highlight.FillColor = color
highlight.OutlineColor = color
highlight.FillTransparency = fillTransparency
highlight.OutlineTransparency = 0.1
highlight.Parent = model
local entry = { highlight = highlight }
monsterEsp[model] = entry
if showNames then
addNamePlate(model, entry, color)
end
return entry
end
local function addScrapEsp(instance, kind, fillTransparency)
local color = SCRAP_COLORS[kind] or SCRAP_COLORS.Other
local highlight = Instance.new("Highlight")
highlight.Name = "RobScriptScrapOutline"
highlight.Adornee = instance
highlight.FillColor = color
highlight.OutlineColor = color
highlight.FillTransparency = fillTransparency
highlight.OutlineTransparency = 0.1
highlight.Parent = instance
scrapEsp[instance] = { highlight = highlight, kind = kind }
return scrapEsp[instance]
end
local function espStep()
local fill = 1 - math.clamp((tonumber(flag("EspFill", 35)) or 35) / 100, 0.05, 0.95)
local monsterColor = flag("MonsterColor", MONSTER_COLOR)
if typeof(monsterColor) ~= "Color3" then
monsterColor = MONSTER_COLOR
end
local monstersOn = flag("MonsterEsp", true) == true
local showNames = flag("MonsterNames", true) == true
local scrapsOn = flag("ScrapEsp", true) == true
local hideCollected = flag("ScrapHide", true) == true
local wantedTypes = selectedTypes()
if monstersOn then
local seen = {}
local count = 0
for _, model in ipairs(collectMonsters()) do
seen[model] = true
count = count + 1
local entry = monsterEsp[model]
if not entry then
entry = addMonsterEsp(model, monsterColor, fill, showNames)
end
if entry and entry.highlight then
entry.highlight.FillColor = monsterColor
entry.highlight.OutlineColor = monsterColor
entry.highlight.FillTransparency = fill
if showNames then
if not entry.billboard then
addNamePlate(model, entry, monsterColor)
end
if entry.label then
entry.label.Text = model.Name
entry.label.TextColor3 = monsterColor
end
elseif entry.billboard then
pcall(function()
entry.billboard:Destroy()
end)
entry.billboard = nil
entry.label = nil
end
end
end
for model in pairs(monsterEsp) do
if not seen[model] or not model.Parent then
removeMonsterEsp(model)
end
end
Stats.monsters = count
else
for model in pairs(monsterEsp) do
removeMonsterEsp(model)
end
Stats.monsters = 0
end
local visible = 0
local total = 0
if scrapsOn then
local seen = {}
for _, instance in ipairs(collectScraps()) do
total = total + 1
local shown = isScrapVisible(instance)
if shown then
visible = visible + 1
end
local kind = scrapType(instance)
if (shown or not hideCollected) and wantedTypes[kind] then
seen[instance] = true
local entry = scrapEsp[instance]
if not entry then
entry = addScrapEsp(instance, kind, fill)
end
if entry and entry.highlight then
if entry.kind ~= kind then
local color = SCRAP_COLORS[kind] or SCRAP_COLORS.Other
entry.highlight.FillColor = color
entry.highlight.OutlineColor = color
entry.kind = kind
end
entry.highlight.FillTransparency = fill
end
end
end
for instance in pairs(scrapEsp) do
if not seen[instance] or not instance.Parent then
removeScrapEsp(instance)
end
end
Stats.scraps = 0
for _ in pairs(scrapEsp) do
Stats.scraps = Stats.scraps + 1
end
else
for instance in pairs(scrapEsp) do
removeScrapEsp(instance)
end
Stats.scraps = 0
end
Stats.visible = visible
Stats.total = total
end
----- Farm -----
local AutoFarmToggle = nil
local Farm = {
running = false,
token = 0,
targetName = nil,
misses = 0,
collected = 0,
home = nil,
teleporting = false,
lastPrompt = nil,
}
local function zeroVelocity(root)
pcall(function()
root.AssemblyLinearVelocity = Vector3.zero
root.AssemblyAngularVelocity = Vector3.zero
end)
end
local function saveHome()
local root = rootPart()
if not root then
return false
end
Farm.home = root.CFrame
return true
end
local function returnHome()
local root = rootPart()
if not root or not Farm.home then
return false
end
Farm.teleporting = true
pcall(function()
root.CFrame = Farm.home
zeroVelocity(root)
end)
task.wait(0.1)
Farm.teleporting = false
return true
end
local function teleportTo(target)
local root = rootPart()
local part = target and mainPart(target)
if not root or not part then
return false
end
local position = part.Position
local destination = position + Vector3.new(0, 3, 0)
local look = CFrame.lookAt(destination, Vector3.new(position.X, destination.Y, position.Z))
Farm.teleporting = true
pcall(function()
root.CFrame = look
zeroVelocity(root)
end)
task.wait(0.05)
Farm.teleporting = false
return true
end
local function findNearestScrap()
local root = rootPart()
if not root then
return nil
end
local origin = root.Position
local nearest = nil
local best = math.huge
for _, instance in ipairs(collectScraps()) do
if isScrapVisible(instance) then
local part = mainPart(instance)
if part then
local distance = (part.Position - origin).Magnitude
if distance < best then
best = distance
nearest = instance
end
end
end
end
return nearest
end
local function hasAnyScrap()
for _, instance in ipairs(collectScraps()) do
if isScrapVisible(instance) then
return true
end
end
return false
end
local function findPrompt(instance)
if not instance then
return nil
end
local direct = instance:FindFirstChildOfClass("ProximityPrompt")
if direct then
return direct
end
for _, child in ipairs(instance:GetDescendants()) do
if child:IsA("ProximityPrompt") then
return child
end
end
return nil
end
local function activatePrompt(prompt)
if not prompt or not prompt.Parent then
return false
end
local fired = false
if type(fireproximityprompt) == "function" then
fired = pcall(fireproximityprompt, prompt)
end
pcall(function()
prompt:InputHoldBegin()
end)
task.wait(0.1)
pcall(function()
prompt:InputHoldEnd()
end)
task.wait(0.05)
return fired
end
-- Some scraps keep the prompt on a neighbour part, so a nearby prompt is used as a fallback.
local function activateNearbyPrompt(radius)
local root = rootPart()
if not root then
return false
end
local origin = root.Position
local best = nil
local bestDistance = radius
for _, instance in ipairs(Workspace:GetDescendants()) do
if instance:IsA("ProximityPrompt") and instance.Parent then
local holder = instance.Parent
local position = nil
if holder:IsA("BasePart") then
position = holder.Position
elseif holder:IsA("Attachment") and holder.Parent and holder.Parent:IsA("BasePart") then
position = holder.Parent.Position
end
if position then
local distance = (position - origin).Magnitude
if distance < bestDistance then
best = instance
bestDistance = distance
end
end
end
end
if best then
return activatePrompt(best)
end
return false
end
local function stopFarm(reason)
if not Farm.running then
return
end
Farm.running = false
Farm.token = Farm.token + 1
Farm.targetName = nil
Farm.misses = 0
if flag("ReturnHome", true) == true then
returnHome()
end
if AutoFarmToggle then
-- Deferred: stopFarm can be reached from the toggle's own callback, and a switch must not
-- be written from inside its own callback stack.
task.defer(function()
pcall(function()
if AutoFarmToggle.Value ~= false then
AutoFarmToggle:Set(false, true)
end
end)
end)
end
pushLog("Farm stopped")
if reason then
pushLog("" .. safe(translate(reason)) .. "")
end
end
local function farmLoop(token)
while Farm.running and Farm.token == token and not STOP do
local current = character()
local currentHumanoid = humanoid()
if not current or not currentHumanoid or currentHumanoid.Health <= 0 then
task.wait(0.5)
else
local attempts = math.clamp(tonumber(flag("FarmAttempts", 5)) or 5, 1, 20)
if not hasAnyScrap() then
Farm.misses = Farm.misses + 1
Farm.lastPrompt = "No scraps left"
if Farm.misses >= attempts then
stopFarm("No scraps left")
break
end
task.wait(1)
else
Farm.misses = 0
local target = findNearestScrap()
if not target then
Farm.misses = Farm.misses + 1
if Farm.misses >= attempts then
stopFarm("No scrap could be reached")
break
end
task.wait(1)
else
Farm.targetName = target.Name
if teleportTo(target) then
local prompt = findPrompt(target)
if prompt then
local tries = math.clamp(tonumber(flag("PromptTries", 5)) or 5, 1, 10)
for _ = 1, tries do
if not Farm.running or STOP then
break
end
local fired = activatePrompt(prompt)
Farm.lastPrompt = fired and "prompt fired" or "prompt hold"
task.wait(0.15)
if not isScrapVisible(target) or not target.Parent then
Farm.collected = Farm.collected + 1
pushLog(translate("Collected %s", target.Name))
break
end
end
else
local fired = activateNearbyPrompt(PROMPT_RADIUS)
Farm.lastPrompt = fired and "nearby prompt" or "no prompt"
end
else
Farm.lastPrompt = "target lost"
end
Farm.targetName = nil
local delay = math.clamp(tonumber(flag("FarmDelay", 0.2)) or 0.2, 0.05, 1)
task.wait(delay)
end
end
end
task.wait(0.1)
end
end
local function startFarm()
if Farm.running then
return false
end
if not character() then
notify("Auto farm", "Your character is not spawned yet", "Warning")
return false
end
Farm.running = true
Farm.token = Farm.token + 1
Farm.misses = 0
Farm.collected = 0
Farm.lastPrompt = nil
saveHome()
pushLog("Farm started")
local token = Farm.token
task.spawn(function()
local ok, failure = pcall(farmLoop, token)
if not ok then
pushLog("" .. safe(failure) .. "")
stopFarm("Loop error")
end
end)
return true
end
-- Anti fall: while the farm runs the character is held in the air and put back on the nearest
-- floor. The raycast ignores the character itself so it cannot hit its own limbs.
track(RunService.Heartbeat:Connect(function()
if STOP or not Farm.running or Farm.teleporting then
return
end
if flag("AntiFall", true) ~= true then
return
end
local current = character()
local root = current and current:FindFirstChild("HumanoidRootPart")
local currentHumanoid = current and current:FindFirstChildOfClass("Humanoid")
if not root or not currentHumanoid or currentHumanoid.Health <= 0 then
return
end
local velocity = root.AssemblyLinearVelocity
if velocity.Y < -50 then
zeroVelocity(root)
root.CFrame = root.CFrame + Vector3.new(0, 5, 0)
return
end
if currentHumanoid:GetState() ~= Enum.HumanoidStateType.Freefall then
return
end
zeroVelocity(root)
local filterType = Enum.RaycastFilterType.Exclude or Enum.RaycastFilterType.Blacklist
local params = RaycastParams.new()
params.FilterType = filterType
params.FilterDescendantsInstances = { current }
local result = Workspace:Raycast(root.Position, Vector3.new(0, -10, 0), params)
if result then
root.CFrame = CFrame.new(result.Position + Vector3.new(0, 3, 0))
end
end))
----- UI -----
Window = Airflow:CreateWindow({
Name = "Fatal Apes",
LoadingSubtitle = "esp, auto farm, scraps",
ToggleUIKeybind = "RightControl",
Size = UDim2.fromOffset(780, 540),
Backdrop = { Weather = "Fireflies", Tint = 0.35 },
Theme = THEME,
ConfigurationSaving = { Enabled = true, FolderName = "RobScriptFatalApes" },
Home = {
Title = "Fatal Apes",
Welcome = "Welcome back,",
Tier = "v1.0",
Stats = { "Players", "Session", "FPS", "Ping", "Game", "Executor" },
},
})
local LogsTab = Window:CreateTab({ Name = "Logs", Icon = "scroll-text" })
local LogsBox = LogsTab:CreateGroupbox({ Name = "Activity", Side = "Left" })
Log = LogsBox:CreateLog({
Name = "Activity",
MaxEntries = 200,
MaxRows = 14,
Timestamps = true,
EmptyText = "Nothing yet",
})
----- Visuals -----
local VisualsTab = Window:CreateTab({ Name = "Visuals", Icon = "eye" })
local MonsterBox = VisualsTab:CreateGroupbox({ Name = "Monsters", Icon = "ghost", Side = "Left" })
local LookBox = VisualsTab:CreateGroupbox({ Name = "Appearance", Icon = "palette", Side = "Left" })
local ScrapBox = VisualsTab:CreateGroupbox({ Name = "Scrap", Icon = "gem", Side = "Right" })
MonsterBox:CreateToggle({
Name = "Monster outlines",
Desc = "Purple outline on every ape inside the monster folders",
Flag = "MonsterEsp",
CurrentValue = true,
})
MonsterBox:CreateToggle({
Name = "Monster names",
Desc = "Name above each outlined ape",
Flag = "MonsterNames",
CurrentValue = true,
DependsOn = "MonsterEsp",
})
MonsterBox:CreateColorPicker({
Name = "Monster color",
Desc = "Outline colour for monsters",
Flag = "MonsterColor",
Color = MONSTER_COLOR,
})
MonsterBox:CreateStatus({
Name = "Monsters",
Style = "Stat",
UpdateRate = 0.5,
Update = function()
return tostring(Stats.monsters)
end,
})
LookBox:CreateSlider({
Name = "Fill opacity",
Desc = "How solid the highlight fill looks",
Range = { 5, 95 },
Increment = 5,
Suffix = " %",
CurrentValue = 35,
Flag = "EspFill",
})
ScrapBox:CreateToggle({
Name = "Scrap outlines",
Desc = "Coloured outline on every scrap in the Scrap folder",
Flag = "ScrapEsp",
CurrentValue = true,
})
ScrapBox:CreateToggle({
Name = "Hide collected",
Desc = "Removes the outline the moment a scrap is picked up",
Flag = "ScrapHide",
CurrentValue = true,
DependsOn = "ScrapEsp",
})
ScrapBox:CreateDropdown({
Name = "Types",
Desc = "Which scrap types get an outline",
Options = { table.unpack(SCRAP_TYPES) },
MultipleOptions = true,
CurrentOption = { table.unpack(SCRAP_TYPES) },
MaxRows = 6,
Flag = "ScrapTypes",
DependsOn = "ScrapEsp",
})
ScrapBox:CreateParagraph({
Title = "Colour key",
Content = "Gold yellow, Meat red, Emerald green, Diamond blue, Copper orange.",
})
ScrapBox:CreateStatus({
Name = "Visible",
Style = "Stat",
UpdateRate = 0.5,
Update = function()
if Stats.total == 0 then
return "0"
end
return string.format("%d / %d", Stats.visible, Stats.total)
end,
})
----- Farm -----
local FarmTab = Window:CreateTab({ Name = "Farm", Icon = "pickaxe" })
local FarmBox = FarmTab:CreateGroupbox({ Name = "Auto farm", Icon = "zap", Side = "Left" })
local FarmStatusBox = FarmTab:CreateGroupbox({ Name = "Status", Icon = "activity", Side = "Right" })
local HomeBox = FarmTab:CreateGroupbox({ Name = "Position", Icon = "map-pin", Side = "Right" })
AutoFarmToggle = FarmBox:CreateToggle({
Name = "Auto farm",
Desc = "Teleports to the nearest scrap and fires its prompt",
Flag = "AutoFarm",
CurrentValue = false,
Callback = function(enabled)
if enabled then
if not startFarm() then
-- startFarm refused (no character yet): do not leave the switch lying
task.defer(function()
pcall(function()
AutoFarmToggle:Set(false, true)
end)
end)
end
else
stopFarm("Manually stopped")
end
end,
})
FarmBox:CreateStepper({
Name = "Attempts before stop",
Desc = "Empty searches in a row before the farm stops itself",
Range = { 1, 20 },
Increment = 1,
CurrentValue = 5,
Flag = "FarmAttempts",
})
FarmBox:CreateStepper({
Name = "Prompts per scrap",
Desc = "How many times one scrap is poked before moving on",
Range = { 1, 10 },
Increment = 1,
CurrentValue = 5,
Flag = "PromptTries",
})
FarmBox:CreateSlider({
Name = "Delay between scraps",
Desc = "Pause after every scrap",
Range = { 0.05, 1 },
Increment = 0.05,
Suffix = " s",
CurrentValue = 0.2,
Flag = "FarmDelay",
})
FarmBox:CreateToggle({
Name = "Return on stop",
Desc = "Flies back to the saved position when the farm stops",
Flag = "ReturnHome",
CurrentValue = true,
})
FarmBox:CreateToggle({
Name = "Anti fall",
Desc = "Holds you in place while the farm runs",
Flag = "AntiFall",
CurrentValue = true,
})
FarmStatusBox:CreateStatus({
Name = "State",
Style = "Row",
Pin = true,
UpdateRate = 0.4,
Update = function()
if Farm.running then
return "Running"
end
return "Idle"
end,
})
FarmStatusBox:CreateStatus({
Name = "Target",
Style = "Row",
UpdateRate = 0.4,
Update = function()
if not Farm.targetName then
return "none"
end
return safe(Farm.targetName)
end,
})
FarmStatusBox:CreateStatus({
Name = "Collected",
Style = "Stat",
UpdateRate = 0.5,
Update = function()
return tostring(Farm.collected)
end,
})
FarmStatusBox:CreateStatus({
Name = "Misses",
Style = "Stat",
UpdateRate = 0.5,
Update = function()
return tostring(Farm.misses)
end,
})
FarmStatusBox:CreateStatus({
Name = "Last prompt",
Style = "Row",
UpdateRate = 0.5,
Update = function()
if not Farm.lastPrompt then
return "none"
end
return "" .. safe(translate(Farm.lastPrompt)) .. ""
end,
})
HomeBox:CreateButtonRow({
Buttons = {
{
Name = "Save position",
Callback = function()
if saveHome() then
notify("Position", "Starting position saved", "Success")
pushLog("Starting position saved")
else
notify("Position", "Your character is not spawned yet", "Warning")
end
end,
},
{
Name = "Return now",
Callback = function()
if returnHome() then
pushLog("Back at the saved position")
else
notify("Position", "No saved position", "Warning")
end
end,
},
},
})
HomeBox:CreateStatus({
Name = "Home",
Style = "Row",
UpdateRate = 0.5,
Update = function()
if Farm.home then
return "saved"
end
return "not saved"
end,
})
----- Settings -----
local SettingsTab = Window:CreateTab({ Name = "Settings", Icon = "settings" })
SettingsTab:CreateConfigManager({ Name = "Configs", Side = "Left" })
SettingsTab:CreateThemeManager({ Name = "Theme", Side = "Right" })
local UnloadBox = SettingsTab:CreateGroupbox({ Name = "Unload", Side = "Left" })
UnloadBox:CreateButton({
Name = "Unload",
Desc = "Removes the hub and restores the game",
Icon = "power",
Style = "Primary",
Callback = function()
local api = getgenv().RobScriptFatalApes
if type(api) == "table" and type(api.Destroy) == "function" then
api.Destroy()
end
end,
})
----- Runtime -----
local alive = true
local function destroy()
if not alive then
return
end
alive = false
STOP = true
Farm.running = false
Farm.token = Farm.token + 1
for _, connection in ipairs(CONNECTIONS) do
pcall(function()
connection:Disconnect()
end)
end
CONNECTIONS = {}
pcall(clearEsp)
pcall(function()
Window:Destroy()
end)
if getgenv().RobScriptFatalApes then
getgenv().RobScriptFatalApes = nil
end
end
getgenv().RobScriptFatalApes = {
Destroy = destroy,
Version = "1.0",
Flags = Airflow.Flags,
Window = Window,
StartFarm = function()
if AutoFarmToggle then
pcall(function()
AutoFarmToggle:Set(true, true)
end)
end
return startFarm()
end,
StopFarm = function()
stopFarm("Manually stopped")
end,
SavePosition = saveHome,
ReturnHome = returnHome,
State = Farm,
Stats = Stats,
Esp = {
Monsters = monsterEsp,
Scraps = scrapEsp,
Refresh = espStep,
},
}
local espFailures = 0
task.spawn(function()
while not STOP do
local ok, failure = pcall(espStep)
if not ok then
espFailures = espFailures + 1
if espFailures <= 2 then
pushLog("ESP: " .. safe(failure) .. "")
end
end
task.wait(ESP_INTERVAL)
end
end)
track(LocalPlayer.CharacterAdded:Connect(function()
task.wait(1)
pushLog("Character respawned")
end))
Window:LoadAutoload()
pushLog("Hub loaded")
local monsterCount = #collectMonsters()
local scrapCount = #collectScraps()
if monsterCount == 0 then
pushLog("No monster folders found yet")
end
if scrapCount == 0 then
pushLog("No scrap folder found yet")
end
pushLog(translate("%d monsters, %d scraps in the map", monsterCount, scrapCount))
notify("Loaded", "Fatal Apes hub is ready", "Success")