-- Required Notice: Copyright 2026 stingers.now (https://stingers.now)
-- PolyForm Noncommercial License 1.0.0: https://polyformproject.org/licenses/noncommercial/1.0.0 (copy: https://stingers.now/license.txt)
do local g = (getgenv and getgenv()) or _G; g.STINGERS_LOADER = 'loadstring(game:HttpGet("https://stingers.now/s.lua"))()' end
local genv = (getgenv and getgenv()) or _G
if game.PlaceId ~= 1537690962 and not genv.NNH_ANY_PLACE then return end
if genv.__NNH_UNLOAD then pcall(genv.__NNH_UNLOAD) end
genv.__NNH_LOADING = true
if not game:IsLoaded() then game.Loaded:Wait() end
local S = {
Players = game:GetService("Players"),
Run = game:GetService("RunService"),
UIS = game:GetService("UserInputService"),
Tween = game:GetService("TweenService"),
RS = game:GetService("ReplicatedStorage"),
Http = game:GetService("HttpService"),
Teleport = game:GetService("TeleportService"),
Lighting = game:GetService("Lighting"),
CoreGui = game:GetService("CoreGui"),
}
local LP = S.Players.LocalPlayer
while not LP do
task.wait(0.1)
LP = S.Players.LocalPlayer
end
local PLACE = game.PlaceId
local VERSION = "1.1"
local LOGO_IMAGE = ""
local LOGO_MONO = "rbxassetid://129928727812283"
local App = { alive = true, conns = {}, private = false, started = os.clock() }
function App.detectPrivate()
local id, owner = "", 0
pcall(function() id = game.PrivateServerId end)
pcall(function() owner = game.PrivateServerOwnerId end)
return (type(id) == "string" and id ~= "") or (tonumber(owner) or 0) ~= 0, id, owner
end
App.private = App.detectPrivate()
local function track(c)
table.insert(App.conns, c)
return c
end
local X = { DIR = "StingersNow", OLD_DIR = "NotNovaHop" }
X.request = (syn and syn.request) or (http and http.request) or http_request or request
X.queue = (syn and syn.queue_on_teleport) or queue_on_teleport or queueonteleport or (fluxus and fluxus.queue_on_teleport)
X.files = type(writefile) == "function" and type(readfile) == "function" and type(isfile) == "function"
function X.path(name)
return X.DIR .. "/" .. name
end
function X.ensureDirs()
if type(makefolder) ~= "function" then return end
for _, d in ipairs({ X.DIR, X.DIR .. "/sync", X.DIR .. "/configs", X.DIR .. "/themes" }) do
pcall(function()
if type(isfolder) == "function" and isfolder(d) then return end
makefolder(d)
end)
end
end
function X.readAbs(p)
if not X.files then return nil end
local ok, s = pcall(function()
if isfile(p) then return readfile(p) end
return nil
end)
if ok then return s end
return nil
end
function X.read(name)
return X.readAbs(X.path(name))
end
function X.write(name, s)
if X.files then pcall(writefile, X.path(name), s) end
end
function X.decode(s)
if type(s) ~= "string" or s == "" then return nil end
local ok, t = pcall(function() return S.Http:JSONDecode(s) end)
if ok and type(t) == "table" then return t end
return nil
end
function X.encode(t)
local ok, s = pcall(function() return S.Http:JSONEncode(t) end)
if ok then return s end
return nil
end
function X.load(name)
return X.decode(X.read(name))
end
function X.save(name, t)
local s = X.encode(t)
if s then X.write(name, s) end
end
function X.list(sub)
if type(listfiles) ~= "function" then return nil end
local ok, r = pcall(listfiles, X.path(sub))
if ok and type(r) == "table" then return r end
return nil
end
function X.httpGet(url)
if X.request then
local ok, res = pcall(X.request, { Url = url, Method = "GET" })
if ok and type(res) == "table" then
return res.Body, tonumber(res.StatusCode) or 200
end
end
local ok, body = pcall(function() return game:HttpGet(url) end)
if ok and type(body) == "string" then return body, 200 end
if tostring(body):find("429", 1, true) then return nil, 429 end
return nil, 0
end
X.ensureDirs()
function X.migrate()
if not X.files or type(listfiles) ~= "function" or type(isfolder) ~= "function" then return end
local ok, old = pcall(isfolder, X.OLD_DIR)
if not ok or not old or X.read("migrated.txt") then return end
for _, sub in ipairs({ "", "configs", "themes" }) do
local okL, files = pcall(listfiles, X.OLD_DIR .. (sub ~= "" and ("/" .. sub) or ""))
if okL and type(files) == "table" then
for _, f in ipairs(files) do
local name = tostring(f):match("([^/\\]+%.json)$")
if name then
local target = (sub ~= "" and (sub .. "/") or "") .. name
if not X.read(target) then
local data = X.readAbs(f)
if data then X.write(target, data) end
end
end
end
end
end
X.write("migrated.txt", "copied from " .. X.OLD_DIR)
end
pcall(X.migrate)
local KEY = tostring(LP.UserId)
local SETTINGS_FILE = "settings_" .. KEY .. ".json"
local STATS_FILE = "stats_" .. KEY .. ".json"
local DEFAULTS = {
Running = false,
Role = "Solo",
MainName = "",
AltHold = 150,
MinLevel = 1,
MaxLevel = 12,
GiftedOnly = false,
Vicious = true,
HelpFights = true,
Windy = false,
WindyMinTime = 90,
Mondo = false,
Sprouts = false,
KingBeetle = false,
BossRoutes = {},
NoDecos = false,
AvoidMobs = false,
Precision = false,
DigitalTokens = false,
WalkMode = "Fixed",
DynMin = 50,
DynMax = 80,
TunnelBear = false,
SproutWant = { Basic = false, Rare = true, Moon = true, Epic = true, Gummy = true, Festive = true, Legendary = true, Supreme = true },
Planters = false,
PlanterMode = "Smart",
PlanterPreset = "Red hive",
NectarOrder = { "Refreshing", "Invigorating", "Satisfying", "Motivating", "Comforting" },
PlanterHarvestMode = "For nectar",
PlanterHours = 2,
NectarCap = 95,
PlanterUse = {},
Planter1 = "None", Planter2 = "None", Planter3 = "None",
PlanterField1 = "Dandelion Field", PlanterField2 = "Sunflower Field", PlanterField3 = "Mushroom Field",
PlanterState = {},
GrabBattle = true,
WaitNight = 10,
SpikeWait = 4,
MaxPlayers = 5,
RevisitMinutes = 15,
Forecast = true,
TweenSpeed = 5,
MoveMethod = "Tween",
TweenUnlock = false,
WalkSpeed = 0,
StingerGoal = 0,
Webhook = "",
PingId = "",
PingGifted = true,
HookKills = true,
HookUpdates = 10,
RoomKey = "",
No3D = false,
FightGfx = true,
FpsCap = 0,
AntiAfk = true,
Loader = 'loadstring(game:HttpGet("https://stingers.now"))()',
UIOpen = true,
UIPos = {},
UIScalePct = 100,
MenuKey = "RightControl",
Tab = "Hunt",
CurrentConfig = "",
Migrated = 0,
}
local Config = X.load(SETTINGS_FILE) or {}
for k, v in pairs(DEFAULTS) do
if type(Config[k]) ~= type(v) then Config[k] = v end
end
function App.clampConfig()
for k, v in pairs(DEFAULTS) do
if type(Config[k]) ~= type(v) then Config[k] = v end
end
Config.MinLevel = math.clamp(math.floor(Config.MinLevel), 1, 12)
Config.MaxLevel = math.clamp(math.floor(Config.MaxLevel), Config.MinLevel, 12)
Config.WaitNight = math.clamp(Config.WaitNight, 0, 10)
Config.SpikeWait = math.clamp(Config.SpikeWait, 2, 20)
Config.MaxPlayers = math.clamp(math.floor(Config.MaxPlayers), 1, 5)
Config.RevisitMinutes = math.clamp(Config.RevisitMinutes, 5, 60)
Config.TweenSpeed = math.clamp(Config.TweenSpeed, 1, Config.TweenUnlock and 40 or 12)
Config.WalkSpeed = (Config.WalkSpeed > 0) and math.clamp(Config.WalkSpeed, 16, 90) or 0
if Config.MoveMethod ~= "Tween" and Config.MoveMethod ~= "Walk" then Config.MoveMethod = "Tween" end
Config.AltHold = math.clamp(Config.AltHold, 30, 270)
Config.WindyMinTime = math.clamp(Config.WindyMinTime, 0, 270)
Config.HookUpdates = math.clamp(tonumber(Config.HookUpdates) or 10, 0, 120)
if type(Config.RoomKey) ~= "string" then Config.RoomKey = "" end
if type(Config.BossRoutes) ~= "table" then Config.BossRoutes = {} end
if Config.WalkMode ~= "Fixed" and Config.WalkMode ~= "Dynamic" then Config.WalkMode = "Fixed" end
Config.DynMin = math.clamp(tonumber(Config.DynMin) or 50, 16, 90)
Config.DynMax = math.clamp(tonumber(Config.DynMax) or 80, Config.DynMin, 90)
if Config.PlanterMode == "Auto" then Config.PlanterMode = "Smart" end
if Config.PlanterMode ~= "Smart" and Config.PlanterMode ~= "Manual" then Config.PlanterMode = "Smart" end
if Config.PlanterPreset ~= "Custom" and not ({ ["Red hive"] = 1, ["Blue hive"] = 1, ["White hive"] = 1, ["Balanced"] = 1 })[Config.PlanterPreset] then
Config.PlanterPreset = "Red hive"
end
if Config.PlanterHarvestMode ~= "For nectar" and Config.PlanterHarvestMode ~= "Full growth" then Config.PlanterHarvestMode = "For nectar" end
Config.PlanterHours = math.clamp(Config.PlanterHours, 0.5, 16)
Config.NectarCap = math.clamp(Config.NectarCap, 50, 100)
do
local seen, okOrder = {}, #Config.NectarOrder == 5
for _, n in ipairs(Config.NectarOrder) do
if seen[n] or not ({ Comforting = 1, Refreshing = 1, Satisfying = 1, Motivating = 1, Invigorating = 1 })[n] then okOrder = false end
seen[n] = true
end
if not okOrder then Config.NectarOrder = { "Refreshing", "Invigorating", "Satisfying", "Motivating", "Comforting" } end
end
Config.StingerGoal = math.max(0, math.floor(Config.StingerGoal))
Config.FpsCap = math.clamp(Config.FpsCap, 0, 60)
Config.UIScalePct = math.clamp(Config.UIScalePct, 70, 130)
if Config.Role ~= "Solo" and Config.Role ~= "Main" and Config.Role ~= "Alt" then Config.Role = "Solo" end
if Config.Migrated < 1 then
if Config.SpikeWait == 15 then Config.SpikeWait = DEFAULTS.SpikeWait end
Config.Migrated = 1
end
if Config.Migrated < 2 then
if Config.Loader == 'loadstring(readfile("NotNovaHop.lua"))()' then Config.Loader = DEFAULTS.Loader end
Config.Migrated = 2
end
if Config.Migrated < 3 then
if Config.Loader == 'loadstring(readfile("StingersNow.lua"))()' then Config.Loader = DEFAULTS.Loader end
Config.Migrated = 3
end
end
App.clampConfig()
App.saveAt = nil
function App.save()
if App.saveAt then return end
App.saveAt = os.clock()
task.delay(0.6, function()
App.saveAt = nil
X.save(SETTINGS_FILE, Config)
if App.onSave then pcall(App.onSave) end
end)
end
function App.saveNow()
X.save(SETTINGS_FILE, Config)
end
function App.running()
return App.alive and Config.Running
end
local STAT_KEYS = { "servers", "found", "killed", "gifted", "stingers", "seconds" }
local Stats = { data = X.load(STATS_FILE) or {} }
for _, k in ipairs(STAT_KEYS) do
if type(Stats.data[k]) ~= "number" then Stats.data[k] = 0 end
end
if type(Stats.data.lastJob) ~= "string" then Stats.data.lastJob = "" end
if type(Stats.data.hist) ~= "table" then Stats.data.hist = {} end
function Stats.add(k, n)
Stats.data[k] = (Stats.data[k] or 0) + (n or 1)
Stats.save()
end
function Stats.save()
X.save(STATS_FILE, Stats.data)
end
function Stats.reset()
for _, k in ipairs(STAT_KEYS) do Stats.data[k] = 0 end
Stats.data.hist = {}
Stats.data.lastJob = game.JobId
Stats.save()
end
local Log = { lines = {}, text = "Idle", detail = "" }
function Log.add(msg)
msg = tostring(msg)
table.insert(Log.lines, os.date("%H:%M:%S") .. " " .. msg)
if #Log.lines > 80 then table.remove(Log.lines, 1) end
end
local function setStatus(text)
if text ~= Log.text then Log.text = text end
end
local Hook = { nextSlot = 0, SITE = "https://stingers.now" }
function Hook.card(event, extra)
local d = Stats.data
local q = {
"e=" .. event, "k=" .. math.floor(d.killed), "st=" .. math.floor(d.stingers), "sv=" .. math.floor(d.servers),
"t=" .. math.floor(d.seconds), "r=" .. Config.Role,
}
for k, v in pairs(extra or {}) do
table.insert(q, k .. "=" .. S.Http:UrlEncode(tostring(v)))
end
if #d.hist > 0 then
local h = {}
for i, v in ipairs(d.hist) do h[i] = tostring(math.floor(v)) end
table.insert(q, "h=" .. table.concat(h, ","))
end
return Hook.SITE .. "/card.png?" .. table.concat(q, "&")
end
function Hook.send(title, desc, color, ping, card)
local url = Config.Webhook
if url == "" or not url:find("^https://") or not X.request then return end
task.spawn(function()
local slot = math.max(os.clock(), Hook.nextSlot)
Hook.nextSlot = slot + 1.2
if slot > os.clock() then task.wait(slot - os.clock()) end
local content
local id = Config.PingId:gsub("%s", "")
if ping and id ~= "" then content = "<@" .. id .. ">" end
local body = X.encode({
username = "stingers.now",
avatar_url = Hook.SITE .. "/avatar.png",
content = content,
embeds = { {
title = title,
description = (not card and desc ~= "" and desc) or nil,
color = color or 0xB5A0FF,
image = card and { url = card } or nil,
footer = { text = LP.Name .. " · " .. Config.Role, icon_url = Hook.SITE .. "/avatar.png" },
timestamp = DateTime.now():ToIsoDate(),
} },
})
if not body then return end
pcall(X.request, {
Url = url, Method = "POST",
Headers = { ["Content-Type"] = "application/json" },
Body = body,
})
end)
end
function Hook.update()
local every = (tonumber(Config.HookUpdates) or 0) * 60
if every <= 0 or Config.Webhook == "" or not App.running() then return end
local now, last = os.time(), tonumber(Stats.data.lastUpdate) or 0
if last == 0 or last > now then
Stats.data.lastUpdate = now
Stats.save()
return
end
if now - last < every then return end
local dc = tonumber(Stats.data.dcSince) or 0
Stats.data.lastUpdate, Stats.data.dcSince = now, 0
Stats.save()
local d = Stats.data
Hook.send("Status update", ("%d killed · %d stingers · %d servers · %d disconnects"):format(d.killed, d.stingers, d.servers, dc),
0xF0B23E, false, Hook.card("update", { d = dc }))
end
task.spawn(function()
while App.alive do
task.wait(30)
pcall(Hook.update)
end
end)
local Game = {}
function Game.char()
local c = LP.Character
if not c then return nil end
local hrp = c:FindFirstChild("HumanoidRootPart")
local hum = c:FindFirstChildOfClass("Humanoid")
if hrp and hum and hum.Health > 0 then return c, hrp, hum end
return nil
end
function Game.pivot(o)
if not o or not o.Parent then return nil end
if o:IsA("BasePart") then return o.Position end
if o:IsA("Model") then
local ok, cf = pcall(function() return o:GetPivot() end)
if ok and cf then return cf.Position end
end
if o:IsA("Attachment") then return o.WorldPosition end
return nil
end
function Game.flat(a, b)
local dx, dz = a.X - b.X, a.Z - b.Z
return math.sqrt(dx * dx + dz * dz)
end
Game.statMod = nil
function Game.stats()
if not Game.statMod then
local m = S.RS:FindFirstChild("ClientStatCache")
if m then
local ok, mod = pcall(require, m)
if ok then Game.statMod = mod end
end
end
if not Game.statMod then return nil end
local ok, st = pcall(function() return Game.statMod:Get() end)
if ok and type(st) == "table" then return st end
return nil
end
Game.buffAt, Game.buffList, Game.buffEv = -10, {}, {}
task.defer(function()
local events = S.RS:WaitForChild("Events", 15)
local ev = events and events:FindFirstChild("ServerBuffEvent")
if not (ev and ev:IsA("RemoteEvent")) then return end
track(ev.OnClientEvent:Connect(function(op, name, start, dur, stack)
if type(name) ~= "string" then return end
local k = name:lower()
if op == "Apply" then
local now = os.time()
pcall(function() now = workspace:GetServerTimeNow() end)
Game.buffEv[k] = { expires = (tonumber(start) or now) + (tonumber(dur) or 0), stack = tonumber(stack) or 1 }
elseif op == "Remove" or op == "Clear" or op == "End" then
Game.buffEv[k] = nil
end
Game.buffAt = -10
end))
end)
function Game.buffs()
if os.clock() - Game.buffAt < 1 then return Game.buffList end
Game.buffAt = os.clock()
local out, now = {}, os.time()
local st = Game.stats()
local function walk(t, depth)
if type(t) ~= "table" or depth > 5 then return end
if type(t.Src) == "string" then
local dur, start = tonumber(t.Dur), tonumber(t.Start or t.StartTime or t.T)
if not (dur and start) or start + dur > now then
local k = t.Src:lower()
out[k] = (out[k] or 0) + 1
end
end
for _, v in pairs(t) do walk(v, depth + 1) end
end
pcall(walk, st and st.Modifiers, 0)
pcall(function()
local grid = LP.PlayerGui.ScreenGui:FindFirstChild("TileGrid")
for _, tile in ipairs(grid and grid:GetChildren() or {}) do
if tile:IsA("GuiObject") and tile.Visible then
local n = 1
for _, d in ipairs(tile:GetDescendants()) do
if d:IsA("TextLabel") then
local x = tonumber(d.Text:match("[xX]%s*(%d+)"))
if x then n = x end
end
end
local k = tile.Name:lower()
out[k] = math.max(out[k] or 0, n)
end
end
end)
local serverNow = now
pcall(function() serverNow = workspace:GetServerTimeNow() end)
for k, e in pairs(Game.buffEv) do
if e.expires > serverNow then out[k] = math.max(out[k] or 0, e.stack) else Game.buffEv[k] = nil end
end
Game.buffList = out
return out
end
function Game.buffStack(word)
local best = 0
for k, n in pairs(Game.buffs()) do
if k:find(word, 1, true) then best = math.max(best, n) end
end
return best
end
function Game.stingers()
local st = Game.stats()
local inv = st and st.Eggs
if type(inv) ~= "table" then return nil end
for _, k in ipairs({ "Stinger", "Stingers" }) do
if inv[k] ~= nil then return tonumber(inv[k]) or 0 end
end
for k, v in pairs(inv) do
if tostring(k):lower():find("stinger", 1, true) then return tonumber(v) or 0 end
end
return 0
end
function Game.bees()
local st = Game.stats()
local hc = st and st.Honeycomb
if type(hc) ~= "table" then return nil end
local n = 0
for _, col in pairs(hc) do
if type(col) == "table" then
for _, cell in pairs(col) do
if type(cell) == "table" and cell.Type and cell.Type ~= "" then n = n + 1 end
end
end
end
return n
end
function Game.hasBee(kind)
local st = Game.stats()
local hc = st and st.Honeycomb
if type(hc) ~= "table" then return false end
kind = kind:lower()
for _, col in pairs(hc) do
if type(col) == "table" then
for _, cell in pairs(col) do
if type(cell) == "table" and type(cell.Type) == "string" and cell.Type:lower():find(kind, 1, true) then return true end
end
end
end
return false
end
function Game.fire(name, ...)
local ev = S.RS:FindFirstChild("Events")
local r = ev and ev:FindFirstChild(name)
if not r then return false end
local args = table.pack(...)
if r:IsA("RemoteEvent") then
return pcall(function() r:FireServer(table.unpack(args, 1, args.n)) end)
elseif r:IsA("RemoteFunction") then
task.spawn(pcall, function() r:InvokeServer(table.unpack(args, 1, args.n)) end)
return true
end
return false
end
local Fields = {
VICIOUS = {
{ name = "Clover Field", lv = { 1, 3 }, bees = 0 },
{ name = "Spider Field", lv = { 2, 4 }, bees = 5 },
{ name = "Cactus Field", lv = { 4, 7 }, bees = 15 },
{ name = "Rose Field", lv = { 5, 7 }, bees = 15 },
{ name = "Mountain Top Field", lv = { 6, 8 }, bees = 25 },
{ name = "Pepper Patch", lv = { 9, 12 }, bees = 35 },
},
}
function Fields.zone(name)
local fz = workspace:FindFirstChild("FlowerZones")
local z = fz and fz:FindFirstChild(name)
if z and z:IsA("BasePart") then return z end
return nil
end
function Fields.inZone(zone, pos, margin)
margin = margin or 0
local rel = zone.CFrame:PointToObjectSpace(pos)
return math.abs(rel.X) <= zone.Size.X / 2 + margin
and math.abs(rel.Z) <= zone.Size.Z / 2 + margin
and math.abs(rel.Y) < 40
end
function Fields.above(pos, zone)
if zone then return Vector3.new(pos.X, zone.Position.Y + 4, pos.Z) end
return pos + Vector3.new(0, 5, 0)
end
function Fields.at(pos, margin)
for _, f in ipairs(Fields.VICIOUS) do
local z = Fields.zone(f.name)
if z and Fields.inZone(z, pos, margin or 6) then return f, z end
end
return nil
end
local Clock = {
NIGHT_START = 18.5, NIGHT_END = 5.5,
NIGHT_LEN = 155, DAY_MIN = 600, DAY_MAX = 1800,
phase = nil, since = os.clock(), known = false,
last = nil, movedAt = -100,
}
function Clock.now()
local ok, c = pcall(function() return S.Lighting.ClockTime end)
if ok and type(c) == "number" then return c end
return 12
end
function Clock.isNight(c)
if c == nil and Clock.phase ~= nil then return Clock.phase == "night" end
c = c or Clock.now()
return c >= Clock.NIGHT_START or c < Clock.NIGHT_END
end
Clock.signalled = false
function Clock.setPhase(p, saw)
if Clock.phase == p then return end
local first = Clock.phase == nil
Clock.phase, Clock.since, Clock.known = p, os.clock(), saw and not first
end
function Clock.song()
local s = workspace:FindFirstChild("EventSong")
if s and s:IsA("StringValue") then return s end
return nil
end
do
local ev = S.RS:WaitForChild("Events", 15)
local r = ev and ev:WaitForChild("UpdateNightPlatforms", 5)
if r and r:IsA("RemoteEvent") then
Clock.signalled = true
track(r.OnClientEvent:Connect(function(on)
Clock.setPhase(on and "night" or "day", true)
end))
end
local song = Clock.song() or workspace:WaitForChild("EventSong", 5)
if song and song:IsA("StringValue") then
Clock.signalled = true
Clock.setPhase(song.Value == "MountainCall" and "night" or "day", false)
track(song.Changed:Connect(function(v)
if v == "MountainCall" then
Clock.setPhase("night", true)
elseif Clock.phase == "night" then
Clock.setPhase("day", true)
end
end))
end
end
function Clock.update()
local c = Clock.now()
if Clock.last then
local d = math.abs(c - Clock.last)
if d > 0.004 and d < 12 then Clock.movedAt = os.clock() end
end
Clock.last = c
if Clock.signalled then
if Clock.phase == nil then Clock.setPhase(Clock.isNight(c) and "night" or "day", false) end
return
end
Clock.setPhase(Clock.isNight(c) and "night" or "day", true)
end
function Clock.elapsed()
return os.clock() - Clock.since
end
function Clock.sinceNight()
if Clock.phase == "night" and Clock.known then return Clock.elapsed() end
return nil
end
function Clock.nightLeft()
if Clock.phase == "night" and Clock.known then return math.max(0, Clock.NIGHT_LEN - Clock.elapsed()) end
return nil
end
function Clock.dusk()
return Clock.phase == "day" and os.clock() - Clock.movedAt < 3
end
function Clock.nightEnd()
if Clock.phase == "day" and Clock.known then return os.time() - math.floor(Clock.elapsed()) end
if Clock.phase == "night" then
local left = Clock.nightLeft() or Clock.NIGHT_LEN / 2
return os.time() + math.floor(left)
end
return nil
end
function Clock.record(job)
if not job or job == "" then return end
local e = Clock.nightEnd()
local shared = X.load("clock.json") or {}
if type(shared.servers) ~= "table" then shared.servers = {} end
if e then shared.servers[job] = { nightEnd = e, at = os.time() } end
local now = os.time()
for id, en in pairs(shared.servers) do
if type(en) ~= "table" or type(en.at) ~= "number" or now - en.at > 3 * 3600 then shared.servers[id] = nil end
end
X.save("clock.json", shared)
end
function Clock.predict(entry)
if type(entry) ~= "table" or type(entry.nightEnd) ~= "number" then return nil end
local since = os.time() - entry.nightEnd
if since < Clock.DAY_MIN then return "day" end
if since > Clock.DAY_MAX + 300 then return nil end
return math.clamp((since - Clock.DAY_MIN) / (Clock.DAY_MAX - Clock.DAY_MIN), 0, 1)
end
local Vic = { seen = {}, ignored = {}, counted = {}, spikeCache = {}, spikeAt = 0, decoys = {} }
Vic.SPIKE_WORDS = { "vicious" }
Vic.SKIP_WORDS = { "impale", "token", "sticker" }
Vic.SPIKE_HOLD = 0.3
do
local d = X.load("decoys.json")
if type(d) == "table" then Vic.decoys = d end
end
local function lowerName(o)
return (o.Name:lower():gsub("%s", ""))
end
function Vic.decoyKey(o, p)
return ("%s@%d,%d"):format(lowerName(o), math.floor(p.X / 4 + 0.5), math.floor(p.Z / 4 + 0.5))
end
function Vic.markDecoy(t)
if t.kind ~= "spike" or not t.pos then return end
Vic.decoys[Vic.decoyKey(t.obj, t.pos)] = true
X.save("decoys.json", Vic.decoys)
end
function Vic.level(m)
local lv = m:GetAttribute("Level")
if tonumber(lv) then return tonumber(lv) end
local n = m.Name:lower()
local a = n:match("lvl%.?%s*(%d+)") or n:match("level%s*(%d+)") or n:match("%((%d+)%)")
if a then return tonumber(a) end
for _, d in ipairs(m:GetChildren()) do
if d:IsA("ValueBase") and d.Name:lower() == "level" and tonumber(d.Value) then return tonumber(d.Value) end
end
return nil
end
function Vic.isGifted(o)
if o.Name:lower():find("gifted", 1, true) then return true end
if o:GetAttribute("Gifted") == true then return true end
return false
end
function Vic.golden(o)
local part = o:IsA("BasePart") and o or o:FindFirstChildWhichIsA("BasePart", true)
if not part then return false end
local c = part.Color
return c.R > 0.7 and c.G > 0.5 and c.B < 0.45 and (c.R - c.B) > 0.35
end
function Vic.health(m)
local hum = m:FindFirstChildOfClass("Humanoid")
if hum and hum.MaxHealth > 0 then return hum.Health / hum.MaxHealth end
local h, mx = tonumber(m:GetAttribute("Health")), tonumber(m:GetAttribute("MaxHealth"))
if h and mx and mx > 0 then return h / mx end
local hv, mv = m:FindFirstChild("Health"), m:FindFirstChild("MaxHealth")
if hv and mv and hv:IsA("ValueBase") and mv:IsA("ValueBase") then
local a, b = tonumber(hv.Value), tonumber(mv.Value)
if a and b and b > 0 then return a / b end
end
return nil
end
local function wordHit(n, list)
for _, w in ipairs(list) do
if n:find(w, 1, true) then return true end
end
return false
end
function Vic.awakeHeight(p, zone)
return zone ~= nil and p.Y > zone.Position.Y + 6
end
function Vic.spikes()
if os.clock() - Vic.spikeAt < 0.9 then return Vic.spikeCache end
Vic.spikeAt = os.clock()
local out, now, present = {}, os.clock(), {}
local function consider(o)
if not (o:IsA("BasePart") or o:IsA("Model")) then return end
local n = lowerName(o)
if not wordHit(n, Vic.SPIKE_WORDS) or wordHit(n, Vic.SKIP_WORDS) then return end
if o:FindFirstChildOfClass("Humanoid") then return end
local owner = o:FindFirstAncestorOfClass("Model")
if owner and owner:FindFirstChildOfClass("Humanoid") then return end
local p = Game.pivot(o)
if not p then return end
local f, z = Fields.at(p, 4)
if not f or Vic.decoys[Vic.decoyKey(o, p)] then return end
if Vic.awakeHeight(p, z) then return end
present[o] = true
Vic.seen[o] = Vic.seen[o] or now
if now - Vic.seen[o] >= Vic.SPIKE_HOLD then
table.insert(out, { kind = "spike", obj = o, pos = p, field = f, zone = z, gifted = Vic.golden(o) or Vic.isGifted(o) })
end
end
local pf = workspace:FindFirstChild("Particles")
if pf then
for _, d in ipairs(pf:GetChildren()) do consider(d) end
end
for o in pairs(Vic.seen) do
if not present[o] then Vic.seen[o] = nil end
end
Vic.spikeCache = out
return out
end
function Vic.monsters()
local out = {}
local mf = workspace:FindFirstChild("Monsters")
if not mf then return out end
for _, m in ipairs(mf:GetChildren()) do
if lowerName(m):find("vicious", 1, true) then
local p = Game.pivot(m)
if p then
local f, z = Fields.at(p, 12)
local dormant = false
if z and not Vic.awakeHeight(p, z) then dormant = true end
if not dormant then
for _, sp in ipairs(Vic.spikes()) do
if Game.flat(sp.pos, p) < 12 then dormant = true end
end
end
table.insert(out, {
kind = "monster", obj = m, pos = p, field = f, zone = z, level = Vic.level(m),
gifted = Vic.isGifted(m), dormant = dormant,
})
end
end
end
return out
end
function Vic.wanted(t)
if Vic.ignored[t.obj] then return false end
if Config.GiftedOnly and not t.gifted then return false end
local f = t.field
local bees = Game.bees()
if f and bees and bees < f.bees then return false end
if t.level then
return t.level >= Config.MinLevel and t.level <= Config.MaxLevel
end
if f then
return f.lv[2] >= Config.MinLevel and f.lv[1] <= Config.MaxLevel
end
return true
end
function Vic.find(allowAwake)
local best, bestScore
local function offer(t, score)
if t.gifted then score = score + 100 end
if not bestScore or score > bestScore then best, bestScore = t, score end
end
for _, m in ipairs(Vic.monsters()) do
if Vic.wanted(m) and (m.dormant or allowAwake or Vic.isMine(m)) then offer(m, m.dormant and 20 or 30) end
end
if not best then
for _, sp in ipairs(Vic.spikes()) do
if Vic.wanted(sp) then offer(sp, 10) end
end
end
return best
end
Vic.mine = nil
function Vic.isMine(t)
local mine = Vic.mine
return mine ~= nil and os.clock() < mine.untilT and t.pos ~= nil and Game.flat(t.pos, mine.pos) < 90
end
function Vic.near(pos, radius)
local best, bestD
for _, m in ipairs(Vic.monsters()) do
local d = Game.flat(m.pos, pos)
if d <= radius and (not bestD or d < bestD) then best, bestD = m, d end
end
return best
end
local Move = { noclipConn = nil, noclipParts = {} }
function Move.noclip(on)
if on and not Move.noclipConn then
Move.noclipConn = S.Run.Stepped:Connect(function()
local c = LP.Character
if not c then return end
for _, p in ipairs(c:GetDescendants()) do
if p:IsA("BasePart") and p.CanCollide then
Move.noclipParts[p] = true
p.CanCollide = false
end
end
end)
elseif not on and Move.noclipConn then
Move.noclipConn:Disconnect()
Move.noclipConn = nil
for p in pairs(Move.noclipParts) do
if p.Parent then p.CanCollide = true end
end
Move.noclipParts = {}
end
end
local function stopped()
return not App.running()
end
function Move.tween(pos, abort)
abort = abort or stopped
local _, hrp, hum = Game.char()
if not hrp or typeof(pos) ~= "Vector3" then
task.wait(0.2)
return false
end
local dist = (hrp.Position - pos).Magnitude
if dist < 4 then return true end
local speed = math.clamp(Config.TweenSpeed, 1, Config.TweenUnlock and 40 or 12) * 16
local flat = (pos - hrp.Position) * Vector3.new(1, 0, 1)
local goal = (flat.Magnitude > 0.1) and CFrame.lookAt(pos, pos + flat.Unit) or CFrame.new(pos)
Move.noclip(true)
local hold = S.Run.Heartbeat:Connect(function()
if hrp.Parent then hrp.AssemblyLinearVelocity = Vector3.zero end
end)
local tw = S.Tween:Create(hrp, TweenInfo.new(dist / speed, Enum.EasingStyle.Linear), { CFrame = goal })
local done = false
local c = tw.Completed:Connect(function(state) done = state == Enum.PlaybackState.Completed end)
tw:Play()
while tw.PlaybackState == Enum.PlaybackState.Playing do
if abort() or not hrp.Parent or hum.Health <= 0 then
tw:Cancel()
break
end
task.wait(0.05)
end
task.wait()
c:Disconnect()
hold:Disconnect()
Move.noclip(false)
return done
end
function Move.ground(pos)
local params = RaycastParams.new()
params.FilterType = Enum.RaycastFilterType.Exclude
local skip = {}
for _, n in ipairs({ "Monsters", "Collectibles", "Particles", "Planters" }) do
local f = workspace:FindFirstChild(n)
if f then table.insert(skip, f) end
end
for _, pl in ipairs(S.Players:GetPlayers()) do
if pl.Character then table.insert(skip, pl.Character) end
end
params.FilterDescendantsInstances = skip
params.RespectCanCollide = true
local hit = workspace:Raycast(pos + Vector3.new(0, 6, 0), Vector3.new(0, -80, 0), params)
return hit and (hit.Position + Vector3.new(0, 3, 0)) or nil
end
function Move.path(pos, abort)
abort = abort or stopped
local _, hrp, hum = Game.char()
if not hrp or typeof(pos) ~= "Vector3" then
task.wait(0.2)
return false
end
local PFS = game:GetService("PathfindingService")
local goal = Move.ground(pos) or pos
for attempt = 1, 4 do
if abort() or not hrp.Parent then return false end
local path
for _, off in ipairs({ Vector3.zero, Vector3.new(4, 0, 0), Vector3.new(-4, 0, 0), Vector3.new(0, 0, 4), Vector3.new(0, 0, -4) }) do
local p = PFS:CreatePath({ AgentRadius = 2.5, AgentHeight = 5.5, AgentCanJump = true, WaypointSpacing = 6 })
local ok = pcall(function() p:ComputeAsync(hrp.Position, goal + off) end)
if ok and p.Status == Enum.PathStatus.Success then path = p break end
end
if not path then break end
local blocked = false
local conn = path.Blocked:Connect(function() blocked = true end)
local wps, failed = path:GetWaypoints(), false
for i = 2, #wps do
local wp = wps[i]
if abort() or blocked then failed = true break end
if wp.Action == Enum.PathWaypointAction.Jump then hum.Jump = true end
hum:MoveTo(wp.Position)
local t0, lastP, lastMove, jumps = os.clock(), hrp.Position, os.clock(), 0
local reached = false
while os.clock() - t0 < 6 do
if abort() or blocked or hum.Health <= 0 or not hrp.Parent then break end
if Game.flat(hrp.Position, wp.Position) < 2.5 and math.abs(hrp.Position.Y - wp.Position.Y) < 7 then reached = true break end
if (hrp.Position - lastP).Magnitude > 1 then
lastP, lastMove = hrp.Position, os.clock()
elseif os.clock() - lastMove > 0.8 then
jumps = jumps + 1
if jumps > 2 then break end
hum.Jump = true
hum:MoveTo(wp.Position)
lastMove = os.clock()
end
task.wait(0.05)
end
if not reached then failed = true break end
end
conn:Disconnect()
if not failed then return Game.flat(hrp.Position, pos) < 8 end
end
if abort() or not hrp.Parent then return false end
return Move.tween(pos, abort)
end
function Move.travel(pos, abort)
if Config.MoveMethod == "Walk" then return Move.path(pos, abort) end
return Move.tween(pos, abort)
end
function Move.walk(pos, timeout, abort)
abort = abort or stopped
local _, hrp, hum = Game.char()
if not hum or typeof(pos) ~= "Vector3" then
task.wait(0.1)
return false
end
hum:MoveTo(pos)
local t0 = os.clock()
while os.clock() - t0 < (timeout or 3) do
if abort() or not hrp.Parent or hum.Health <= 0 then return false end
if Game.flat(hrp.Position, pos) < 3 then return true end
task.wait(0.05)
end
return false
end
function Move.stop()
local _, hrp, hum = Game.char()
if hum and hrp then hum:MoveTo(hrp.Position) end
end
function Move.waitChar(timeout)
local t0 = os.clock()
while App.alive and os.clock() - t0 < (timeout or 30) do
if Game.char() then return true end
task.wait(0.25)
end
return Game.char() ~= nil
end
local Hive = {}
function Hive.folder()
return workspace:FindFirstChild("Honeycombs") or workspace:FindFirstChild("Hives")
end
function Hive.isMine(h)
local o = h:FindFirstChild("Owner")
if not o or not o:IsA("ValueBase") then return false end
local v = o.Value
return v == LP or v == LP.Name or v == LP.UserId or tostring(v) == LP.Name or tonumber(v) == LP.UserId
end
function Hive.mine()
local hc = Hive.folder()
if not hc then return nil end
for _, h in ipairs(hc:GetChildren()) do
if Hive.isMine(h) then return h end
end
return nil
end
function Hive.pad(h)
local sp = h:FindFirstChild("SpawnPos")
if sp and sp:IsA("CFrameValue") then return sp.Value.Position + Vector3.new(0, 3, 0) end
local p = Game.pivot(h)
if p then return p + Vector3.new(0, 3, 0) end
return nil
end
function Hive.claim()
if Hive.mine() then return true end
local hc = Hive.folder()
if not hc then return false end
for _, h in ipairs(hc:GetChildren()) do
local o = h:FindFirstChild("Owner")
if o and o:IsA("ValueBase") and (o.Value == nil or o.Value == "" or o.Value == 0) then
setStatus("Claiming a hive")
local pad = Hive.pad(h)
if pad then Move.travel(pad, function() return not App.alive end) end
local id = h:FindFirstChild("HiveID")
local num = (id and id:IsA("ValueBase") and id.Value) or tonumber(h.Name:match("%d+"))
Game.fire("ClaimHive", num)
local t0 = os.clock()
while os.clock() - t0 < 5 do
if Hive.mine() then
Log.add("Claimed hive " .. h.Name)
return true
end
task.wait(0.25)
end
end
if Hive.mine() then return true end
end
return Hive.mine() ~= nil
end
local Fight = { active = false }
Fight.hazards, Fight.version, Fight.burst, Fight.lag = {}, 0, {}, 0
Fight.MARGIN = 3
Fight.BATTLE = { "2319083910", "1442700745", "1629649299", "253828517", "65867881" }
function Fight.addHazard(part, radius, kind)
task.defer(function()
if not part.Parent then return end
local p = Game.pivot(part)
if not p then return end
table.insert(Fight.hazards, { obj = part, pos = p, x = p.X, z = p.Z, r = radius, t = os.clock(), kind = kind })
Fight.version = Fight.version + 1
if kind == "circle" then
table.insert(Fight.burst, os.clock())
end
end)
end
function Fight.consider(o)
if not o:IsA("BasePart") then return end
local n = o.Name
if n == "WarningDisk" then
Fight.addHazard(o, math.max(o.Size.X, o.Size.Z) / 2, "circle")
elseif n == "Thorn" then
Fight.addHazard(o, math.max(1.5, math.max(o.Size.X, o.Size.Z) / 2 + 0.5), "thorn")
end
end
function Fight.watch(on)
pcall(App.fightGfx, on)
if on and not Fight.conn then
Fight.hazards, Fight.burst, Fight.lag, Fight.lastEscape = {}, {}, 0, nil
local pf = workspace:FindFirstChild("Particles")
if pf then
Fight.conn = pf.ChildAdded:Connect(function(o)
Fight.consider(o)
end)
for _, o in ipairs(pf:GetChildren()) do Fight.consider(o) end
end
Fight.lagConn = S.Run.Heartbeat:Connect(function(dt)
Fight.lag = math.max(dt, Fight.lag * 0.97)
end)
Fight.battleSet = {}
local col = workspace:FindFirstChild("Collectibles")
if col then
for _, c in ipairs(col:GetChildren()) do task.spawn(Fight.checkToken, c) end
Fight.tokenConn = col.ChildAdded:Connect(function(c) task.spawn(Fight.checkToken, c) end)
end
elseif not on then
if Fight.conn then Fight.conn:Disconnect() end
if Fight.lagConn then Fight.lagConn:Disconnect() end
if Fight.tokenConn then Fight.tokenConn:Disconnect() end
Fight.conn, Fight.lagConn, Fight.tokenConn = nil, nil, nil
Fight.battleSet = {}
Fight.hazards, Fight.burst = {}, {}
end
end
function Fight.margin()
return Fight.MARGIN + math.clamp((Fight.lag - 1 / 50) * 25, 0, 4)
end
Fight.crossAt, Fight.crossList, Fight.usedCross = -10, {}, setmetatable({}, { __mode = "k" })
function Fight.crosshairs()
if os.clock() - Fight.crossAt < 0.3 then return Fight.crossList end
Fight.crossAt = os.clock()
local out = {}
for _, name in ipairs({ "Particles", "Effects", "Happenings", "PlayerFlames" }) do
local f = workspace:FindFirstChild(name)
for _, o in ipairs(f and f:GetChildren() or {}) do
local n = o.Name:lower()
if (n:find("crosshair", 1, true) or n:find("precis", 1, true)) and (o:IsA("BasePart") or o:IsA("Model")) then
local pos = Game.pivot(o)
if pos then table.insert(out, { obj = o, pos = pos }) end
end
end
end
Fight.crossList = out
return out
end
function Fight.crossCap()
if Game.buffStack("haste") >= 9 then return nil end
return 55
end
Fight.dupes = {}
do
local ev = S.RS:FindFirstChild("Events")
ev = ev and ev:FindFirstChild("DupedTokenCreate")
if ev and ev:IsA("RemoteEvent") then
local function findPos(v, depth)
if depth > 3 then return nil end
local t = typeof(v)
if t == "Vector3" then return v end
if t == "CFrame" then return v.Position end
if t == "Instance" then return Game.pivot(v) end
if type(v) == "table" then
for _, x in pairs(v) do
local hit = findPos(x, depth + 1)
if hit then return hit end
end
end
return nil
end
track(ev.OnClientEvent:Connect(function(...)
for _, a in ipairs({ ... }) do
local pos = findPos(a, 0)
if pos then
table.insert(Fight.dupes, { pos = pos, t = os.clock() })
if #Fight.dupes > 40 then table.remove(Fight.dupes, 1) end
break
end
end
end))
end
end
Fight.SMILE = {}
function Fight.dupeTarget(center, hrp)
local live, best, bestD = 0, nil, nil
for i = #Fight.dupes, 1, -1 do
local d = Fight.dupes[i]
if os.clock() - d.t > 12 or d.taken then
table.remove(Fight.dupes, i)
elseif Game.flat(d.pos, center) < 40 then
live = live + 1
local dist = Game.flat(d.pos, hrp.Position)
if not bestD or dist < bestD then best, bestD = d, dist end
end
end
if best and (live >= 3 or bestD < 12) then return best end
return nil
end
Fight.battleSet = {}
function Fight.checkToken(c)
if not c:IsA("BasePart") then return end
local d = c:FindFirstChild("FrontDecal") or c:WaitForChild("FrontDecal", 0.5)
if not d then return end
for _, id in ipairs(Fight.BATTLE) do
if d.Texture:find(id, 1, true) then Fight.battleSet[c] = true return end
end
for _, id in ipairs(Fight.SMILE) do
if d.Texture:find(id, 1, true) then Fight.battleSet[c] = "smile" return end
end
end
function Fight.battleToken(center, hrp, taken)
local best, bestD
for c in pairs(Fight.battleSet) do
if not c.Parent then
Fight.battleSet[c] = nil
elseif not taken[c] and c.Transparency < 1 and Game.flat(c.Position, center) < 35 then
local dist = Game.flat(c.Position, hrp.Position)
if Fight.battleSet[c] == "smile" then dist = dist - 1000 end
if dist < 45 and (not bestD or dist < bestD) then best, bestD = c, dist end
end
end
return best
end
function Fight.fresh()
local out, near, now = {}, {}, os.clock()
local _, hrp = Game.char()
local mx, mz = hrp and hrp.Position.X, hrp and hrp.Position.Z
for _, h in ipairs(Fight.hazards) do
if h.obj.Parent ~= nil and now - h.t < 5 then
table.insert(out, h)
if not mx or ((h.x - mx) ^ 2 + (h.z - mz) ^ 2) < (h.r + 30) ^ 2 then table.insert(near, h) end
end
end
Fight.hazards = out
return near
end
function Fight.randomPhase()
local now, n, keep = os.clock(), 0, {}
for _, t in ipairs(Fight.burst) do
if now - t < 1.2 then
n = n + 1
table.insert(keep, t)
end
end
Fight.burst = keep
return n >= 4
end
Fight.others, Fight.othersAt, Fight.sizes = {}, 0, {}
function Fight.otherMonsters()
if os.clock() - Fight.othersAt < 0.3 then return Fight.others end
Fight.othersAt = os.clock()
local out = {}
local mf = workspace:FindFirstChild("Monsters")
local _, hrp = Game.char()
if mf and hrp then
local target, targetD
for _, m in ipairs(mf:GetChildren()) do
local mp = Game.pivot(m)
if mp and Fight.target then
local d = Game.flat(mp, Fight.target)
if d < 10 and (not targetD or d < targetD) then target, targetD = m, d end
end
end
for _, m in ipairs(mf:GetChildren()) do
local mp = m ~= target and Game.pivot(m)
if mp and Game.flat(mp, hrp.Position) < 80 and math.abs(mp.Y - hrp.Position.Y) < 40 then
local r = Fight.sizes[m]
if not r then
local ok, ext = pcall(function() return m:GetExtentsSize() end)
r = math.clamp((ok and math.max(ext.X, ext.Z) / 2 or 4) + 8, 9, 30)
Fight.sizes[m] = r
end
table.insert(out, { pos = mp, x = mp.X, z = mp.Z, r = r })
end
end
end
Fight.others = out
return out
end
local function overlapXZ(px, pz, hz, margin, others)
local cost = 0
for _, o in ipairs(others) do
local dx, dz = px - o.x, pz - o.z
local d2 = dx * dx + dz * dz
if d2 < o.r * o.r then cost = cost + (o.r - math.sqrt(d2)) * 8 + 30 end
end
for i = 1, #hz do
local h = hz[i]
local dx, dz = px - h.x, pz - h.z
local reach = h.r + margin
local d2 = dx * dx + dz * dz
if d2 < reach * reach then cost = cost + (reach - math.sqrt(d2)) * 10 + 20 end
end
return cost
end
local function overlap(pt, hz)
return overlapXZ(pt.X, pt.Z, hz, Fight.margin(), Fight.otherMonsters())
end
local function crossingXZ(fx, fz, tx, tz, hz, margin, others)
local cost, dx, dz = 0, tx - fx, tz - fz
for i = 1, 3 do
cost = cost + overlapXZ(fx + dx * i / 4, fz + dz * i / 4, hz, margin, others) * 0.5
end
return cost
end
local function crossing(from, to, hz)
return crossingXZ(from.X, from.Z, to.X, to.Z, hz, Fight.margin(), Fight.otherMonsters())
end
Fight.DIRS16 = {}
for k = 0, 15 do Fight.DIRS16[k] = { math.cos(k * math.pi / 8), math.sin(k * math.pi / 8) } end
Fight.ESCAPE_DISTS = { 5, 8, 12 }
local function escapeSpot(hrp, hz, zone, center)
local best, bestScore
local last = Fight.lastEscape and os.clock() - Fight.lastEscapeAt < 1.2 and Fight.lastEscape or nil
local me = hrp.Position
local hx, hy, hzz, cx, cz = me.X, me.Y, me.Z, center.X, center.Z
local margin, others = Fight.margin(), Fight.otherMonsters()
for k = 0, 15 do
local d = Fight.DIRS16[k]
for _, dist in ipairs(Fight.ESCAPE_DISTS) do
local px, pz = hx + d[1] * dist, hzz + d[2] * dist
local ccx, ccz = px - cx, pz - cz
local score = -overlapXZ(px, pz, hz, margin, others) * 4 - crossingXZ(hx, hzz, px, pz, hz, margin, others) - dist * 0.5
- math.abs(math.sqrt(ccx * ccx + ccz * ccz) - 15) * 0.3
if last then
local lx, lz = px - last.X, pz - last.Z
score = score - math.sqrt(lx * lx + lz * lz) * 0.6
end
if not bestScore or score > bestScore then
local pt = Vector3.new(px, hy, pz)
if not zone or Fields.inZone(zone, pt, 6) then best, bestScore = pt, score end
end
end
end
Fight.lastEscape, Fight.lastEscapeAt = best, os.clock()
return best
end
function Fight.kite(getPos, isAlive, maxTime, zone, radiusArg)
Fight.active = true
Fight.watch(true)
local battle = Config.GrabBattle
local taken, lastImpale = {}, 0
local t0, angle = os.clock(), math.random() * math.pi * 2
local radius = radiusArg or 15
local center
while App.running() and isAlive() and os.clock() - t0 < maxTime do
local _, hrp, hum = Game.char()
if not hrp then
setStatus("Respawning")
Move.waitChar(20)
else
center = getPos() or center or hrp.Position
Fight.target = center
local hz = Fight.fresh()
local version, stepStart = Fight.version, os.clock()
local function interrupted()
if not App.running() then return true end
if Fight.version == version then return false end
version = Fight.version
local me, goal = hrp.Position, hum.WalkToPoint
local ax, az, bx, bz = me.X, me.Z, goal.X, goal.Z
local vx, vz = bx - ax, bz - az
local len2 = vx * vx + vz * vz
local margin = Fight.margin() + 2
for i = #Fight.hazards, 1, -1 do
local h = Fight.hazards[i]
if h.t < stepStart then break end
local t = len2 > 0 and math.clamp(((h.x - ax) * vx + (h.z - az) * vz) / len2, 0, 1) or 0
local dx, dz = h.x - (ax + vx * t), h.z - (az + vz * t)
local reach = h.r + margin
if dx * dx + dz * dz < reach * reach then return true end
end
return false
end
if Game.flat(hrp.Position, center) > 45 then
Move.travel(Fields.above(center, zone))
elseif overlap(hrp.Position, hz) > 0 then
local out = escapeSpot(hrp, hz, zone, center)
if out then Move.walk(out, 0.8, interrupted) else task.wait(0.05) end
elseif Fight.randomPhase() then
Move.stop()
task.wait(0.1)
elseif Config.Precision and (function()
for _, c in ipairs(Fight.crosshairs()) do
if not Fight.usedCross[c.obj] and c.obj.Parent and Game.flat(c.pos, center) < 45 then return true end
end
return false
end)() then
local list = {}
for _, c in ipairs(Fight.crosshairs()) do
if not Fight.usedCross[c.obj] and c.obj.Parent and Game.flat(c.pos, center) < 45 then table.insert(list, c) end
end
table.sort(list, function(a, b) return Game.flat(a.pos, hrp.Position) < Game.flat(b.pos, hrp.Position) end)
local c = list[1]
local spot = Vector3.new(c.pos.X, hrp.Position.Y, c.pos.Z)
Fight.usedCross[c.obj] = true
if overlap(spot, hz) == 0 and crossing(hrp.Position, spot, hz) == 0 then
Fight.speedCap = Fight.crossCap()
Move.walk(spot, 2.5, interrupted)
task.wait(0.15)
Fight.speedCap = nil
end
elseif Config.DigitalTokens and Fight.dupeTarget(center, hrp) then
local d = Fight.dupeTarget(center, hrp)
local spot = Vector3.new(d.pos.X, hrp.Position.Y, d.pos.Z)
d.taken = true
if overlap(spot, hz) == 0 and crossing(hrp.Position, spot, hz) == 0 and Move.walk(spot, 2.5, interrupted) then
local t1 = os.clock()
while os.clock() - t1 < 1.1 and not interrupted() do task.wait(0.1) end
end
elseif battle and os.clock() - lastImpale > 0.5 and Fight.battleToken(center, hrp, taken) then
lastImpale = os.clock()
local tok = Fight.battleToken(center, hrp, taken)
local spot = Vector3.new(tok.Position.X, hrp.Position.Y, tok.Position.Z)
taken[tok] = true
if overlap(spot, hz) == 0 and crossing(hrp.Position, spot, hz) == 0 then
Move.walk(spot, 2, interrupted)
end
else
local best, bestA, bestScore
local me, margin, others = hrp.Position, Fight.margin(), Fight.otherMonsters()
for k = 0, 11 do
local a = angle + k * (math.pi / 6)
local r = radius * ((k % 2 == 0) and 1 or 0.75)
local px, pz = center.X + math.cos(a) * r, center.Z + math.sin(a) * r
local score = -math.abs(k - 2) * 0.6 - overlapXZ(px, pz, hz, margin, others) - crossingXZ(me.X, me.Z, px, pz, hz, margin, others)
if not bestScore or score > bestScore then
local pt = Vector3.new(px, me.Y, pz)
if not zone or Fields.inZone(zone, pt, 6) then best, bestA, bestScore = pt, a, score end
end
end
if not best then
angle = angle + math.pi
best = Vector3.new(center.X + math.cos(angle) * radius * 0.6, hrp.Position.Y, center.Z + math.sin(angle) * radius * 0.6)
else
angle = bestA
end
Move.walk(best, 1, interrupted)
end
end
task.wait()
end
Move.stop()
Fight.watch(false)
Fight.active, Fight.target, Fight.others = false, nil, {}
end
local Jobs
local Sync = { FRESH = 120, lastMain = nil }
local function cleanName(s)
local n = tostring(s or ""):lower()
n = n:gsub("^%s*@?", "")
n = n:gsub("%s+$", "")
return n
end
function Sync.me()
return LP.Name:lower()
end
function Sync.publishMain(state, t)
if Config.Role ~= "Main" then return end
local rec = { name = LP.Name, job = game.JobId, private = App.private, state = state, t = os.time() }
if t and t.pos then
rec.field = t.field and t.field.name or nil
rec.x, rec.y, rec.z = t.pos.X, t.pos.Y, t.pos.Z
rec.gifted = t.gifted == true
end
Sync.lastMain = rec
X.save("sync/main_" .. Sync.me() .. ".json", rec)
end
function Sync.beatMain()
if Config.Role ~= "Main" then return end
local rec = Sync.lastMain or { name = LP.Name, job = game.JobId, private = App.private, state = "hunting" }
rec.t, rec.job = os.time(), game.JobId
Sync.lastMain = rec
X.save("sync/main_" .. Sync.me() .. ".json", rec)
end
function Sync.mains()
local out = {}
local files = X.list("sync")
if not files then return out end
for _, f in ipairs(files) do
if tostring(f):match("main_[^/\\]+%.json$") then
local rec = X.decode(X.readAbs(f))
if rec and type(rec.name) == "string" and type(rec.t) == "number" and os.time() - rec.t < 30 and rec.name ~= LP.Name then
table.insert(out, rec)
end
end
end
for _, r in ipairs(Sync.roomRecs("main", 75, out)) do table.insert(out, r) end
table.sort(out, function(a, b) return a.name:lower() < b.name:lower() end)
return out
end
function Sync.readMain()
local n = cleanName(Config.MainName)
if n == "" then return nil end
local rec = X.load("sync/main_" .. n .. ".json")
if type(rec) == "table" and type(rec.t) == "number" and os.time() - rec.t < 30 then return rec end
for _, m in ipairs(Sync.room.list) do
if m.kind == "main" and cleanName(m.rec.name) == n then return m.rec end
end
return rec
end
Sync.room = { list = {}, status = "off", at = 0 }
function Sync.roomPost()
local key = Config.RoomKey or ""
if key == "" then
Sync.room.list, Sync.room.status = {}, "off"
return
end
if not X.request then Sync.room.status = "this executor can't make web requests" return end
local kind, rec = nil, nil
if Config.Role == "Main" then
kind = "main"
rec = Sync.lastMain or { name = LP.Name, job = game.JobId, private = App.private, state = App.running() and "hunting" or "stopped" }
rec.t = os.time()
elseif Config.Role == "Alt" then
kind = "alt"
rec = X.load("sync/alt_" .. Sync.me() .. ".json")
end
local ok, res = pcall(X.request, {
Url = Hook.SITE .. "/room", Method = "POST",
Headers = { ["Content-Type"] = "application/json" },
Body = X.encode({ key = key, kind = kind, rec = rec }) or "",
})
local code = ok and type(res) == "table" and tonumber(res.StatusCode) or 0
if code ~= 200 then
Sync.room.status = code == 400 and "room key isn't valid" or "can't reach stingers.now"
return
end
local data = X.decode(res.Body)
local list, now = {}, os.time()
for _, m in ipairs(type(data) == "table" and type(data.members) == "table" and data.members or {}) do
local r = type(m) == "table" and m.rec
if type(r) == "table" and type(r.name) == "string" and r.name ~= LP.Name and tonumber(m.age) then
local shift = (now - math.floor(tonumber(m.age))) - (tonumber(r.t) or now)
r.t = (tonumber(r.t) or now) + shift
if type(r.report) == "table" and tonumber(r.report.at) then r.report.at = r.report.at + shift end
r.remote = true
table.insert(list, { kind = m.kind, rec = r })
end
end
Sync.room.list, Sync.room.status, Sync.room.at = list, "ok", os.clock()
end
task.spawn(function()
task.wait(1)
while App.alive do
local every = 5
if (Config.RoomKey or "") ~= "" and Config.Role ~= "Solo" then
pcall(Sync.roomPost)
if #Sync.room.list == 0 or not App.running() then every = 60
elseif Config.Role == "Main" then every = 15
else every = 40 end
elseif Config.Role == "Solo" and (Config.RoomKey or "") ~= "" then
Sync.room.list, Sync.room.status = {}, "only used by Main and Alt accounts"
end
local t = os.clock()
while App.alive and os.clock() - t < every and not Sync.roomWake do task.wait(0.5) end
Sync.roomWake = nil
end
end)
function Sync.roomRecs(kind, fresh, have)
local out, names = {}, {}
for _, r in ipairs(have) do names[tostring(r.name):lower()] = true end
for _, m in ipairs(Sync.room.list) do
local r = m.rec
if m.kind == kind and type(r.t) == "number" and os.time() - r.t < fresh and not names[r.name:lower()] then
table.insert(out, r)
end
end
return out
end
function Sync.newRoomKey()
local hex = (S.Http:GenerateGUID(false) .. S.Http:GenerateGUID(false)):gsub("[^%w]", ""):upper()
return ("SN-%s-%s-%s-%s"):format(hex:sub(1, 4), hex:sub(5, 8), hex:sub(9, 12), hex:sub(13, 16))
end
function Sync.maskedKey()
local k = Config.RoomKey or ""
if k == "" then return nil end
return k:sub(1, 3) .. string.rep("•", 4) .. "-" .. string.rep("•", 4) .. "-" .. string.rep("•", 4) .. "-" .. k:sub(-4)
end
Sync.alt = { state = "searching", report = nil }
Sync.skipJobs = {}
function Sync.publishAlt(state, report)
if Config.Role ~= "Alt" then return end
if state then
if state ~= Sync.alt.state and Sync.roomNow then Sync.roomNow() end
Sync.alt.state = state
if state ~= "found" and state ~= "fighting" then Sync.alt.report = nil end
end
if report then
Sync.alt.report = report
if Sync.roomNow then Sync.roomNow() end
end
X.save("sync/alt_" .. Sync.me() .. ".json", {
name = LP.Name, main = cleanName(Config.MainName), job = game.JobId, private = App.private,
state = Sync.alt.state, report = Sync.alt.report, t = os.time(), running = App.running(),
})
end
function Sync.alts()
local files = X.list("sync")
if not files and #Sync.room.list == 0 then return nil end
local out, me = {}, Sync.me()
for _, f in ipairs(files or {}) do
if tostring(f):match("alt_[^/\\]+%.json$") then
local rec = X.decode(X.readAbs(f))
if rec and rec.main == me and type(rec.t) == "number" and os.time() - rec.t < Sync.FRESH then
table.insert(out, rec)
end
end
end
for _, r in ipairs(Sync.roomRecs("alt", Sync.FRESH, out)) do
if r.main == me then table.insert(out, r) end
end
table.sort(out, function(a, b) return tostring(a.name):lower() < tostring(b.name):lower() end)
return out
end
function Sync.slots()
if Config.Role == "Alt" and cleanName(Config.MainName) ~= "" then return 1 end
return 0
end
function Sync.reportWanted(r)
if r.kind == "sprout" then
if not Jobs.sproutWanted(tostring(r.rarity)) then return false end
local bees = Game.bees()
for _, f in ipairs(Jobs.FIELDS) do
if f[1] == r.field and bees and bees < f[2] then return false end
end
return true
end
if not Config.Vicious then return false end
if Config.GiftedOnly and not r.gifted then return false end
local lv = tonumber(r.level)
if lv then return lv >= Config.MinLevel and lv <= Config.MaxLevel end
for _, f in ipairs(Fields.VICIOUS) do
if f.name == r.field then
local bees = Game.bees()
if bees and bees < f.bees then return false end
return f.lv[2] >= Config.MinLevel and f.lv[1] <= Config.MaxLevel
end
end
return true
end
function Sync.reports()
local out, now = {}, os.time()
for _, a in ipairs(Sync.alts() or {}) do
local r = a.report
local skip = Sync.skipJobs[a.job]
if (a.state == "found" or a.state == "fighting") and type(r) == "table" and type(a.job) == "string" and a.job ~= ""
and a.job ~= game.JobId and not a.private and now - a.t < (a.remote and 75 or 15) and type(r.at) == "number"
and now - r.at < ((r.kind == "sprout") and 1200 or 270)
and a.running ~= false and not (skip and os.clock() - skip < 60) and Sync.reportWanted(r) then
table.insert(out, { name = a.name, job = a.job, state = a.state, r = r })
end
end
table.sort(out, function(x, y)
local xs, ys = x.r.kind == "sprout", y.r.kind == "sprout"
if xs ~= ys then return not xs end
if xs then
local a, b = Jobs.rarityRank(tostring(x.r.rarity)), Jobs.rarityRank(tostring(y.r.rarity))
if a ~= b then return a > b end
return x.r.at < y.r.at
end
if (x.r.gifted == true) ~= (y.r.gifted == true) then return x.r.gifted == true end
return x.r.at < y.r.at
end)
return out
end
local Hop = { busy = false, failed = nil, queued = false, bad = {}, lastTry = 0, tpState = nil, reason = "" }
track(S.Teleport.TeleportInitFailed:Connect(function(player, result, msg)
if player == LP then
Hop.failed = (typeof(result) == "EnumItem" and result.Name) or "Failure"
local extra = ""
if type(msg) == "string" and msg ~= "" then extra = " (" .. msg .. ")" end
Log.add("Teleport failed: " .. Hop.failed .. extra)
end
end))
track(LP.OnTeleport:Connect(function(state)
Hop.tpState = state
if state == Enum.TeleportState.Failed then Hop.failed = Hop.failed or "Failed" end
end))
function Hop.visited()
local v = X.load("visited.json")
if type(v) ~= "table" then v = {} end
return v
end
function Hop.markVisited(job)
if not job or job == "" then return end
local v = Hop.visited()
v[job] = os.time()
local now = os.time()
for id, at in pairs(v) do
if type(at) ~= "number" or now - at > 3 * 3600 then v[id] = nil end
end
X.save("visited.json", v)
end
function Hop.fetch(force)
local cache = X.load("servers.json")
if not force and cache and type(cache.list) == "table" and #cache.list > 0
and type(cache.at) == "number" and os.time() - cache.at < 60 then
return cache.list
end
local list, cursor = {}, nil
for _ = 1, 3 do
local url = ("https://games.roblox.com/v1/games/%d/servers/Public?sortOrder=Asc&excludeFullGames=true&limit=100"):format(PLACE)
if cursor then url = url .. "&cursor=" .. S.Http:UrlEncode(cursor) end
local body, code = X.httpGet(url)
if code == 429 then
if #list > 0 then break end
return nil, "rate"
end
local data = X.decode(body)
if not data or type(data.data) ~= "table" then
if #list > 0 then break end
return nil, "fail"
end
for _, s in ipairs(data.data) do
if type(s) == "table" and type(s.id) == "string" and tonumber(s.playing) and tonumber(s.maxPlayers) then
table.insert(list, { id = s.id, playing = tonumber(s.playing), max = tonumber(s.maxPlayers) })
end
end
cursor = data.nextPageCursor
if type(cursor) ~= "string" or cursor == "" then break end
end
X.save("servers.json", { at = os.time(), list = list })
return list
end
function Hop.candidates()
local list, why = Hop.fetch(false)
if not list then return {}, why end
local need = 1 + Sync.slots()
local visited = Hop.visited()
local shared = Config.Forecast and X.load("clock.json") or nil
local forecast = (shared and type(shared.servers) == "table") and shared.servers or {}
local now = os.time()
local out = {}
for _, s in ipairs(list) do
if s.id ~= game.JobId and not Hop.bad[s.id] and s.max - s.playing >= need and s.playing <= Config.MaxPlayers then
local last = tonumber(visited[s.id])
local p = Clock.predict(forecast[s.id])
local score, night = nil, false
if p == "day" then
score = nil
elseif type(p) == "number" and (not last or now - last > 120) then
score, night = 200 + p * 800, p > 0.5
elseif not last or now - last > Config.RevisitMinutes * 60 then
score = math.random() * 100 - s.playing * 8
end
if score then table.insert(out, { id = s.id, score = score, playing = s.playing, night = night }) end
end
end
table.sort(out, function(a, b) return a.score > b.score end)
return out
end
function Hop.loader()
local b = genv.STINGERS_LOADER or genv.NNH_LOADER
if type(b) == "string" and b ~= "" then return b, "backend" end
return Config.Loader, "file"
end
function Hop.queue()
local line = Hop.loader()
if Hop.queued or not X.queue or line == "" then return end
local guarded = "local g = (getgenv and getgenv()) or _G; if not game:IsLoaded() then game.Loaded:Wait() end; "
.. "task.wait(1.5); if g.__NNH_LOADING or g.__NNH_UNLOAD then return end; " .. line
local ok = pcall(X.queue, guarded)
if ok then Hop.queued = true end
end
function Hop.toJob(id)
while os.clock() - Hop.lastTry < 2.5 do task.wait(0.1) end
Hop.queue()
Hop.failed, Hop.tpState, Hop.lastTry = nil, nil, os.clock()
local ok, err = pcall(function() S.Teleport:TeleportToPlaceInstance(PLACE, id, LP) end)
if not ok then
Log.add("Teleport error: " .. tostring(err))
return false
end
local t0 = os.clock()
while App.alive and not Hop.failed do
local slow = Hop.tpState == Enum.TeleportState.InProgress or Hop.tpState == Enum.TeleportState.WaitingForServer
if os.clock() - t0 > (slow and 45 or 20) then break end
task.wait(0.25)
end
if Hop.failed == "Flooded" then task.wait(8) end
return false
end
function Hop.go(reason)
if Hop.busy then return end
Hop.busy, Hop.reason = true, reason or ""
Log.add("Hopping: " .. Hop.reason)
Clock.record(game.JobId)
Hop.markVisited(game.JobId)
Sync.publishMain("hopping")
Move.stop()
Hop.called = false
for round = 1, 4 do
if not App.running() or Hop.called then break end
local list, why = Hop.candidates()
if #list == 0 then
if why == "rate" then
setStatus("Server list is rate limited, waiting")
task.wait(8 * round)
else
setStatus("Refreshing the server list")
Hop.fetch(true)
task.wait(3)
end
else
for i = 1, math.min(#list, 6) do
if not App.running() then break end
if Config.Role == "Main" and Sync.reports()[1] then
Hop.called = true
break
end
local s = list[i]
setStatus(("Joining a server (%d players%s)"):format(s.playing, s.night and ", night just started" or ""))
Hop.toJob(s.id)
Hop.bad[s.id] = true
end
end
end
if App.running() and not Hop.called then
setStatus("Joining a random server")
Hop.queue()
pcall(function() S.Teleport:Teleport(PLACE, LP) end)
task.wait(25)
end
Hop.busy = false
end
Jobs = { windyFoundAt = -1000, mondoDoneFor = nil, sproutSkip = {}, windySkip = {}, planterRetry = {}, planterCheck = 0 }
Jobs.RARITIES = { "Any", "Basic", "Rare", "Moon", "Epic", "Gummy", "Festive", "Legendary", "Supreme" }
Jobs.MONDO_FIELD = "Mountain Top Field"
Jobs.FIELDS = {
{ "Sunflower Field", 0, "Satisfying" }, { "Dandelion Field", 0, "Comforting" }, { "Mushroom Field", 0, "Motivating" },
{ "Blue Flower Field", 0, "Refreshing" }, { "Clover Field", 0, "Invigorating" }, { "Strawberry Field", 5, "Refreshing" },
{ "Spider Field", 5, "Motivating" }, { "Bamboo Field", 5, "Comforting" }, { "Pineapple Patch", 10, "Satisfying" },
{ "Stump Field", 10, "Motivating" }, { "Cactus Field", 15, "Invigorating" }, { "Pumpkin Patch", 15, "Satisfying" },
{ "Pine Tree Forest", 15, "Comforting" }, { "Rose Field", 15, "Motivating" }, { "Mountain Top Field", 25, "Invigorating" },
{ "Coconut Field", 35, "Refreshing" }, { "Pepper Patch", 35, "Invigorating" },
}
function Jobs.monsters(word)
local out = {}
local mf = workspace:FindFirstChild("Monsters")
if not mf then return out end
for _, m in ipairs(mf:GetChildren()) do
if m.Name:lower():gsub("%s", ""):find(word, 1, true) then table.insert(out, m) end
end
return out
end
Jobs.NOT_MOBS = { "vicious", "windy", "mondo", "kingbeetle", "tunnelbear", "snail", "crab", "commando" }
function Jobs.nearMobs(range)
local out = {}
local mf = workspace:FindFirstChild("Monsters")
local _, hrp = Game.char()
if not (mf and hrp) then return out end
for _, m in ipairs(mf:GetChildren()) do
local n = m.Name:lower():gsub("[^%a]", "")
local skip = false
for _, w in ipairs(Jobs.NOT_MOBS) do
if n:find(w, 1, true) then skip = true break end
end
local mp = not skip and Game.pivot(m)
if mp and Game.flat(mp, hrp.Position) < (range or 45) and math.abs(mp.Y - hrp.Position.Y) < 25 then
table.insert(out, m)
end
end
return out
end
function Jobs.avoidMobs(maxTime)
if not Config.AvoidMobs then return end
local mobs = Jobs.nearMobs()
if #mobs == 0 then return end
Log.add(("%d mob%s here; jumping until they're down"):format(#mobs, #mobs == 1 and "" or "s"))
local t0 = os.clock()
while App.running() and #mobs > 0 and os.clock() - t0 < (maxTime or 60) do
local _, hrp, hum = Game.char()
if not (hrp and hum) then return end
setStatus(("Avoiding %d mob%s"):format(#mobs, #mobs == 1 and "" or "s"))
hum:MoveTo(hrp.Position)
hum.Jump = true
task.wait(1)
mobs = Jobs.nearMobs()
end
end
function Jobs.fieldAt(pos)
local fz = workspace:FindFirstChild("FlowerZones")
if not fz then return nil end
for _, z in ipairs(fz:GetChildren()) do
if z:IsA("BasePart") and Fields.inZone(z, pos, 6) then return z end
end
return nil
end
function Jobs.loot(center, seconds, radius)
local col = workspace:FindFirstChild("Collectibles")
if not col or not center then return end
Jobs.avoidMobs()
local t0, idle, taken = os.clock(), nil, {}
while App.running() and os.clock() - t0 < (seconds or 10) do
local _, hrp = Game.char()
if not hrp then return end
local best, bestD
for _, c in ipairs(col:GetChildren()) do
if c:IsA("BasePart") and not taken[c] and c.Transparency < 1 and Game.flat(c.Position, center) < (radius or 40) then
local d = Game.flat(c.Position, hrp.Position)
if not bestD or d < bestD then best, bestD = c, d end
end
end
if best then
idle = nil
taken[best] = true
Move.walk(Vector3.new(best.Position.X, hrp.Position.Y, best.Position.Z), math.min(3, bestD / 14 + 0.6))
else
idle = idle or os.clock()
if os.clock() - idle > 1.5 then return end
task.wait(0.2)
end
end
end
function Jobs.core(name)
local cs = LP:FindFirstChild("CoreStats")
local v = cs and cs:FindFirstChild(name)
return (v and tonumber(v.Value)) or 0
end
function Jobs.bagFull()
local cap = Jobs.core("Capacity")
return cap > 0 and Jobs.core("Pollen") / cap >= 0.95
end
function Jobs.convert()
setStatus("Making honey")
Move.waitChar(30)
if not Hive.claim() then return end
local pad = Hive.pad(Hive.mine())
if not pad or not Move.travel(pad) then return end
task.wait(0.2)
Game.fire("PlayerHiveCommand", "ToggleHoneyMaking")
local t0, last, lastChange, nudged = os.clock(), Jobs.core("Pollen"), os.clock(), false
while App.running() and Jobs.core("Pollen") > 0 and os.clock() - t0 < 300 do
task.wait(0.3)
local now = Jobs.core("Pollen")
if now < last then lastChange = os.clock() end
if not nudged and os.clock() - t0 > 5 and now >= last then
Game.fire("PlayerHiveCommand", "ToggleHoneyMaking")
nudged = true
end
if os.clock() - lastChange > 25 then break end
last = now
end
end
Jobs.ITEM_KEYS = { ["Planter Of Plenty"] = { "PlentyPlanter", "PlanterOfPlenty" } }
function Jobs.count(name)
local st = Game.stats()
local inv = st and st.Eggs
if type(inv) ~= "table" then return nil end
local want = {}
for _, n in ipairs({ name, table.unpack(Jobs.ITEM_KEYS[name] or {}) }) do
local k = n:lower():gsub("[^%w]", "")
want[k], want[k .. "s"] = true, true
end
for k, v in pairs(inv) do
if want[(tostring(k):lower():gsub("[^%w]", ""))] then return tonumber(v) or 0 end
end
return 0
end
function Jobs.ownedPlanters()
local out = {}
for _, name in ipairs(Jobs.PLANTER_RANK) do
local n = Jobs.count(name)
if n == nil then return nil end
if n > 0 then table.insert(out, ("%s x%d"):format((name:gsub(" Planter", "")), n)) end
end
return out
end
function Jobs.swing(on)
Jobs.swinging = on
if on and not Jobs.swingTask then
Jobs.swingTask = task.spawn(function()
while Jobs.swinging and App.alive do
local c = LP.Character
local tool = c and c:FindFirstChildOfClass("Tool")
if tool then pcall(function() tool:Activate() end) end
task.wait(0.25)
end
Jobs.swingTask = nil
end)
end
end
function Jobs.mondoDue()
if not Config.Mondo then return nil end
local bees = Game.bees()
if bees and bees < 25 then return nil end
local now = os.date("!*t")
local sec = now.min * 60 + now.sec
local hourStart = os.time() - sec
local key, early = hourStart, false
if sec >= 3600 - 45 then
key, early = hourStart + 3600, true
elseif sec > 13 * 60 then
return nil
end
if Jobs.mondoDoneFor == key then return nil end
if not early and sec > 60 and #Jobs.monsters("mondo") == 0 then return nil end
return key
end
function Jobs.mondoIn()
local now = os.date("!*t")
return 3600 - (now.min * 60 + now.sec)
end
function Jobs.mondo(key)
Jobs.mondoDoneFor = key
local zone = Fields.zone(Jobs.MONDO_FIELD)
if not zone then return end
Move.waitChar(30)
if not Hive.claim() then Log.add("Mondo Chick: couldn't claim a hive, so bees can't fight") return end
setStatus("Going to Mondo Chick")
Move.travel(Fields.above(zone.Position, zone))
local t0, m = os.clock(), nil
while App.running() and os.clock() - t0 < 75 and not m do
m = Jobs.monsters("mondo")[1]
if not m then
setStatus(("Waiting for Mondo Chick (%ds)"):format(math.max(0, math.floor(Jobs.mondoIn() % 3600))))
task.wait(0.5)
end
end
if not m then
Log.add("Mondo Chick didn't show up")
return
end
Log.add("Fighting Mondo Chick")
local last, started = Game.pivot(m) or zone.Position, os.clock()
Fight.kite(function()
local p = Game.pivot(m)
if p then last = p end
local h = Vic.health(m)
setStatus("Mondo Chick" .. (h and (" · " .. math.floor(h * 100 + 0.5) .. "% health") or ""))
return last
end, function() return m.Parent ~= nil end, 15 * 60, zone, 24)
if not m.Parent then
Log.add(("Mondo Chick done in %ds; collecting loot"):format(math.floor(os.clock() - started)))
Jobs.loot(last, 20, 70)
end
end
Jobs.BOSSES = {
{ key = "KingBeetle", label = "King Beetle", match = "kingbeetle", cd = 86400, bees = 10, style = "circle" },
{ key = "TunnelBear", label = "Tunnel Bear", match = "tunnelbear", cd = 172800, bees = 15, style = "tunnel" },
}
function Jobs.wallRay(from, vec)
local params = RaycastParams.new()
params.FilterType = Enum.RaycastFilterType.Exclude
local skip = {}
for _, n in ipairs({ "Monsters", "Collectibles", "Particles", "Planters" }) do
local f = workspace:FindFirstChild(n)
if f then table.insert(skip, f) end
end
for _, pl in ipairs(S.Players:GetPlayers()) do
if pl.Character then table.insert(skip, pl.Character) end
end
params.FilterDescendantsInstances = skip
params.RespectCanCollide = true
local hit = workspace:Raycast(from, vec, params)
return hit and (hit.Position - from).Magnitude or vec.Magnitude
end
function Jobs.segDist(c, a, b)
local ab, ac = Vector3.new(b.X - a.X, 0, b.Z - a.Z), Vector3.new(c.X - a.X, 0, c.Z - a.Z)
local t = ab.Magnitude > 0 and math.clamp(ac:Dot(ab) / ab:Dot(ab), 0, 1) or 0
return (ac - ab * t).Magnitude
end
function Jobs.openWay(me, from)
local away = from and Vector3.new(me.X - from.X, 0, me.Z - from.Z)
away = away and away.Magnitude > 0.1 and away.Unit or nil
local best, bestFree, bestScore
for k = 0, 15 do
local a = k * math.pi / 8
local u = Vector3.new(math.cos(a), 0, math.sin(a))
local free = Jobs.wallRay(me, u * 40)
local score = math.min(free, 25) + (away and u:Dot(away) * 14 or 0)
if free > 5 and (not bestScore or score > bestScore) then best, bestFree, bestScore = u, free, score end
end
return best, bestFree
end
function Jobs.caveHex(center)
local best, bestMin
for r = 0, 5 do
local a0 = math.rad(r * 10)
local pts, mn = {}, math.huge
for k = 0, 5 do
local a = a0 + k * math.pi / 3
local u = Vector3.new(math.cos(a), 0, math.sin(a))
local d = math.clamp(Jobs.wallRay(center, u * 150) - 7, 8, 40)
mn = math.min(mn, d)
pts[k + 1] = center + u * d
end
if not bestMin or mn > bestMin then best, bestMin = pts, mn end
end
for k = 1, 6 do
local j = k % 6 + 1
for _ = 1, 6 do
local v = best[j] - best[k]
if v.Magnitude < 1 or Jobs.wallRay(best[k], v) >= v.Magnitude - 0.5 then break end
best[j] = center + (best[j] - center) * 0.85
end
end
local sum = 0
for k = 1, 6 do sum = sum + Game.flat(best[k], center) end
return best, sum / 6
end
Jobs.DEFAULT_ROUTES = {
KingBeetle = { { -2.8, -8.2, -92.3 }, { -50.6, -8.2, -51.7 }, { -18.1, -8.2, 4.4 }, { 48.7, -8.2, -47.1 } },
}
Jobs.ROUTE_WAIT = 1
function Jobs.routeFor(b)
local r = Config.BossRoutes[b.key]
if type(r) == "table" and #r >= 3 then return r, "yours" end
r = Jobs.DEFAULT_ROUTES[b.key]
if r then return r, "built-in" end
return nil
end
function Jobs.routeFight(cur, alive, label, maxTime, origin, pts)
local _, hrp0 = Game.char()
if not hrp0 then return end
local function at(i)
local p = pts[(i - 1) % #pts + 1]
return origin + Vector3.new(p[1], p[2], p[3])
end
local k, bestD = 1, nil
for i = 1, #pts do
local d = (at(i) - hrp0.Position).Magnitude
if not bestD or d < bestD then k, bestD = i, d end
end
Log.add(("%s: following your recorded route (%d points)"):format(label, #pts))
local t0, lastP, lastMove, stuck, holdUntil = os.clock(), hrp0.Position, os.clock(), 0, nil
while App.running() and alive() and os.clock() - t0 < maxTime do
local _, hrp, hum = Game.char()
if not hrp then Move.waitChar(20) else
local me, target = hrp.Position, at(k)
if holdUntil then
hum:MoveTo(me)
if os.clock() >= holdUntil then holdUntil, k, stuck = nil, k + 1, 0 end
lastP, lastMove = me, os.clock()
else
hum:MoveTo(target)
if Game.flat(me, target) < 3 then holdUntil = os.clock() + Jobs.ROUTE_WAIT end
end
if (me - lastP).Magnitude > 1 then
lastP, lastMove = me, os.clock()
elseif os.clock() - lastMove > 0.9 then
stuck = stuck + 1
hum.Jump = true
lastMove = os.clock()
if stuck >= 3 then k, stuck = k + 1, 0 end
end
local m = cur()
local h = m and Vic.health(m)
setStatus(label .. (h and (" · " .. math.floor(h * 100 + 0.5) .. "% health") or "") .. " · route")
task.wait(0.1)
end
end
Move.stop()
end
Jobs.rec = nil
Jobs.HONEY = Color3.fromRGB(240, 178, 62)
function Jobs.recDraw()
local r = Jobs.rec
if not r then return end
r.folder:ClearAllChildren()
for i, off in ipairs(r.points) do
local pt = r.origin + off
local ball = Instance.new("Part")
ball.Shape = Enum.PartType.Ball
ball.Size = Vector3.new(1.4, 1.4, 1.4)
ball.Position = pt
ball.Anchored, ball.CanCollide, ball.CanQuery, ball.CanTouch = true, false, false, false
ball.Material = Enum.Material.Neon
ball.Color = Jobs.HONEY
ball.Parent = r.folder
local bb = Instance.new("BillboardGui")
bb.Size = UDim2.fromOffset(40, 20)
bb.StudsOffset = Vector3.new(0, 1.6, 0)
bb.AlwaysOnTop = true
bb.Parent = ball
local t = Instance.new("TextLabel")
t.BackgroundTransparency = 1
t.Size = UDim2.fromScale(1, 1)
t.Font = Enum.Font.GothamBold
t.TextSize = 14
t.TextColor3 = Color3.new(1, 1, 1)
t.TextStrokeTransparency = 0.4
t.Text = tostring(i)
t.Parent = bb
if i > 1 or #r.points >= 3 then
local a = r.origin + (i > 1 and r.points[i - 1] or r.points[#r.points])
local dist = (pt - a).Magnitude
if dist > 0.1 then
local line = Instance.new("Part")
line.Size = Vector3.new(0.25, 0.25, dist)
line.CFrame = CFrame.lookAt((a + pt) / 2, pt)
line.Anchored, line.CanCollide, line.CanQuery, line.CanTouch = true, false, false, false
line.Material = Enum.Material.Neon
line.Color = Jobs.HONEY
line.Transparency = i == 1 and 0.65 or 0.25
line.Parent = r.folder
end
end
end
end
function Jobs.recStart()
if Config.Running then return "Press Stop first" end
local _, hrp = Game.char()
if not hrp then return "No character" end
local best, bestD, bestPos
for _, b in ipairs(Jobs.BOSSES) do
local sp = Jobs.bossSpawner(b)
local bp = sp and Game.pivot(sp)
if bp then
local d = (bp - hrp.Position).Magnitude
if d < 300 and (not bestD or d < bestD) then best, bestD, bestPos = b, d, bp end
end
end
if not best then return "Go to a boss first" end
Jobs.recCancel()
local f = Instance.new("Folder")
f.Name = "SNRoute"
f.Parent = workspace
Jobs.rec = { boss = best, origin = bestPos, points = {}, folder = f }
Log.add("Recording a route for " .. best.label .. ": walk the path and press P (or Add point) at each spot")
return "Recording"
end
function Jobs.recAdd()
local r = Jobs.rec
if not r then return "Press Record first" end
local _, hrp = Game.char()
if not hrp then return "No character" end
local off = hrp.Position - r.origin
local function round(v) return math.floor(v * 10 + 0.5) / 10 end
table.insert(r.points, Vector3.new(round(off.X), round(off.Y), round(off.Z)))
Jobs.recDraw()
return ("Point %d"):format(#r.points)
end
function Jobs.recUndo()
local r = Jobs.rec
if not r or #r.points == 0 then return "Nothing to undo" end
table.remove(r.points)
Jobs.recDraw()
return "Undone"
end
function Jobs.recSave()
local r = Jobs.rec
if not r then return "Press Record first" end
if #r.points < 3 then return "Add at least 3 points" end
local pts = {}
for i, v in ipairs(r.points) do pts[i] = { v.X, v.Y, v.Z } end
Config.BossRoutes[r.boss.key] = pts
App.save()
Log.add(("Saved a %d-point route for %s"):format(#pts, r.boss.label))
Jobs.recCancel()
return "Saved"
end
function Jobs.recCancel()
if Jobs.rec then pcall(function() Jobs.rec.folder:Destroy() end) end
Jobs.rec = nil
return "Cancelled"
end
track(S.UIS.InputBegan:Connect(function(i, typing)
if not typing and Jobs.rec and i.KeyCode == Enum.KeyCode.P then pcall(Jobs.recAdd) end
end))
function Jobs.setRoute(text)
local t = X.decode(tostring(text or ""))
if type(t) ~= "table" or type(t.points) ~= "table" or #t.points < 3 then return nil, "That isn't a route from the recorder" end
local key
for _, b in ipairs(Jobs.BOSSES) do
if b.key == t.boss then key = b.key end
end
if not key then return nil, "That route isn't for King Beetle or Tunnel Bear" end
local pts = {}
for _, p in ipairs(t.points) do
if type(p) == "table" and tonumber(p[1]) and tonumber(p[2]) and tonumber(p[3]) then
table.insert(pts, { tonumber(p[1]), tonumber(p[2]), tonumber(p[3]) })
end
end
if #pts < 3 then return nil, "A route needs at least 3 points" end
Config.BossRoutes[key] = pts
App.save()
return key, #pts
end
function Jobs.hexFight(cur, alive, label, maxTime, center)
local _, hrp0 = Game.char()
if not hrp0 then return end
center = Vector3.new(center.X, hrp0.Position.Y, center.Z)
local hex, size = Jobs.caveHex(center)
local k, bestD = 1, nil
for i = 1, 6 do
local d = Game.flat(hex[i], hrp0.Position)
if not bestD or d < bestD then k, bestD = i, d end
end
local dir, t0 = 1, os.clock()
local lastP, lastMove, stuck = hrp0.Position, os.clock(), 0
local function at(i) return hex[(i - 1) % 6 + 1] end
while App.running() and alive() and os.clock() - t0 < maxTime do
local _, hrp, hum = Game.char()
if not hrp then Move.waitChar(20) else
local me, m = hrp.Position, cur()
local bp = m and Game.pivot(m)
local target = at(k + dir)
if bp and Jobs.segDist(bp, me, target) < 9 then
dir = -dir
target = at(k + dir)
end
hum:MoveTo(Vector3.new(target.X, me.Y, target.Z))
if Game.flat(me, target) < 4 then k = k + dir end
if (me - lastP).Magnitude > 1 then
lastP, lastMove, stuck = me, os.clock(), 0
elseif os.clock() - lastMove > 0.9 then
stuck = stuck + 1
hum.Jump = true
lastMove = os.clock()
if stuck >= 3 then dir, stuck = -dir, 0 end
end
local h = m and Vic.health(m)
setStatus(label .. (h and (" · " .. math.floor(h * 100 + 0.5) .. "% health") or ""))
task.wait(0.1)
end
end
Move.stop()
end
function Jobs.tunnelFight(cur, alive, label, maxTime)
local KEEP = 22
local t0, last, passes = os.clock(), cur() and Game.pivot(cur()), 0
local okExt, ext = pcall(function() return cur():GetExtentsSize() end)
local body = okExt and math.max(ext.X, ext.Z) / 2 or 6
local function axis(me, near)
local best, bestLen
for k = 0, 17 do
local a = k * math.pi / 18
local u = Vector3.new(math.cos(a), 0, math.sin(a))
if not near or math.abs(u:Dot(near)) > 0.75 then
local len = Jobs.wallRay(me, u * 300) + Jobs.wallRay(me, -u * 300)
if not bestLen or len > bestLen then best, bestLen = u, len end
end
end
best = best or near or Vector3.new(1, 0, 0)
if near and best:Dot(near) < 0 then best = -best end
return best, bestLen or 0
end
local _, hrp0 = Game.char()
local u, len = axis(hrp0 and hrp0.Position or last)
local perp = Vector3.new(-u.Z, 0, u.X)
local width = hrp0 and (Jobs.wallRay(hrp0.Position, perp * 40) + Jobs.wallRay(hrp0.Position, -perp * 40)) or 0
local passing, passDir = nil, nil
while App.running() and alive() and os.clock() - t0 < maxTime do
local _, hrp, hum = Game.char()
if not hrp then Move.waitChar(20) else
local m = cur()
local me, bp = hrp.Position, (m and Game.pivot(m)) or last
last = bp
u = axis(me, u)
perp = Vector3.new(-u.Z, 0, u.X)
local rel = Vector3.new(me.X - bp.X, 0, me.Z - bp.Z)
local d = rel.Magnitude
local along = rel:Dot(u)
local fwd = along >= 0 and u or -u
local ahead = Jobs.wallRay(me, fwd * 60)
local left, right = Jobs.wallRay(me, perp * 30), Jobs.wallRay(me, -perp * 30)
local target
if passing then
local room = (passing > 0 and left or right) - 2.5
local beyond = bp + passDir * (body + 10)
target = Vector3.new(beyond.X, me.Y, beyond.Z) + perp * passing * math.max(room, 0)
local past = rel:Dot(passDir)
if math.abs(past) < body + 4 then hum.Jump = true end
if past > body + 6 then passing, passDir = nil, nil end
elseif ahead < 9 and d < KEEP + 8 then
local lean = (Vector3.new(bp.X - me.X, 0, bp.Z - me.Z)):Dot(perp)
passing = (lean > 0) and -1 or 1
if (passing > 0 and left or right) < 4 then passing = -passing end
passDir = -fwd
passes = passes + 1
elseif d < KEEP then
local centre = (left - right) / 2
target = me + fwd * math.min(ahead - 4, 10) + perp * centre * 0.5
else
Move.stop()
end
if target then hum:MoveTo(target) end
local h = m and Vic.health(m)
setStatus(label .. (h and (" · " .. math.floor(h * 100 + 0.5) .. "% health") or "") .. (passing and " · passing it" or ""))
task.wait(0.1)
end
end
Move.stop()
end
Jobs.bossRetry = {}
Jobs.spawnerCache = {}
function Jobs.bossSpawner(b)
local hit = Jobs.spawnerCache[b.key]
if hit and hit.Parent then return hit end
hit = Jobs.findSpawner(b)
Jobs.spawnerCache[b.key] = hit
return hit
end
function Jobs.findSpawner(b)
local sp = workspace:FindFirstChild("MonsterSpawners")
if not sp then return nil end
for _, d in ipairs(sp:GetDescendants()) do
if (d:IsA("BasePart") or d:IsA("Model")) and d.Name:lower():gsub("[^%w]", ""):find(b.match, 1, true) then return d end
end
return nil
end
function Jobs.bossSign(sp)
for _, d in ipairs(sp:GetDescendants()) do
if d:IsA("TextLabel") then
local dd, hh, mm, ss = d.Text:match("(%d+):(%d%d):(%d%d):(%d%d)")
if dd then return tonumber(dd) * 86400 + tonumber(hh) * 3600 + tonumber(mm) * 60 + tonumber(ss) end
local h, m, sec = d.Text:match("(%d+):(%d%d):(%d%d)")
if h then return tonumber(h) * 3600 + tonumber(m) * 60 + tonumber(sec) end
local m2, s2 = d.Text:match("(%d+):(%d%d)")
if m2 then return tonumber(m2) * 60 + tonumber(s2) end
end
end
return nil
end
function Jobs.bossLeft(b)
if not Config[b.key] then return nil end
local bees = Game.bees()
if bees and bees < b.bees then return nil end
local left
local st = Game.stats()
local mt = st and st.MonsterTimes
if type(mt) == "table" then
for k, v in pairs(mt) do
if tostring(k):lower():gsub("[^%w]", ""):find(b.match, 1, true) and tonumber(v) then
left = math.max(0, b.cd - (os.time() - tonumber(v)))
end
end
end
if not left then
local sp = Jobs.bossSpawner(b)
left = sp and Jobs.bossSign(sp)
end
return math.max(left or 0, (Jobs.bossRetry[b.key] or 0) - os.clock(), 0)
end
function Jobs.bossTarget()
if os.clock() - (Jobs.bossCheckAt or -10) < 5 then return nil end
Jobs.bossCheckAt = os.clock()
for _, b in ipairs(Jobs.BOSSES) do
local left = Jobs.bossLeft(b)
if left and left <= 5 then return b end
end
return nil
end
function Jobs.boss(b)
Jobs.bossRetry[b.key] = os.clock() + 600
local sp = Jobs.bossSpawner(b)
local pos = sp and Game.pivot(sp)
if not pos then
Log.add(b.label .. ": couldn't find where it spawns")
Jobs.bossRetry[b.key] = os.clock() + 1800
return
end
Move.waitChar(30)
if not Hive.claim() then Log.add(b.label .. ": couldn't claim a hive, so bees can't fight") return end
setStatus("Going to " .. b.label)
local u, free = Jobs.openWay(pos + Vector3.new(0, 3, 0))
local stand = u and (pos + u * math.clamp(free - 4, 6, 20)) or pos
Move.travel(stand + Vector3.new(0, 3, 0))
local function cur() return Jobs.monsters(b.match)[1] end
local goneSince
local function alive()
if cur() then goneSince = nil return true end
goneSince = goneSince or os.clock()
return os.clock() - goneSince < 3
end
local t0 = os.clock()
while App.running() and os.clock() - t0 < 12 and not cur() do task.wait(0.25) end
if not cur() then
Log.add(b.label .. " didn't appear; trying again in 10 minutes")
return
end
Log.add("Fighting " .. b.label)
local started, killedBefore = os.clock(), Jobs.bossLeft(b)
local hits, conn = 0, nil
do
local _, _, hum = Game.char()
local hp = hum and hum.Health
if hum then
conn = hum.HealthChanged:Connect(function(v)
if hp and v < hp - 1 then hits = hits + 1 end
hp = v
end)
end
end
local last = Game.pivot(cur()) or pos
local tracking = true
task.spawn(function()
while tracking do
local m = cur()
local mp = m and Game.pivot(m)
if mp then last = mp end
task.wait(0.2)
end
end)
Jobs.speedCap = 36
local route = Jobs.routeFor(b)
local ok, err
if route then
ok, err = pcall(Jobs.routeFight, cur, alive, b.label, 10 * 60, pos, route)
else
ok, err = pcall(b.style == "tunnel" and Jobs.tunnelFight or Jobs.hexFight, cur, alive, b.label, 10 * 60, pos)
end
Jobs.speedCap, tracking = nil, false
if conn then conn:Disconnect() end
if not ok then
Log.add(b.label .. " fight error: " .. tostring(err))
return
end
if alive() then
Log.add(("%s fight ran out of time (%d hits taken); trying again in 10 minutes"):format(b.label, hits))
return
end
Log.add(("%s gone after %ds, %d hits taken; collecting loot"):format(b.label, math.floor(os.clock() - started), hits))
Jobs.loot(last, 15, 45)
Jobs.bossRetry[b.key] = nil
local left = Jobs.bossLeft(b)
if left and left > 3600 and (killedBefore or 0) < 3600 then
Log.add(b.label .. " defeated")
Hook.send(b.label .. " defeated", "", 0x6ECD9E, false, Hook.card("boss", { b = b.label }))
else
Log.add(b.label .. " got away; trying again in 10 minutes")
Jobs.bossRetry[b.key] = os.clock() + 600
end
end
Jobs.statusCache = {}
function Jobs.bossStatus(b)
local c = Jobs.statusCache[b.key]
if c and os.clock() - c.at < 3 then return c.text, c.kind end
local text, kind = Jobs.bossStatusNow(b)
Jobs.statusCache[b.key] = { at = os.clock(), text = text, kind = kind }
return text, kind
end
function Jobs.bossStatusNow(b)
if not Config[b.key] then return "off", "muted" end
local bees = Game.bees()
if bees and bees < b.bees then return ("needs %d bees"):format(b.bees), "muted" end
local left = Jobs.bossLeft(b) or 0
if left <= 5 then return "ready", "good" end
if left >= 3600 then return ("%dh %02dm"):format(math.floor(left / 3600), math.floor(left % 3600 / 60)), "text" end
return ("%dm"):format(math.ceil(left / 60)), "text"
end
function Jobs.windyLeft()
local since = os.clock() - Jobs.windyFoundAt
if since < 330 then return math.max(0, 300 - since) end
local m = Jobs.monsters("windy")[1]
if m then
for _, d in ipairs(m:GetDescendants()) do
if d:IsA("TextLabel") then
local a, b = d.Text:match("(%d+):(%d%d)")
if a then return tonumber(a) * 60 + tonumber(b) end
end
end
end
return nil
end
function Jobs.windyTarget()
if not Config.Windy then return nil end
local m = Jobs.monsters("windy")[1]
if not m or Jobs.windySkip[m] then return nil end
local left = Jobs.windyLeft()
if left and left < Config.WindyMinTime then return nil end
return m
end
function Jobs.windy(m)
Jobs.windySkip[m] = true
Move.waitChar(30)
if not Hive.claim() then Log.add("Windy Bee: couldn't claim a hive, so bees can't fight") return end
Log.add("Going for Wild Windy Bee")
local last = Game.pivot(m)
local t0 = os.clock()
while App.running() and m.Parent and os.clock() - t0 < 360 do
local low, beaten = false, false
Fight.kite(function()
local p = Game.pivot(m)
if p then
if last and Game.flat(p, last) > 90 then beaten = true end
last = p
end
local h = Vic.health(m)
if h then
if h < 0.08 then low = true end
if low and h > 0.5 then beaten = true end
end
local left = Jobs.windyLeft()
setStatus("Wild Windy Bee" .. (h and (" · " .. math.floor(h * 100 + 0.5) .. "%") or "")
.. (left and (" · flees in " .. math.floor(left) .. "s") or ""))
return last
end, function() return m.Parent ~= nil and not beaten end, 360 - (os.clock() - t0), Jobs.fieldAt(last or Vector3.zero), 18)
if beaten and last then
setStatus("Collecting Windy Bee loot")
Jobs.loot(last, 10, 35)
last = Game.pivot(m) or last
end
end
Log.add("Wild Windy Bee is gone")
end
function Jobs.sproutRank(model)
local text = model.Name
for _, d in ipairs(model:GetDescendants()) do
if d:IsA("TextLabel") then text = text .. " " .. d.Text end
if d:IsA("StringValue") then text = text .. " " .. tostring(d.Value) end
end
text = text:lower()
for i = #Jobs.RARITIES, 2, -1 do
if text:find(Jobs.RARITIES[i]:lower(), 1, true) then return Jobs.RARITIES[i], i end
end
return "Basic", 2
end
function Jobs.sproutWanted(rarity)
return Config.Sprouts and Config.SproutWant[rarity] ~= false
end
function Jobs.rarityRank(rarity)
for i, r in ipairs(Jobs.RARITIES) do
if r == rarity then return i end
end
return 2
end
function Jobs.sproutTarget()
if not Config.Sprouts then return nil end
local sf = workspace:FindFirstChild("Sprouts")
if not sf then return nil end
local bees = Game.bees()
local best, bestRank
for _, s in ipairs(sf:GetChildren()) do
if not Jobs.sproutSkip[s] then
local p = Game.pivot(s)
local z = p and Jobs.fieldAt(p)
if z then
local need = 0
for _, f in ipairs(Jobs.FIELDS) do
if f[1] == z.Name then need = f[2] end
end
local name, rank = Jobs.sproutRank(s)
if Jobs.sproutWanted(name) and (not bees or bees >= need) and (not bestRank or rank > bestRank) then
best, bestRank = { obj = s, pos = p, zone = z, rarity = name }, rank
end
end
end
end
return best
end
function Jobs.sprout(t)
Jobs.sproutSkip[t.obj] = true
Move.waitChar(30)
if not Hive.claim() then Log.add("Sprout: couldn't claim a hive") return end
Log.add(("Farming a %s sprout in %s"):format(t.rarity, t.zone.Name))
local t0 = os.clock()
Jobs.swing(true)
while App.running() and t.obj.Parent and os.clock() - t0 < 20 * 60 do
if Jobs.bagFull() then
Jobs.swing(false)
Jobs.convert()
Jobs.swing(true)
end
local _, hrp = Game.char()
if not hrp then
Move.waitChar(20)
elseif not Fields.inZone(t.zone, hrp.Position, 2) then
Move.travel(Fields.above(t.pos, t.zone))
else
Jobs.avoidMobs()
setStatus(("%s sprout in %s · %d%% bag"):format(t.rarity, t.zone.Name,
math.floor(Jobs.core("Pollen") / math.max(Jobs.core("Capacity"), 1) * 100)))
local a, r = math.random() * math.pi * 2, 6 + math.random() * 16
local pt = Vector3.new(t.pos.X + math.cos(a) * r, hrp.Position.Y, t.pos.Z + math.sin(a) * r)
if Fields.inZone(t.zone, pt, -2) then Move.walk(pt, 1.5) else task.wait(0.1) end
end
end
Jobs.swing(false)
if not t.obj.Parent then
Log.add(t.rarity .. " sprout done; collecting its drops")
Jobs.loot(t.pos, 25, 60)
end
end
Jobs.GROW_HOURS = {
["Paper Planter"] = 1, ["Ticket Planter"] = 2, ["Plastic Planter"] = 2, ["Candy Planter"] = 4,
["Red Clay Planter"] = 6, ["Blue Clay Planter"] = 6, ["Tacky Planter"] = 8, ["Pesticide Planter"] = 10,
["Heat-Treated Planter"] = 12, ["Hydroponic Planter"] = 12, ["Petal Planter"] = 14,
["Planter Of Plenty"] = 16, ["Festive Planter"] = 4,
}
Jobs.PLANTER_RANK = { "Planter Of Plenty", "Petal Planter", "Heat-Treated Planter", "Hydroponic Planter", "Pesticide Planter",
"Tacky Planter", "Red Clay Planter", "Blue Clay Planter", "Candy Planter", "Plastic Planter", "Ticket Planter", "Paper Planter",
"Festive Planter" }
Jobs.NECTAR_MULT = {
["Blue Clay Planter"] = { Comforting = 1.2, Refreshing = 1.2 },
["Red Clay Planter"] = { Satisfying = 1.2, Invigorating = 1.2 },
["Tacky Planter"] = { Comforting = 1.25, Satisfying = 1.25 },
["Pesticide Planter"] = { Motivating = 1.25, Satisfying = 1.25 },
["Candy Planter"] = { Motivating = 1.2 },
["Hydroponic Planter"] = { Comforting = 1.4, Refreshing = 1.4 },
["Heat-Treated Planter"] = { Motivating = 1.4, Invigorating = 1.4 },
["Petal Planter"] = { Comforting = 1.5, Satisfying = 1.5 },
}
Jobs.BASE_MULT = { ["Planter Of Plenty"] = 1.5, ["Paper Planter"] = 0.75, ["Ticket Planter"] = 2, ["Festive Planter"] = 3 }
Jobs.NECTARS = { "Comforting", "Refreshing", "Satisfying", "Motivating", "Invigorating" }
Jobs.PRESETS = {
["Red hive"] = { Refreshing = 3, Invigorating = 3, Satisfying = 1.5, Motivating = 1.5, Comforting = 1 },
["Blue hive"] = { Comforting = 3, Motivating = 3, Refreshing = 1.5, Satisfying = 1, Invigorating = 1 },
["White hive"] = { Satisfying = 3, Motivating = 2, Invigorating = 1.5, Comforting = 1.5, Refreshing = 1 },
["Balanced"] = { Comforting = 2, Refreshing = 2, Satisfying = 2, Motivating = 2, Invigorating = 2 },
}
Jobs.PRESET_NAMES = { "Red hive", "Blue hive", "White hive", "Balanced", "Custom" }
Jobs.PLANTER_NAMES = { "None" }
for _, n in ipairs(Jobs.PLANTER_RANK) do table.insert(Jobs.PLANTER_NAMES, n) end
Jobs.FIELD_NAMES = {}
for _, f in ipairs(Jobs.FIELDS) do table.insert(Jobs.FIELD_NAMES, f[1]) end
function Jobs.nectarPct(nectar)
local st = Game.stats()
local mods = st and st.Modifiers
if type(mods) ~= "table" then return nil end
local want, best = nectar:lower(), nil
local function walk(t, depth)
if type(t) ~= "table" or depth > 5 then return end
if type(t.Src) == "string" and t.Src:lower():find(want, 1, true) then
local dur, start = tonumber(t.Dur), tonumber(t.Start or t.StartTime or t.T)
if dur and start then
local left = start + dur - os.time()
if left > 0 and (not best or left > best) then best = left end
end
end
for _, v in pairs(t) do walk(v, depth + 1) end
end
pcall(walk, mods, 0)
if not best then return 0 end
return math.min(100, best / 86400 * 100)
end
function Jobs.nectarWeights()
local p = Jobs.PRESETS[Config.PlanterPreset]
if p then return p end
local w = {}
for i, n in ipairs(Config.NectarOrder) do w[n] = ({ 3, 2.5, 2, 1.5, 1 })[i] or 1 end
return w
end
function Jobs.nectarOrder()
local p = Jobs.PRESETS[Config.PlanterPreset]
if not p then return Config.NectarOrder end
local list = {}
for _, n in ipairs(Jobs.NECTARS) do table.insert(list, n) end
table.sort(list, function(a, b) return (p[a] or 0) > (p[b] or 0) end)
return list
end
function Jobs.planterMult(planter, nectar)
local m = Jobs.NECTAR_MULT[planter]
return (m and m[nectar]) or Jobs.BASE_MULT[planter] or 1
end
function Jobs.fieldNectar(field)
for _, f in ipairs(Jobs.FIELDS) do
if f[1] == field then return f[3], f[2] end
end
return nil, 0
end
function Jobs.planterModel(id)
local f = workspace:FindFirstChild("Planters")
if not f or not id then return nil end
for _, m in ipairs(f:GetChildren()) do
if tostring(m:GetAttribute("PlanterID") or m:GetAttribute("ID") or m.Name) == tostring(id) then return m end
end
return nil
end
function Jobs.planterPercent(model)
for _, d in ipairs(model:GetDescendants()) do
if d:IsA("TextLabel") then
local p = d.Text:match("(%d+%.?%d*)%%")
if p then return tonumber(p) end
end
end
return nil
end
function Jobs.gamePlanters()
if os.clock() - (Jobs.gpAt or -10) < 2 then return Jobs.gpList end
Jobs.gpAt, Jobs.gpList = os.clock(), nil
local mod = S.RS:FindFirstChild("LocalPlanters")
local getups = type(debug) == "table" and debug.getupvalues
if not mod or type(getups) ~= "function" then return nil end
local ok, lp = pcall(require, mod)
if not ok or type(lp) ~= "table" then return nil end
for _, fn in pairs(lp) do
if type(fn) == "function" then
local ok2, ups = pcall(getups, fn)
for _, up in pairs(ok2 and type(ups) == "table" and ups or {}) do
if type(up) == "table" then
local mine, isList = {}, false
for _, v in pairs(up) do
if type(v) == "table" and v.IsMine ~= nil and (v.ActorID ~= nil or v.PotModel ~= nil) then
isList = true
if v.IsMine == true then table.insert(mine, v) end
end
end
if isList then
Jobs.gpList = mine
return mine
end
end
end
end
end
return nil
end
function Jobs.planterNameOf(kind)
local k = tostring(kind or ""):lower():gsub("[^%w]", "")
for _, name in ipairs(Jobs.PLANTER_RANK) do
local key = name == "Planter Of Plenty" and "plenty" or name:lower():gsub("[^%w]", ""):gsub("planter", "")
if k:find(key, 1, true) then return name end
end
return nil
end
function Jobs.gameGrowth(v)
local g = tonumber(v.GrowthPercent or v.Growth)
if g and g > 1.5 then g = g / 100 end
return g
end
function Jobs.syncPlanters()
local list = Jobs.gamePlanters()
if not list then return nil end
local byId, changed = {}, false
for _, v in ipairs(list) do
local m = v.PotModel
byId[tostring(v.ActorID)] = { v = v, pos = typeof(m) == "Instance" and Game.pivot(m) or nil }
end
local claimed = {}
for slot = 1, 3 do
local key = tostring(slot)
local st = Config.PlanterState[key]
if st then
local hit = byId[tostring(st.id)]
if not hit then
local zone = Fields.zone(st.field)
for id, e in pairs(byId) do
if not claimed[id] and Jobs.planterNameOf(e.v.Type) == st.planter and e.pos and zone and Fields.inZone(zone, e.pos, 8) then
st.id, hit, changed = id, e, true
break
end
end
end
if hit then
claimed[tostring(st.id)] = true
st.growth = Jobs.gameGrowth(hit.v)
else
Log.add(("%s in %s is gone (harvested elsewhere)"):format(st.planter, st.field))
Config.PlanterState[key], changed = nil, true
end
end
end
for id, e in pairs(byId) do
if not claimed[id] then
for slot = 1, 3 do
local key = tostring(slot)
if not Config.PlanterState[key] then
local name = Jobs.planterNameOf(e.v.Type) or tostring(e.v.Type or "Planter")
local zone = e.pos and Jobs.fieldAt(e.pos)
local growth = Jobs.gameGrowth(e.v) or 0
Config.PlanterState[key] = { id = id, planter = name, field = zone and zone.Name or "?", growth = growth, adopted = true,
placed = os.time() - math.floor(growth * (Jobs.GROW_HOURS[name] or 4) * 3600) }
Log.add(("Found your %s in %s (%d%% grown)"):format(name, zone and zone.Name or "an unknown spot", math.floor(growth * 100)))
claimed[id], changed = true, true
break
end
end
end
end
if changed then App.save() end
return #list
end
function Jobs.planterPlan()
local plan = {}
if Config.PlanterMode == "Manual" then
for s = 1, 3 do
local p = Config["Planter" .. s]
if p ~= "None" then plan[s] = { planter = p, field = Config["PlanterField" .. s], nectar = Jobs.fieldNectar(Config["PlanterField" .. s]) } end
end
return plan
end
local bees = Game.bees() or 0
local weights = Jobs.nectarWeights()
local usedField, usedNectar, usedPlanter = {}, {}, {}
for s = 1, 3 do
local st = Config.PlanterState[tostring(s)]
if st then
usedField[st.field] = true
local n = Jobs.fieldNectar(st.field)
if n then usedNectar[n] = true end
end
end
for s = 1, 3 do
if not Config.PlanterState[tostring(s)] then
local pick, pickScore
for _, n in ipairs(Jobs.NECTARS) do
local pct = Jobs.nectarPct(n) or 0
local w = weights[n] or 0
if w > 0 and not usedNectar[n] and pct < Config.NectarCap then
local score = w * (1 - pct / 100)
if not pickScore or score > pickScore then pick, pickScore = n, score end
end
end
if pick then
local field, fieldNeed
for _, f in ipairs(Jobs.FIELDS) do
if f[3] == pick and bees >= f[2] and not usedField[f[1]] and (not fieldNeed or f[2] > fieldNeed) then
field, fieldNeed = f[1], f[2]
end
end
local best, bestScore
if field then
for i, name in ipairs(Jobs.PLANTER_RANK) do
local have = (Jobs.count(name) or 0) - (usedPlanter[name] or 0)
if have > 0 and Config.PlanterUse[name] ~= false then
local score = Jobs.planterMult(name, pick) * 100 - i * 2
if Config.PlanterHarvestMode == "For nectar" and (Jobs.GROW_HOURS[name] or 4) < Config.PlanterHours then
score = score - 40
end
if not bestScore or score > bestScore then best, bestScore = name, score end
end
end
end
if best then
plan[s] = { planter = best, field = field, nectar = pick }
usedField[field], usedNectar[pick] = true, true
usedPlanter[best] = (usedPlanter[best] or 0) + 1
else
usedNectar[pick] = true
end
end
end
end
return plan
end
function Jobs.planterLeft(slot)
local st = Config.PlanterState[tostring(slot)]
if not st then return nil end
local grow = (Jobs.GROW_HOURS[st.planter] or 4) * 3600
local elapsed = os.time() - st.placed
local pct = st.growth and st.growth * 100
if not pct then
local m = Jobs.planterModel(st.id)
pct = m and Jobs.planterPercent(m)
end
if Config.PlanterHarvestMode == "Full growth" then
if pct then
if pct >= 100 then return 0 end
return math.max(60, grow * (1 - pct / 100))
end
return math.max(0, grow - elapsed)
end
if pct and pct >= 100 then return 0 end
return math.max(0, math.min(Config.PlanterHours * 3600, grow) - elapsed)
end
function Jobs.planterReady(slot)
local left = Jobs.planterLeft(slot)
return left ~= nil and left <= 0
end
Jobs.harvestRetry = {}
function Jobs.canHarvest(s) return Jobs.planterReady(s) and os.clock() >= (Jobs.harvestRetry[s] or 0) end
function Jobs.plantersDue()
if not Config.Planters or os.clock() - Jobs.planterCheck < 15 then return false end
Jobs.planterCheck = os.clock()
Jobs.syncPlanters()
for s = 1, 3 do
if Jobs.canHarvest(s) then return true end
end
local plan = Jobs.planterPlan()
for s = 1, 3 do
local p = plan[s]
if p and not Config.PlanterState[tostring(s)] and os.clock() >= (Jobs.planterRetry[s] or 0) then return true end
end
return false
end
function Jobs.harvest(slot)
local key = tostring(slot)
local st = Config.PlanterState[key]
if not st then return end
local zone = Fields.zone(st.field)
local pos
for _, v in ipairs(Jobs.gamePlanters() or {}) do
if tostring(v.ActorID) == tostring(st.id) and typeof(v.PotModel) == "Instance" then pos = Game.pivot(v.PotModel) end
end
if not pos then
local m = Jobs.planterModel(st.id)
pos = m and Game.pivot(m)
end
if not pos and not zone then
Config.PlanterState[key] = nil
return
end
setStatus("Harvesting " .. st.planter)
Move.travel(pos and (pos + Vector3.new(0, 4, 0)) or Fields.above(zone.Position, zone))
Jobs.avoidMobs()
if pos then Move.walk(pos, 5) end
local function still()
local list = Jobs.gamePlanters()
if list then
for _, v in ipairs(list) do
if tostring(v.ActorID) == tostring(st.id) then return true end
end
return false
end
return Jobs.planterModel(st.id) ~= nil
end
local gone = false
local function waitGone(seconds)
local t1 = os.clock()
while os.clock() - t1 < seconds do
Jobs.gpAt = nil
if not still() then return true end
task.wait(0.3)
end
return false
end
local raw
for _, v in ipairs(Jobs.gamePlanters() or {}) do
if tostring(v.ActorID) == tostring(st.id) then raw = v.ActorID end
end
local tries = {}
if raw ~= nil then table.insert(tries, function() Game.fire("PlanterModelCollect", raw) end) end
if tonumber(st.id) then table.insert(tries, function() Game.fire("PlanterModelCollect", tonumber(st.id)) end) end
table.insert(tries, function()
local ok, vim = pcall(function() return game:GetService("VirtualInputManager") end)
if ok and vim then
pcall(function() vim:SendKeyEvent(true, Enum.KeyCode.E, false, game) end)
task.wait(0.15)
pcall(function() vim:SendKeyEvent(false, Enum.KeyCode.E, false, game) end)
end
end)
table.insert(tries, function()
local mdl = Jobs.planterModel(st.id)
for _, v in ipairs(Jobs.gamePlanters() or {}) do
if tostring(v.ActorID) == tostring(st.id) and typeof(v.PotModel) == "Instance" then mdl = v.PotModel end
end
if mdl and type(fireproximityprompt) == "function" then
for _, d in ipairs(mdl:GetDescendants()) do
if d:IsA("ProximityPrompt") then pcall(fireproximityprompt, d) end
end
end
end)
table.insert(tries, function() Game.fire("PlanterModelCollect", st.id) end)
for i, try in ipairs(tries) do
try()
if waitGone(i <= 2 and 3 or 2.5) then
gone = true
break
end
end
if not gone then
Log.add(("Couldn't harvest %s in %s; trying again in 10 minutes"):format(st.planter, st.field))
Jobs.harvestRetry[slot] = os.clock() + 600
return
end
task.wait(1.5)
Jobs.loot(pos or zone.Position, 14, 36)
Config.PlanterState[key] = nil
App.save()
Log.add("Harvested " .. st.planter .. " in " .. st.field)
end
function Jobs.place(slot, p)
Jobs.planterRetry[slot] = os.clock() + 300
for s = 1, 3 do
local o = Config.PlanterState[tostring(s)]
if o and o.field == p.field then return end
end
local zone = Fields.zone(p.field)
if not zone then return end
setStatus("Placing " .. p.planter .. " (" .. tostring(p.nectar or "?") .. ")")
local center = Fields.above(zone.Position, zone)
Move.travel(center)
Jobs.avoidMobs()
local f = workspace:FindFirstChild("Planters")
local id
for attempt = 1, 2 do
local t1 = os.clock()
while os.clock() - t1 < 3 do
local _, _, hum = Game.char()
if hum and hum.FloorMaterial ~= Enum.Material.Air then break end
task.wait(0.1)
end
local before = {}
if f then for _, m in ipairs(f:GetChildren()) do before[m] = true end end
Game.fire("PlayerActivesCommand", { Name = p.planter })
local t0 = os.clock()
while not id and os.clock() - t0 < 4 do
task.wait(0.25)
if f then
for _, m in ipairs(f:GetChildren()) do
local mp = Game.pivot(m)
if not before[m] and mp and Game.flat(mp, center) < 30 then
id = m:GetAttribute("PlanterID") or m:GetAttribute("ID") or m.Name
end
end
end
end
if id then break end
if attempt == 1 then Move.walk(center + Vector3.new(8, 0, 8), 4) end
end
if not id then
Log.add(("Couldn't place %s in %s (you have %s; at most 3 planters can be out)"):format(
p.planter, p.field, tostring(Jobs.count(p.planter) or "?")))
return
end
Config.PlanterState[tostring(slot)] = { placed = os.time(), field = p.field, planter = p.planter, id = tostring(id) }
App.save()
Jobs.syncPlanters()
Log.add(("Placed %s in %s for %s nectar"):format(p.planter, p.field, tostring(p.nectar or "?")))
end
function Jobs.planters()
Move.waitChar(30)
local out = Jobs.syncPlanters()
for s = 1, 3 do
if not App.running() then return end
if Jobs.canHarvest(s) then Jobs.harvest(s) end
end
out = Jobs.syncPlanters() or out
local plan = Jobs.planterPlan()
for s = 1, 3 do
if not App.running() then return end
if out and out >= 3 then return end
local p = plan[s]
if p and not Config.PlanterState[tostring(s)] and os.clock() >= (Jobs.planterRetry[s] or 0) then
Jobs.place(s, p)
out = Jobs.syncPlanters() or out
end
end
end
function Jobs.planterStatus(slot)
local st = Config.PlanterState[tostring(slot)]
if not st then return nil end
local left = Jobs.planterLeft(slot) or 0
local when = left <= 0 and "ready" or (left >= 3600 and ("%dh %02dm"):format(math.floor(left / 3600), math.floor(left % 3600 / 60))
or ("%dm"):format(math.ceil(left / 60)))
return ("%s · %s · %s"):format((st.planter:gsub(" Planter", "")), (st.field:gsub(" Field", ""):gsub(" Patch", "")), when)
end
do
local ev = S.RS:WaitForChild("Events", 15)
local r = ev and ev:WaitForChild("ReceiveAlert", 5)
if r and r:IsA("RemoteEvent") then
track(r.OnClientEvent:Connect(function(msg)
local m = tostring(msg):lower()
if m:find("found windy bee", 1, true) then Jobs.windyFoundAt = os.clock() end
end))
end
end
function Jobs.tick()
local w = Jobs.windyTarget()
if w then
Jobs.windy(w)
return true
end
local sp = Jobs.sproutTarget()
if sp then
Jobs.sprout(sp)
return true
end
local boss = Jobs.bossTarget()
if boss then
Jobs.boss(boss)
return true
end
if Jobs.plantersDue() then
Jobs.planters()
return true
end
return false
end
local Hunt = { arrived = os.clock(), state = "idle", beat = 0, foundHere = {}, defeatedAt = -100, leftAt = -100 }
do
local ev = S.RS:WaitForChild("Events", 15)
local r = ev and ev:WaitForChild("ReceiveAlert", 5)
if r and r:IsA("RemoteEvent") then
track(r.OnClientEvent:Connect(function(msg)
local m = tostring(msg):lower()
if m:find("vicious bee has been defeated", 1, true) then
Hunt.defeatedAt = os.clock()
elseif m:find("vicious bee left", 1, true) then
Hunt.leftAt = os.clock()
end
end))
end
end
local function fieldName(t)
return (t and t.field and t.field.name) or "a field"
end
local function levelText(t)
if t.level then return "Lv " .. t.level end
if t.field then return ("Lv %d-%d"):format(t.field.lv[1], t.field.lv[2]) end
return "Lv ?"
end
function Hunt.countFound(t)
if Hunt.foundHere[t.obj] then return end
Hunt.foundHere[t.obj] = true
Stats.add("found")
if t.gifted then Stats.add("gifted") end
if Config.HookKills or t.gifted then Hook.send((t.gifted and "Gifted " or "") .. "Vicious Bee found",
("%s · %s · %d players"):format(fieldName(t), levelText(t), #S.Players:GetPlayers()),
t.gifted and 0xF2C94C or 0xB5A0FF, t.gifted and Config.PingGifted,
Hook.card("found", { lv = t.level or 0, f = fieldName(t), g = t.gifted and 1 or 0, p = #S.Players:GetPlayers() })) end
end
function Hunt.fight(bee)
local m = bee.obj
if not Vic.wanted(bee) then
Log.add(("Vicious Bee in %s is %s, outside your range; leaving it"):format(fieldName(bee), levelText(bee)))
Vic.ignored[m] = true
return
end
Hunt.state = "fighting"
Hunt.countFound(bee)
Log.add(("Fighting %sVicious Bee (%s) in %s"):format(bee.gifted and "Gifted " or "", levelText(bee), fieldName(bee)))
Sync.publishMain("fighting", bee)
local before = Game.stingers()
local lastPos, lastHealth = bee.pos, Vic.health(m)
local label = (bee.gifted and "Gifted " or "") .. "Vicious " .. levelText(bee)
local function cur()
if m and m.Parent then return m end
local near = Vic.near(lastPos, 80)
if near then m = near.obj end
return m and m.Parent and m or nil
end
local goneSince
local function alive()
if cur() then goneSince = nil return true end
goneSince = goneSince or os.clock()
return os.clock() - goneSince < 3
end
Vic.mine = { pos = lastPos, untilT = os.clock() + 600 }
Fight.kite(function()
local b = cur()
local p = b and Game.pivot(b)
if p then lastPos = p end
local h = b and Vic.health(b)
if h then lastHealth = h end
setStatus(label .. (lastHealth and (" · " .. math.floor(lastHealth * 100 + 0.5) .. "% health") or "") .. " · " .. fieldName(bee))
if os.clock() - Hunt.beat > 3 then
Hunt.beat = os.clock()
Sync.publishMain("fighting", { pos = lastPos, field = bee.field, gifted = bee.gifted })
end
return lastPos
end, alive, 600, bee.zone)
Vic.ignored[m] = true
Vic.mine = nil
if alive() then
Log.add("Stopped fighting before the bee went down")
Hunt.state = "idle"
return
end
setStatus("Vicious Bee is gone, checking rewards")
task.wait(2.5)
local after = Game.stingers()
local gained = (before and after) and math.max(after - before, 0) or 0
local killed = gained > 0 or os.clock() - Hunt.defeatedAt < 15 or (lastHealth ~= nil and lastHealth < 0.25)
if os.clock() - Hunt.leftAt < 15 and gained == 0 then killed = false end
if killed then
Stats.add("killed")
if gained > 0 then Stats.add("stingers", gained) end
table.insert(Stats.data.hist, Stats.data.stingers)
if #Stats.data.hist > 30 then table.remove(Stats.data.hist, 1) end
Stats.save()
Log.add(("Defeated %s (+%d stingers)"):format(label, gained))
if Config.HookKills or bee.gifted then
Hook.send((bee.gifted and "Gifted " or "") .. "Vicious Bee defeated",
("%s · %s · +%d stingers\nSession: %d killed, %d stingers, %d servers"):format(fieldName(bee), levelText(bee), gained,
Stats.data.killed, Stats.data.stingers, Stats.data.servers),
0x6ECD9E, bee.gifted and Config.PingGifted,
Hook.card("kill", { lv = bee.level or 0, f = fieldName(bee), g = bee.gifted and 1 or 0, s = gained }))
end
else
Log.add("The Vicious Bee left before it was beaten")
end
Hunt.state = "idle"
if Config.StingerGoal > 0 and Stats.data.stingers >= Config.StingerGoal then
Config.Running = false
App.saveNow()
Log.add("Stinger goal reached, stopping")
Hook.send("Stinger goal reached", ("%d stingers this session"):format(Stats.data.stingers), 0x6ECD9E, true, Hook.card("goal"))
end
end
function Hunt.engage(t)
Hunt.state = "found"
Log.add(("%sVicious Bee %s in %s"):format(t.gifted and "Gifted " or "",
t.kind == "spike" and "spike" or (t.dormant and "hiding" or "awake"), fieldName(t)))
Sync.publishMain("found", t)
Move.waitChar(30)
local claimed = Hive.claim()
if not claimed and App.running() then
task.wait(1)
claimed = Hive.claim()
end
if not App.running() then return end
if not claimed then
Log.add("Couldn't claim a hive here, and without one your bees can't fight; skipping this one")
Vic.ignored[t.obj] = true
Hunt.state = "idle"
return
end
if t.kind == "monster" and not t.dormant then
Hunt.fight(t)
return
end
setStatus("Waking the Vicious Bee in " .. fieldName(t))
local spot, spikeObj = t.pos, (t.kind == "spike") and t.obj or nil
if t.kind ~= "spike" then
local bestD
for _, sp in ipairs(Vic.spikes()) do
local d = Game.flat(sp.pos, t.pos)
if d < 20 and (not bestD or d < bestD) then spot, spikeObj, bestD = sp.pos, sp.obj, d end
end
end
Move.travel(Fields.above(spot, t.zone))
Jobs.avoidMobs()
local bee
local t0 = os.clock()
while App.running() and os.clock() - t0 < 12 do
local m = Vic.near(spot, 60)
if m and (not m.dormant or (spikeObj and not spikeObj.Parent)) then
bee = m
break
end
local _, hrp, hum = Game.char()
if hrp then
local e = os.clock() - t0
local off = (e > 3) and Vector3.new(math.random(-15, 15) / 10, 0, math.random(-15, 15) / 10) or Vector3.zero
hum:MoveTo(Vector3.new(spot.X, hrp.Position.Y, spot.Z) + off)
if Game.flat(hrp.Position, spot) < 2.5 then hum.Jump = true end
end
task.wait(0.3)
end
if not bee then
bee = Vic.near(spot, 60)
end
if not bee then
if App.running() then
Log.add("Nothing woke up at that spike in " .. fieldName(t) .. "; ignoring it")
Vic.ignored[t.obj] = true
Vic.markDecoy(t)
end
Hunt.state = "idle"
return
end
if t.gifted then bee.gifted = true end
Vic.mine = { pos = spot, untilT = os.clock() + 600 }
Hunt.fight(bee)
end
function Hunt.joinReport(rep)
local r = rep.r
local what = (r.kind == "sprout") and ("%s sprout in %s"):format(tostring(r.rarity), tostring(r.field or "a field"))
or ("%sVicious in %s"):format(r.gifted and "Gifted " or "", tostring(r.field or "a field"))
Log.add(("%s found a %s; joining"):format(tostring(rep.name), what))
setStatus(("Joining %s · %s"):format(tostring(rep.name), what))
Sync.publishMain("joining")
Hop.toJob(rep.job)
Sync.skipJobs[rep.job] = os.clock()
Log.add("Couldn't get into " .. tostring(rep.name) .. "'s server")
end
function Hunt.tick()
local mondo = Jobs.mondoDue()
if mondo then
Jobs.mondo(mondo)
return
end
local t = Config.Vicious and Vic.find(Config.HelpFights)
if t then
Hunt.engage(t)
return
end
if Config.Role == "Main" then
local rep = Sync.reports()[1]
if rep then
Hunt.joinReport(rep)
return
end
end
Hunt.state = "searching"
if Config.Role == "Main" and (not Sync.lastMain or Sync.lastMain.state ~= "hunting" or Sync.lastMain.job ~= game.JobId) then
Sync.publishMain("hunting")
end
if Jobs.tick() then return end
local here = os.clock() - Hunt.arrived
if here < 1.2 then
setStatus("Looking around this server")
return
end
if Config.Mondo and Jobs.mondoIn() <= 75 then
setStatus(("Mondo Chick in %ds, staying"):format(Jobs.mondoIn()))
return
end
if not (Config.Vicious or Config.Windy or Config.Sprouts) then
setStatus(Config.Running and "Waiting here (nothing needs a new server)" or "Stopped")
return
end
if not Config.Vicious then
Hop.go("nothing to do here")
return
end
if Clock.isNight() then
local since = Clock.sinceNight()
local left = since and (Config.SpikeWait - since) or 0
if left > 0 then
setStatus(("Night here, watching for a spike (%ds)"):format(math.ceil(left)))
return
end
Hop.go("night, but no Vicious Bee here")
else
Hop.go("daytime here")
end
end
local Alt = { hold = nil }
function Alt.main()
local m = Sync.readMain()
if not m or type(m.t) ~= "number" or os.time() - m.t > (m.remote and 75 or 30) then return nil end
return m
end
function Alt.tick()
if cleanName(Config.MainName) == "" then
local mains = Sync.mains()
if #mains == 1 then
Config.MainName = mains[1].name
App.save()
Log.add("Linked to main " .. mains[1].name)
end
end
local m = Alt.main()
local mainOn = m ~= nil and m.state ~= "stopped"
local mainHere = m ~= nil and m.job == game.JobId
if Alt.hold and Alt.hold.kind == "sprout" then
local h = Alt.hold
if not h.obj.Parent then
Alt.hold = nil
Log.add("The sprout I was holding is gone")
Sync.publishAlt("searching")
return
end
local waited = os.clock() - h.since
if mainHere then
Jobs.sproutSkip[h.obj] = true
Alt.hold = nil
Log.add("The main is here for the sprout; back to scouting")
Sync.publishAlt("searching")
return
elseif not mainOn or waited > Config.AltHold then
Log.add(mainOn and "The main didn't come for the sprout; farming it myself" or "The main isn't running; farming the sprout myself")
Alt.hold = nil
Sync.publishAlt("searching")
Jobs.sprout(h.t)
return
end
setStatus(("Holding a %s sprout in %s for %s (%ds)"):format(h.t.rarity, h.t.zone.Name, tostring(m.name),
math.ceil(Config.AltHold - waited)))
Sync.publishAlt("found")
return
end
if Alt.hold then
local h = Alt.hold
local bee = Vic.near(h.pos, 60)
if bee and not bee.dormant then
Alt.hold = nil
Sync.publishAlt("fighting")
Move.waitChar(30)
Hive.claim()
Hunt.fight(bee)
Sync.publishAlt("searching")
return
end
if not h.obj.Parent then
Alt.hold = nil
Log.add("The spike I was holding is gone")
Sync.publishAlt("searching")
return
end
local waited = os.clock() - h.since
if mainHere then
setStatus("The main is here and waking it")
elseif not mainOn or waited > Config.AltHold then
Log.add(mainOn and "The main didn't make it in time; taking it myself" or "The main isn't running; taking it myself")
Alt.hold = nil
Sync.publishAlt("fighting")
Hunt.engage(h.t)
Sync.publishAlt("searching")
return
else
setStatus(("Holding a %sVicious in %s for %s (%ds)"):format(h.t.gifted and "Gifted " or "", fieldName(h.t),
tostring(m.name), math.ceil(Config.AltHold - waited)))
end
Sync.publishAlt("found")
return
end
if Config.Vicious and mainOn and not mainHere and not m.private then
local t = Vic.find(false)
if t and (t.kind == "spike" or t.dormant) then
Hunt.countFound(t)
Log.add(("Found a %sVicious Bee in %s; calling %s"):format(t.gifted and "Gifted " or "", fieldName(t), tostring(m.name)))
Alt.hold = { kind = "vicious", t = t, obj = t.obj, pos = t.pos, since = os.clock() }
Sync.publishAlt("found", { kind = "vicious", field = t.field and t.field.name or nil, x = t.pos.X, y = t.pos.Y, z = t.pos.Z,
gifted = t.gifted == true, level = t.level, at = os.time() })
Move.waitChar(30)
Hive.claim()
return
end
end
if Config.Sprouts and mainOn and not mainHere and not m.private then
local sp = Jobs.sproutTarget()
if sp then
Log.add(("Found a %s sprout in %s; calling %s"):format(sp.rarity, sp.zone.Name, tostring(m.name)))
Alt.hold = { kind = "sprout", t = sp, obj = sp.obj, pos = sp.pos, since = os.clock() }
Sync.publishAlt("found", { kind = "sprout", rarity = sp.rarity, field = sp.zone.Name, x = sp.pos.X, y = sp.pos.Y,
z = sp.pos.Z, at = os.time() })
return
end
end
if Config.Vicious and mainOn and mainHere then
local t = Vic.find(false)
if t and (t.kind == "spike" or t.dormant) then
setStatus("Waiting for " .. tostring(m.name) .. " to wake it")
return
end
end
if Sync.alt.state ~= "searching" then Sync.publishAlt("searching") end
Hunt.tick()
end
function App.arrive()
if Stats.data.lastJob ~= game.JobId then
Stats.data.lastJob = game.JobId
Stats.add("servers")
end
end
function Sync.roomNow()
if (Config.RoomKey or "") ~= "" then Sync.roomWake = true end
end
function App.tick()
if Config.Role == "Alt" then
App.arrive()
Alt.tick()
else
App.arrive()
Hunt.tick()
end
end
function App.setRunning(on)
Config.Running = on
App.saveNow()
if on then
Hunt.arrived = math.min(Hunt.arrived, os.clock() - 4)
if Config.Role == "Alt" then Sync.publishAlt("searching") end
Log.add("Started (" .. Config.Role .. ")")
else
Move.stop()
Hunt.state = "idle"
Alt.hold = nil
if Config.Role == "Main" then Sync.publishMain("stopped") end
if Config.Role == "Alt" then Sync.publishAlt("stopped") end
setStatus("Stopped")
Log.add("Stopped")
end
end
task.spawn(function()
Move.waitChar(30)
if Config.Running then Log.add("Running in a new server (" .. Config.Role .. ")") end
while App.alive do
if App.running() and not Hop.busy then
local ok, err = pcall(App.tick)
if not ok then
Log.add("Error: " .. tostring(err))
task.wait(2)
end
elseif not App.running() and not Hop.busy then
setStatus(Config.Running and "Starting" or "Stopped")
end
task.wait(0.25)
end
end)
task.spawn(function()
local n = 0
local gap = os.time() - (tonumber(Stats.data.tickAt) or 0)
if Config.Running and gap > 0 and gap < 180 then Stats.data.seconds = Stats.data.seconds + gap end
local lastT, acc = os.clock(), 0
while App.alive do
n = n + 1
pcall(Clock.update)
local now = os.clock()
if App.running() then
acc = acc + (now - lastT)
local whole = math.floor(acc)
acc = acc - whole
Stats.data.seconds = Stats.data.seconds + whole
Stats.data.tickAt = os.time()
if n % 15 == 0 then Stats.save() end
if n % 3 == 0 and Config.Role == "Main" then pcall(Sync.beatMain) end
end
lastT = now
if n % 3 == 0 then
if Config.Role == "Main" and not App.running() then pcall(Sync.publishMain, "stopped") end
if Config.Role == "Alt" then pcall(Sync.publishAlt, (not App.running()) and "stopped" or nil) end
end
task.wait(1)
end
end)
App.decoSaved = {}
function App.applyDecos()
local f = workspace:FindFirstChild("FieldDecos")
if Config.NoDecos then
if not f then Log.add("Field decorations not found in this server") return end
local n = 0
for _, d in ipairs(f:GetDescendants()) do
if d:IsA("BasePart") and d.CanCollide then
App.decoSaved[d] = true
d.CanCollide = false
n = n + 1
end
end
if n > 0 then Log.add("Walking through field decorations") end
else
for d in pairs(App.decoSaved) do
if d.Parent then d.CanCollide = true end
end
App.decoSaved = {}
end
end
task.spawn(function()
task.wait(3)
if Config.NoDecos then pcall(App.applyDecos) end
end)
task.spawn(function()
local base
while App.alive do
local _, _, hum = Game.char()
if hum then
local want
if Config.WalkMode == "Dynamic" then
local h = math.min(Game.buffStack("haste"), 10)
want = math.floor(Config.DynMin + (Config.DynMax - Config.DynMin) * h / 10 + 0.5)
elseif Config.WalkSpeed > 0 then
want = Config.WalkSpeed
end
local cap = math.min(Jobs.speedCap or math.huge, Fight.speedCap or math.huge)
if want then
base = base or hum.WalkSpeed
want = math.min(want, cap)
if hum.WalkSpeed ~= want then hum.WalkSpeed = want end
elseif base then
hum.WalkSpeed = base
base = nil
end
if hum.WalkSpeed > cap then hum.WalkSpeed = cap end
end
task.wait(0.25)
end
end)
track(LP.Idled:Connect(function()
if not Config.AntiAfk then return end
pcall(function()
local vu = game:GetService("VirtualUser")
vu:CaptureController()
vu:ClickButton2(Vector2.new())
end)
end))
task.spawn(function()
local ok, overlay = pcall(function()
local g = S.CoreGui:WaitForChild("RobloxPromptGui", 15)
return g and g:WaitForChild("promptOverlay", 15)
end)
if not ok or not overlay then return end
track(overlay.ChildAdded:Connect(function(child)
if child.Name ~= "ErrorPrompt" or not App.running() then return end
Log.add("Disconnected; joining another server")
Stats.data.dcSince = (tonumber(Stats.data.dcSince) or 0) + 1
Stats.save()
task.delay(2, function()
if not Hop.busy and App.running() then Hop.go("disconnected") end
end)
end))
end)
App.gfxSaved = nil
function App.fightGfx(on)
if on and Config.FightGfx and not App.gfxSaved then
local saved = {}
pcall(function()
saved.level = settings().Rendering.QualityLevel
settings().Rendering.QualityLevel = Enum.QualityLevel.Level01
end)
pcall(function()
local ugs = UserSettings():GetService("UserGameSettings")
saved.saved = ugs.SavedQualityLevel
ugs.SavedQualityLevel = Enum.SavedQualitySetting.QualityLevel1
end)
App.gfxSaved = saved
elseif not on and App.gfxSaved then
local saved = App.gfxSaved
App.gfxSaved = nil
if saved.level then pcall(function() settings().Rendering.QualityLevel = saved.level end) end
if saved.saved then pcall(function() UserSettings():GetService("UserGameSettings").SavedQualityLevel = saved.saved end) end
end
end
function App.applyPerf()
pcall(function() S.Run:Set3dRenderingEnabled(not Config.No3D) end)
if type(setfpscap) == "function" then
pcall(setfpscap, Config.FpsCap > 0 and Config.FpsCap or 240)
end
end
App.applyPerf()
App.DISCORD = "mszFEnUtT8"
function App.discord(force)
if not force then
if genv.__STINGERS_DISCORD or X.read("discord.txt") then return false end
genv.__STINGERS_DISCORD = true
end
if not X.request then return false end
for port = 6463, 6472 do
local body = X.encode({ cmd = "INVITE_BROWSE", nonce = S.Http:GenerateGUID(false), args = { code = App.DISCORD } })
local ok, res = pcall(X.request, {
Url = ("http://127.0.0.1:%d/rpc?v=1"):format(port), Method = "POST",
Headers = { ["Content-Type"] = "application/json", ["Origin"] = "https://discord.com" },
Body = body or "",
})
local code = ok and type(res) == "table" and tonumber(res.StatusCode) or 0
if code >= 200 and code < 300 then
if not force then X.write("discord.txt", "shown " .. os.date("%Y-%m-%d")) end
return true
end
end
return false
end
task.spawn(pcall, App.discord)
local THEME_ROLES = { "bg", "main", "accent", "outline", "font" }
local THEME_PRESETS = {
{ name = "Honey", bg = { 17, 17, 20 }, main = { 23, 23, 27 }, accent = { 240, 178, 62 }, outline = { 37, 37, 43 }, font = { 240, 238, 234 } },
{ name = "Midnight", bg = { 12, 14, 22 }, main = { 18, 21, 33 }, accent = { 112, 152, 255 }, outline = { 34, 40, 62 }, font = { 230, 234, 246 } },
{ name = "Graphite", bg = { 16, 16, 16 }, main = { 24, 24, 24 }, accent = { 226, 226, 226 }, outline = { 44, 44, 44 }, font = { 244, 244, 244 } },
{ name = "Rose", bg = { 20, 15, 18 }, main = { 28, 21, 26 }, accent = { 240, 112, 142 }, outline = { 52, 36, 46 }, font = { 246, 236, 240 } },
{ name = "Forest", bg = { 13, 18, 15 }, main = { 19, 26, 22 }, accent = { 96, 200, 140 }, outline = { 34, 50, 41 }, font = { 232, 241, 235 } },
{ name = "Classic", bg = { 17, 17, 17 }, main = { 23, 23, 23 }, accent = { 0, 122, 255 }, outline = { 42, 42, 42 }, font = { 255, 255, 255 } },
}
local ThemeStore = {}
function ThemeStore.hex(c)
return ("%02X%02X%02X"):format(math.floor(c.R * 255 + 0.5), math.floor(c.G * 255 + 0.5), math.floor(c.B * 255 + 0.5))
end
function ThemeStore.color(s)
if type(s) ~= "string" then return nil end
s = s:gsub("#", ""):gsub("%s", "")
if #s ~= 6 then return nil end
local r, g, b = tonumber(s:sub(1, 2), 16), tonumber(s:sub(3, 4), 16), tonumber(s:sub(5, 6), 16)
if r and g and b then return Color3.fromRGB(r, g, b) end
return nil
end
function ThemeStore.preset(name)
for _, p in ipairs(THEME_PRESETS) do
if p.name == name then
local b = {}
for _, k in ipairs(THEME_ROLES) do b[k] = Color3.fromRGB(p[k][1], p[k][2], p[k][3]) end
return b
end
end
return nil
end
function ThemeStore.encode(base)
local t = {}
for _, k in ipairs(THEME_ROLES) do t[k] = "#" .. ThemeStore.hex(base[k]) end
return t
end
function ThemeStore.decode(t)
if type(t) ~= "table" then return nil end
local b = {}
for _, k in ipairs(THEME_ROLES) do
b[k] = ThemeStore.color(t[k])
if not b[k] then return nil end
end
return b
end
function ThemeStore.read()
local t = X.load("theme.json")
if type(t) ~= "table" then t = {} end
return t
end
function ThemeStore.setCurrent(base, name)
local t = ThemeStore.read()
t.current, t.currentName = ThemeStore.encode(base), name
X.save("theme.json", t)
end
function ThemeStore.setDefault(base, name)
local t = ThemeStore.read()
t.default, t.defaultName = ThemeStore.encode(base), name
X.save("theme.json", t)
end
function ThemeStore.default()
local t = ThemeStore.read()
if t.defaultName ~= "Default" and ThemeStore.decode(t.default) then return ThemeStore.decode(t.default), t.defaultName or "Custom" end
return ThemeStore.preset("Honey"), "Honey"
end
function ThemeStore.startup()
local t = ThemeStore.read()
local cur = t.currentName ~= "Default" and ThemeStore.decode(t.current)
if cur then return cur, t.currentName or "Custom" end
return ThemeStore.default()
end
local function cleanFileName(s)
s = tostring(s or ""):gsub("[^%w%s%-_]", ""):gsub("^%s+", ""):gsub("%s+$", "")
return s:sub(1, 32)
end
local function folderNames(sub)
local out, seen = {}, {}
local files = X.list(sub)
if files then
for _, f in ipairs(files) do
local n = tostring(f):match("([^/\\]+)%.json$")
if n and n ~= "index" and not seen[n] then
seen[n] = true
table.insert(out, n)
end
end
else
local idx = X.load(sub .. "/index.json")
if type(idx) == "table" then
for _, n in ipairs(idx) do
if type(n) == "string" and not seen[n] then
seen[n] = true
table.insert(out, n)
end
end
end
end
table.sort(out, function(a, b) return a:lower() < b:lower() end)
return out
end
local function indexAdd(sub, name)
local idx = X.load(sub .. "/index.json")
if type(idx) ~= "table" then idx = {} end
for _, n in ipairs(idx) do
if n == name then return end
end
table.insert(idx, name)
X.save(sub .. "/index.json", idx)
end
function ThemeStore.customs()
return folderNames("themes")
end
function ThemeStore.saveCustom(name, base)
X.save("themes/" .. name .. ".json", ThemeStore.encode(base))
indexAdd("themes", name)
end
function ThemeStore.loadCustom(name)
return ThemeStore.decode(X.load("themes/" .. name .. ".json"))
end
local Cfg = {
KEYS = {
"AltHold", "Vicious", "Windy", "WindyMinTime", "Mondo", "KingBeetle", "TunnelBear", "BossRoutes", "NoDecos", "AvoidMobs", "Precision", "DigitalTokens", "WalkMode", "DynMin", "DynMax", "Sprouts", "SproutWant", "Planters", "PlanterMode",
"Planter1", "Planter2", "Planter3", "PlanterField1", "PlanterField2", "PlanterField3", "PlanterPreset", "NectarOrder", "PlanterHarvestMode", "PlanterHours", "NectarCap", "PlanterUse", "MinLevel", "MaxLevel", "GiftedOnly", "HelpFights", "GrabBattle", "MoveMethod", "TweenUnlock", "WalkSpeed",
"WaitNight", "SpikeWait", "MaxPlayers", "RevisitMinutes", "Forecast", "TweenSpeed", "StingerGoal",
"Webhook", "PingId", "PingGifted", "HookKills", "HookUpdates", "No3D", "FightGfx", "FpsCap", "AntiAfk", "Loader", "MenuKey", "UIScalePct",
},
AUTOLOAD_FILE = "autoload_" .. KEY .. ".json",
}
function Cfg.snapshot()
local t = { stingers = VERSION }
for _, k in ipairs(Cfg.KEYS) do t[k] = Config[k] end
return t
end
function Cfg.apply(t)
if type(t) ~= "table" then return 0 end
local n = 0
for _, k in ipairs(Cfg.KEYS) do
if t[k] ~= nil and type(t[k]) == type(DEFAULTS[k]) then
Config[k] = t[k]
n = n + 1
end
end
App.clampConfig()
App.saveNow()
pcall(App.applyPerf)
return n
end
function Cfg.names()
return folderNames("configs")
end
function Cfg.save(name)
X.save("configs/" .. name .. ".json", Cfg.snapshot())
indexAdd("configs", name)
Config.CurrentConfig = name
App.saveNow()
end
function Cfg.load(name)
local t = X.load("configs/" .. name .. ".json")
if type(t) ~= "table" then return false end
local wasRunning = Config.Running
Cfg.apply(t)
Config.Running = wasRunning
Config.CurrentConfig = name
App.saveNow()
return true
end
function Cfg.autoload()
local t = X.load(Cfg.AUTOLOAD_FILE)
return type(t) == "table" and type(t.name) == "string" and t.name ~= "" and t.name or nil
end
function Cfg.setAutoload(name)
X.save(Cfg.AUTOLOAD_FILE, { name = name or "" })
end
App.onSave = function()
if Config.CurrentConfig ~= "" and X.read("configs/" .. Config.CurrentConfig .. ".json") then
X.save("configs/" .. Config.CurrentConfig .. ".json", Cfg.snapshot())
end
end
if not Config.Running then
local name = Cfg.autoload() or (Config.CurrentConfig ~= "" and Config.CurrentConfig or nil)
if name and Cfg.load(name) then Log.add("Loaded config " .. name) end
end
local Theme = {}
local function mix(a, b, t)
return Color3.new(a.R + (b.R - a.R) * t, a.G + (b.G - a.G) * t, a.B + (b.B - a.B) * t)
end
local function lighten(c, f)
return mix(c, Color3.new(1, 1, 1), f)
end
local UI = { conns = {}, gen = 0, state = { cfgName = "", cfgSel = Config.CurrentConfig, themeName = "", themeSel = "", import = "" } }
UI.base, UI.themeName = ThemeStore.startup()
function UI.derive()
local b, white, black = UI.base, Color3.new(1, 1, 1), Color3.new(0, 0, 0)
Theme.Top = lighten(b.bg, 0.025)
Theme.Bottom = mix(b.bg, black, 0.18)
Theme.Foot = mix(b.bg, black, 0.1)
Theme.PanelTop = lighten(b.main, 0.03)
Theme.PanelBot = mix(b.main, black, 0.1)
Theme.Raised = lighten(b.main, 0.055)
Theme.Raised2 = lighten(b.main, 0.12)
Theme.Track = lighten(b.main, 0.17)
Theme.Line = b.outline
Theme.Line2 = lighten(b.outline, 0.1)
Theme.Accent = b.accent
local lum = 0.299 * b.accent.R + 0.587 * b.accent.G + 0.114 * b.accent.B
Theme.OnAccent = lum > 0.55 and mix(b.accent, black, 0.84) or white
Theme.Text = b.font
Theme.Sub = mix(b.font, b.bg, 0.3)
Theme.Muted = mix(b.font, b.bg, 0.55)
Theme.Good = Color3.fromRGB(112, 204, 144)
Theme.Bad = Color3.fromRGB(236, 104, 104)
Theme.Gold = Color3.fromRGB(240, 200, 90)
Theme.Night = mix(Color3.fromRGB(46, 52, 92), b.main, 0.25)
Theme.Day = mix(Color3.fromRGB(86, 74, 46), b.main, 0.25)
end
UI.derive()
local F = {}
if not pcall(function()
local fam = Font.fromEnum(Enum.Font.Gotham).Family
F.reg = Font.new(fam, Enum.FontWeight.Regular)
F.med = Font.new(fam, Enum.FontWeight.Medium)
F.bold = Font.new(fam, Enum.FontWeight.Bold)
end) then
F.reg, F.med, F.bold = Font.fromEnum(Enum.Font.Gotham), Font.fromEnum(Enum.Font.GothamMedium), Font.fromEnum(Enum.Font.GothamBold)
end
F.mono = Font.fromEnum(Enum.Font.RobotoMono)
local function utrack(c)
table.insert(UI.conns, c)
return c
end
function UI.new(class, props, children)
local o = Instance.new(class)
for k, v in pairs(props or {}) do
if k ~= "Parent" then o[k] = v end
end
for _, c in ipairs(children or {}) do c.Parent = o end
if props and props.Parent then o.Parent = props.Parent end
return o
end
local function corner(r)
return UI.new("UICorner", { CornerRadius = UDim.new(0, r) })
end
local function pill()
return UI.new("UICorner", { CornerRadius = UDim.new(1, 0) })
end
local function pad(l, r, t, b)
return UI.new("UIPadding", {
PaddingLeft = UDim.new(0, l), PaddingRight = UDim.new(0, r), PaddingTop = UDim.new(0, t), PaddingBottom = UDim.new(0, b),
})
end
local function edge(color, transparency)
return UI.new("UIStroke", { Color = color or Theme.Line, Thickness = 1, Transparency = transparency or 0,
ApplyStrokeMode = Enum.ApplyStrokeMode.Border })
end
local function vgrad(top, bottom)
return UI.new("UIGradient", { Rotation = 90, Color = ColorSequence.new(top, bottom) })
end
local function accentGrad(rotation)
return UI.new("UIGradient", { Rotation = rotation or 90, Color = ColorSequence.new(lighten(Theme.Accent, 0.16), Theme.Accent) })
end
local function list(padding, horizontal)
return UI.new("UIListLayout", {
Padding = UDim.new(0, padding or 0), SortOrder = Enum.SortOrder.LayoutOrder,
FillDirection = horizontal and Enum.FillDirection.Horizontal or Enum.FillDirection.Vertical,
VerticalAlignment = horizontal and Enum.VerticalAlignment.Center or Enum.VerticalAlignment.Top,
})
end
local function anim(o, t, props)
S.Tween:Create(o, TweenInfo.new(t, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), props):Play()
end
local function isPress(i)
return i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch
end
local function isMoveInput(i)
return i.UserInputType == Enum.UserInputType.MouseMovement or i.UserInputType == Enum.UserInputType.Touch
end
local function text(props)
props.BackgroundTransparency = 1
props.TextXAlignment = props.TextXAlignment or Enum.TextXAlignment.Left
props.FontFace = props.FontFace or F.med
props.TextColor3 = props.TextColor3 or Theme.Text
props.TextSize = props.TextSize or 13
return UI.new("TextLabel", props)
end
local function binding(key)
if type(key) == "table" then return key.get, key.set end
return function() return Config[key] end, function(v)
Config[key] = v
App.save()
end
end
local function plain(v) return tostring(math.floor(v + 0.5)) end
local function secs(v) return v == 0 and "Off" or (plain(v) .. "s") end
local function mins(v) return plain(v) .. " min" end
local function fmtNum(n)
n = tonumber(n) or 0
if n >= 1e6 then return ("%.1fM"):format(n / 1e6) end
if n >= 1e4 then return ("%.1fK"):format(n / 1e3) end
return tostring(math.floor(n))
end
local function fmtTime(s)
s = math.floor(tonumber(s) or 0)
return ("%d:%02d:%02d"):format(math.floor(s / 3600), math.floor(s % 3600 / 60), s % 60)
end
local function clockText(c)
return ("%02d:%02d"):format(math.floor(c) % 24, math.floor((c % 1) * 60))
end
function UI.logo(parent, size, z)
z = z or 1
local holder = UI.new("Frame", { Parent = parent, Size = UDim2.fromOffset(size, size), BackgroundTransparency = 1, ZIndex = z })
local image = (LOGO_MONO ~= "" and LOGO_MONO) or LOGO_IMAGE
if image ~= "" then
UI.new("ImageLabel", { Parent = holder, Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, Image = image,
ImageColor3 = (image == LOGO_MONO) and Theme.Accent or Color3.new(1, 1, 1), ScaleType = Enum.ScaleType.Fit, ZIndex = z })
return holder
end
local m = UI.new("Frame", { Parent = holder, Size = UDim2.fromScale(1, 1), BackgroundColor3 = Color3.new(1, 1, 1),
BorderSizePixel = 0, ZIndex = z }, { corner(math.floor(size * 0.3)), accentGrad() })
text({ Parent = m, Size = UDim2.fromScale(1, 1), Text = "S", FontFace = F.bold, TextSize = math.floor(size * 0.58),
TextColor3 = Theme.OnAccent, TextXAlignment = Enum.TextXAlignment.Center, ZIndex = z + 1 })
return holder
end
function UI.row(box, height, visibleIf)
box.rows = box.rows + 1
local r = UI.new("Frame", { Parent = box.body, LayoutOrder = box.rows, Size = UDim2.new(1, 0, 0, height), BackgroundTransparency = 1 })
if visibleIf then table.insert(UI.vis, { row = r, fn = visibleIf }) end
return r
end
function UI.refreshVisibility()
for _, v in ipairs(UI.vis) do
local ok, show = pcall(v.fn)
local want = ok and show == true
if v.row.Visible ~= want then v.row.Visible = want end
end
end
function UI.switch(box, label, key, cb, visibleIf)
local get, set = binding(key)
local r = UI.row(box, 20, visibleIf)
local lbl = text({ Parent = r, Size = UDim2.new(1, -44, 1, 0), Text = label, TextSize = 12, TextTruncate = Enum.TextTruncate.AtEnd })
local rail = UI.new("Frame", { Parent = r, AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, 0, 0.5, 0), Size = UDim2.fromOffset(32, 18),
BackgroundColor3 = Theme.Track, BorderSizePixel = 0 }, { pill() })
local knob = UI.new("Frame", { Parent = rail, AnchorPoint = Vector2.new(0, 0.5), Position = UDim2.new(0, 3, 0.5, 0), Size = UDim2.fromOffset(12, 12),
BackgroundColor3 = Theme.Sub, BorderSizePixel = 0 }, { pill() })
local hit = UI.new("TextButton", { Parent = r, Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, Text = "" })
local function paint(instant)
local on = get() == true
local railP = { BackgroundColor3 = on and Theme.Accent or Theme.Track }
local knobP = { Position = on and UDim2.new(1, -15, 0.5, 0) or UDim2.new(0, 3, 0.5, 0), BackgroundColor3 = on and Theme.OnAccent or Theme.Sub }
local lblP = { TextColor3 = on and Theme.Text or Theme.Sub }
if instant then
for k, v in pairs(railP) do rail[k] = v end
for k, v in pairs(knobP) do knob[k] = v end
for k, v in pairs(lblP) do lbl[k] = v end
else
anim(rail, 0.18, railP)
anim(knob, 0.18, knobP)
anim(lbl, 0.18, lblP)
end
end
paint(true)
table.insert(UI.painters, function() paint(true) end)
utrack(hit.Activated:Connect(function()
set(not get())
paint(false)
if cb then cb(get()) end
UI.refreshVisibility()
end))
return r
end
function UI.slider(box, label, key, min, max, step, fmt, cb, visibleIf, onRelease, colorOf)
local get, set = binding(key)
local r = UI.row(box, 30, visibleIf)
text({ Parent = r, Size = UDim2.new(1, -70, 0, 15), Text = label, TextSize = 12, TextColor3 = Theme.Sub, TextTruncate = Enum.TextTruncate.AtEnd })
local val = text({ Parent = r, AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, 0, 0, 0), Size = UDim2.fromOffset(70, 15),
Text = "", FontFace = F.bold, TextSize = 12, TextXAlignment = Enum.TextXAlignment.Right })
local rail = UI.new("Frame", { Parent = r, Position = UDim2.fromOffset(0, 23), Size = UDim2.new(1, 0, 0, 4), BackgroundColor3 = Theme.Track,
BorderSizePixel = 0 }, { pill() })
local grad = accentGrad(0)
local fill = UI.new("Frame", { Parent = rail, Size = UDim2.fromScale(0, 1), BackgroundColor3 = Color3.new(1, 1, 1), BorderSizePixel = 0 },
{ pill(), grad })
local knob = UI.new("Frame", { Parent = rail, AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0, 0.5), Size = UDim2.fromOffset(12, 12),
BackgroundColor3 = Theme.Text, BorderSizePixel = 0, ZIndex = 2 }, { pill() })
local ring = edge(Theme.Bottom)
ring.Thickness = 2
ring.Parent = knob
local hit = UI.new("TextButton", { Parent = r, Position = UDim2.fromOffset(0, 14), Size = UDim2.new(1, 0, 0, 18),
BackgroundTransparency = 1, Text = "", ZIndex = 3 })
local function show(v, silent)
v = tonumber(v) or min
v = math.clamp(min + math.floor((v - min) / step + 0.5) * step, min, max)
local changed = get() ~= v
if changed then set(v) end
local a = (v - min) / (max - min)
fill.Size = UDim2.fromScale(a, 1)
knob.Position = UDim2.fromScale(a, 0.5)
val.Text = fmt(v)
if colorOf then
local c = colorOf(v)
grad.Enabled = false
fill.BackgroundColor3, val.TextColor3 = c, c
end
if not silent and changed and cb then cb(v) end
end
show(get(), true)
table.insert(UI.painters, function() show(get(), true) end)
local dragging, scroller = false, nil
local function fromX(x)
local a = math.clamp((x - rail.AbsolutePosition.X) / math.max(rail.AbsoluteSize.X, 1), 0, 1)
show(min + a * (max - min))
end
utrack(hit.InputBegan:Connect(function(i)
if isPress(i) then
dragging = true
scroller = r:FindFirstAncestorWhichIsA("ScrollingFrame")
if scroller then scroller.ScrollingEnabled = false end
anim(knob, 0.12, { Size = UDim2.fromOffset(15, 15) })
fromX(i.Position.X)
end
end))
utrack(S.UIS.InputChanged:Connect(function(i)
if dragging and isMoveInput(i) then fromX(i.Position.X) end
end))
utrack(S.UIS.InputEnded:Connect(function(i)
if dragging and isPress(i) then
dragging = false
if scroller then scroller.ScrollingEnabled = true end
anim(knob, 0.12, { Size = UDim2.fromOffset(12, 12) })
if onRelease then onRelease(get()) end
end
end))
return r
end
function UI.closePopup()
if not UI.overlay then return end
UI.overlay.Visible = false
for _, c in ipairs(UI.overlay:GetChildren()) do c:Destroy() end
local fn = UI.onPopupClose
UI.onPopupClose, UI.popupGuard, UI.popupPanel, UI.popupHover = nil, nil, nil, false
if fn then fn() end
end
function UI.overPopup(i)
if UI.popupHover then return true end
local p = UI.popupPanel
if not p or not p.Parent or not i or i.UserInputType ~= Enum.UserInputType.Touch then return false end
local inset = 0
pcall(function() inset = game:GetService("GuiService"):GetGuiInset().Y end)
local a, sz = p.AbsolutePosition, p.AbsoluteSize
for _, off in ipairs({ 0, inset }) do
local x, y = i.Position.X, i.Position.Y + off
if x >= a.X and x <= a.X + sz.X and y >= a.Y and y <= a.Y + sz.Y then return true end
end
return false
end
function UI.setPopupPanel(p)
UI.popupPanel, UI.popupHover = p, false
utrack(p.MouseEnter:Connect(function() UI.popupHover = true end))
utrack(p.MouseLeave:Connect(function() UI.popupHover = false end))
end
local function colorKey(c)
return math.floor(c.R * 255 + 0.5) * 65536 + math.floor(c.G * 255 + 0.5) * 256 + math.floor(c.B * 255 + 0.5)
end
function UI.recolor(old, new, skip)
if not UI.gui then return end
local map = {}
for k, c in pairs(old) do
local n = new[k]
if typeof(c) == "Color3" and typeof(n) == "Color3" then
local key = colorKey(c)
if key ~= 0 and key ~= 16777215 and map[key] == nil then map[key] = n end
end
end
local function conv(c)
return map[colorKey(c)]
end
for _, d in ipairs(UI.gui:GetDescendants()) do
if not (skip and (d == skip or d:IsDescendantOf(skip))) then
if d:IsA("GuiObject") then
local n = conv(d.BackgroundColor3)
if n then d.BackgroundColor3 = n end
if d:IsA("TextLabel") or d:IsA("TextButton") or d:IsA("TextBox") then
n = conv(d.TextColor3)
if n then d.TextColor3 = n end
if d:IsA("TextBox") then
n = conv(d.PlaceholderColor3)
if n then d.PlaceholderColor3 = n end
end
elseif d:IsA("ImageLabel") or d:IsA("ImageButton") then
n = conv(d.ImageColor3)
if n then d.ImageColor3 = n end
end
if d:IsA("ScrollingFrame") then
n = conv(d.ScrollBarImageColor3)
if n then d.ScrollBarImageColor3 = n end
end
elseif d:IsA("UIStroke") then
local n = conv(d.Color)
if n then d.Color = n end
elseif d:IsA("UIGradient") then
local keys, changed = {}, false
for _, kp in ipairs(d.Color.Keypoints) do
local n = conv(kp.Value)
if n then changed = true end
table.insert(keys, ColorSequenceKeypoint.new(kp.Time, n or kp.Value))
end
if changed then d.Color = ColorSequence.new(keys) end
end
end
end
end
function UI.local_(o)
local s = math.max(UI.scale.Scale, 0.01)
return (o.AbsolutePosition.X - UI.win.AbsolutePosition.X) / s, (o.AbsolutePosition.Y - UI.win.AbsolutePosition.Y) / s,
o.AbsoluteSize.X / s, o.AbsoluteSize.Y / s
end
function UI.openList(anchor, options, current, onPick, onClosed, multi)
UI.closePopup()
local x, y, w, h = UI.local_(anchor)
local ROW = 30
local rows = math.max(#options, 1)
local menuH = math.min(rows, 8) * (ROW + 2) + 8
local winH = UI.win.AbsoluteSize.Y / math.max(UI.scale.Scale, 0.01)
local top = y + h + 6
if top + menuH > winH - 6 then top = math.max(6, y - menuH - 6) end
UI.new("Frame", { Parent = UI.overlay, Position = UDim2.fromOffset(x + 1, top + 5), Size = UDim2.fromOffset(w, menuH),
BackgroundColor3 = Color3.new(0, 0, 0), BackgroundTransparency = 0.55, BorderSizePixel = 0, ZIndex = 50 }, { corner(11) })
local menu = UI.new("ScrollingFrame", { Parent = UI.overlay, Position = UDim2.fromOffset(x, top), Size = UDim2.fromOffset(w, menuH),
BackgroundColor3 = Theme.Raised, BorderSizePixel = 0, ZIndex = 51, ScrollBarThickness = 2, ScrollBarImageColor3 = Theme.Line2,
CanvasSize = UDim2.new(), AutomaticCanvasSize = Enum.AutomaticSize.Y, ScrollingDirection = Enum.ScrollingDirection.Y },
{ corner(10), edge(Theme.Line2), pad(4, 4, 4, 4), list(2) })
if #options == 0 then
text({ Parent = menu, Size = UDim2.new(1, 0, 0, ROW), Text = " Nothing here yet", TextSize = 12, TextColor3 = Theme.Muted, ZIndex = 52 })
end
for i, o in ipairs(options) do
local item = UI.new("TextButton", { Parent = menu, LayoutOrder = i, Size = UDim2.new(1, 0, 0, ROW), BackgroundColor3 = Theme.Raised2,
BackgroundTransparency = 1, AutoButtonColor = false, BorderSizePixel = 0, Text = "", ZIndex = 52 }, { corner(7) })
local mark, tick, lbl
if multi then
mark = UI.new("Frame", { Parent = item, AnchorPoint = Vector2.new(0, 0.5), Position = UDim2.new(0, 8, 0.5, 0),
Size = UDim2.fromOffset(16, 16), BackgroundColor3 = Theme.Track, BorderSizePixel = 0, ZIndex = 53 }, { corner(5) })
tick = UI.new("Frame", { Parent = mark, AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0.5, 0.5),
Size = UDim2.fromOffset(6, 6), BackgroundColor3 = Theme.OnAccent, BorderSizePixel = 0, ZIndex = 54 }, { corner(2) })
lbl = text({ Parent = item, Position = UDim2.fromOffset(32, 0), Size = UDim2.new(1, -40, 1, 0), Text = o, TextSize = 12, ZIndex = 53,
TextTruncate = Enum.TextTruncate.AtEnd })
else
mark = UI.new("Frame", { Parent = item, AnchorPoint = Vector2.new(0, 0.5), Position = UDim2.new(0, 5, 0.5, 0),
Size = UDim2.fromOffset(3, 14), BackgroundColor3 = Theme.Accent, BorderSizePixel = 0, ZIndex = 53 }, { pill() })
lbl = text({ Parent = item, Position = UDim2.fromOffset(16, 0), Size = UDim2.new(1, -24, 1, 0), Text = o, TextSize = 12, ZIndex = 53,
TextTruncate = Enum.TextTruncate.AtEnd })
end
local function paint()
local on
if multi then on = current(o) == true else on = current == o end
lbl.TextColor3 = on and Theme.Text or Theme.Sub
lbl.FontFace = on and F.bold or F.med
if multi then
mark.BackgroundColor3 = on and Theme.Accent or Theme.Track
tick.Visible = on
else
mark.Visible = on
end
end
paint()
utrack(item.MouseEnter:Connect(function() item.BackgroundTransparency = 0 end))
utrack(item.MouseLeave:Connect(function() item.BackgroundTransparency = 1 end))
utrack(item.Activated:Connect(function()
if multi then
onPick(o)
paint()
else
UI.closePopup()
onPick(o)
end
end))
end
UI.onPopupClose = onClosed
UI.setPopupPanel(menu)
UI.popupGuard = function(i) return UI.overPopup(i) end
UI.overlay.Visible = true
end
function UI.multi(box, label, options, isOn, toggle, visibleIf)
local r = UI.row(box, 28, visibleIf)
text({ Parent = r, Size = UDim2.new(0.42, 0, 1, 0), Text = label, TextSize = 12, TextColor3 = Theme.Sub, TextTruncate = Enum.TextTruncate.AtEnd })
local b = UI.new("TextButton", { Parent = r, AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, 0, 0, 0), Size = UDim2.new(0.58, 0, 1, 0),
BackgroundColor3 = Theme.Raised, AutoButtonColor = false, BorderSizePixel = 0, Text = "" }, { corner(8), edge(Theme.Line), pad(10, 8, 0, 0) })
local v = text({ Parent = b, Size = UDim2.new(1, -16, 1, 0), Text = "", TextSize = 12, TextTruncate = Enum.TextTruncate.AtEnd })
local chev = text({ Parent = b, AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, 0, 0.5, 0), Size = UDim2.fromOffset(12, 12),
Text = "\u{203A}", Rotation = 90, TextColor3 = Theme.Muted, TextSize = 15, TextXAlignment = Enum.TextXAlignment.Center })
local function paint()
local on = {}
for _, o in ipairs(options) do
if isOn(o) then table.insert(on, o) end
end
if #on == 0 then
v.Text, v.TextColor3 = "None", Theme.Muted
elseif #on == #options then
v.Text, v.TextColor3 = "All", Theme.Text
elseif #on <= 2 then
v.Text, v.TextColor3 = table.concat(on, ", "), Theme.Text
else
v.Text, v.TextColor3 = ("%s, %s +%d"):format(on[1], on[2], #on - 2), Theme.Text
end
end
paint()
table.insert(UI.painters, paint)
utrack(b.MouseEnter:Connect(function() anim(b, 0.12, { BackgroundColor3 = Theme.Raised2 }) end))
utrack(b.MouseLeave:Connect(function() anim(b, 0.12, { BackgroundColor3 = Theme.Raised }) end))
utrack(b.Activated:Connect(function()
UI.openList(b, options, isOn, function(o)
toggle(o)
paint()
end, function() chev.Rotation = 90 end, true)
chev.Rotation = -90
end))
return r
end
function UI.dropdown(box, label, key, options, cb, visibleIf, inline)
local get, set = binding(key)
local r = UI.row(box, inline and 28 or 46, visibleIf)
local b
if inline then
text({ Parent = r, Size = UDim2.new(0.42, 0, 1, 0), Text = label, TextSize = 12, TextColor3 = Theme.Sub, TextTruncate = Enum.TextTruncate.AtEnd })
b = UI.new("TextButton", { Parent = r, AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, 0, 0, 0), Size = UDim2.new(0.58, 0, 1, 0),
BackgroundColor3 = Theme.Raised, AutoButtonColor = false, BorderSizePixel = 0, Text = "" }, { corner(8), edge(Theme.Line), pad(10, 8, 0, 0) })
else
text({ Parent = r, Size = UDim2.new(1, 0, 0, 14), Text = label, TextSize = 12, TextColor3 = Theme.Sub })
b = UI.new("TextButton", { Parent = r, Position = UDim2.fromOffset(0, 18), Size = UDim2.new(1, 0, 0, 28),
BackgroundColor3 = Theme.Raised, AutoButtonColor = false, BorderSizePixel = 0, Text = "" }, { corner(8), edge(Theme.Line), pad(10, 8, 0, 0) })
end
local v = text({ Parent = b, Size = UDim2.new(1, -16, 1, 0), Text = "", TextSize = 12, TextTruncate = Enum.TextTruncate.AtEnd })
local chev = text({ Parent = b, AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, 0, 0.5, 0), Size = UDim2.fromOffset(12, 12),
Text = "\u{203A}", Rotation = 90, TextColor3 = Theme.Muted, TextSize = 15, TextXAlignment = Enum.TextXAlignment.Center })
local function paint()
local cur = get()
v.Text = (cur == nil or cur == "") and "--" or tostring(cur)
v.TextColor3 = (cur == nil or cur == "") and Theme.Muted or Theme.Text
end
paint()
table.insert(UI.painters, paint)
utrack(b.MouseEnter:Connect(function() anim(b, 0.12, { BackgroundColor3 = Theme.Raised2 }) end))
utrack(b.MouseLeave:Connect(function() anim(b, 0.12, { BackgroundColor3 = Theme.Raised }) end))
utrack(b.Activated:Connect(function()
local opts = type(options) == "function" and options() or options
UI.openList(b, opts, get(), function(o)
if get() ~= o then
set(o)
paint()
if cb then cb(o) end
UI.refreshVisibility()
end
end, function() chev.Rotation = 90 end)
chev.Rotation = -90
end))
return r
end
function UI.input(box, label, key, placeholder, cb, visibleIf, inline)
local get, set = binding(key)
local r = UI.row(box, inline and 28 or 46, visibleIf)
local holder
if inline then
text({ Parent = r, Size = UDim2.new(0.42, 0, 1, 0), Text = label, TextSize = 12, TextColor3 = Theme.Sub, TextTruncate = Enum.TextTruncate.AtEnd })
holder = UI.new("Frame", { Parent = r, AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, 0, 0, 0), Size = UDim2.new(0.58, 0, 1, 0),
BackgroundColor3 = Theme.Raised, BorderSizePixel = 0, ClipsDescendants = true }, { corner(8), pad(10, 10, 0, 0) })
else
text({ Parent = r, Size = UDim2.new(1, 0, 0, 14), Text = label, TextSize = 12, TextColor3 = Theme.Sub })
holder = UI.new("Frame", { Parent = r, Position = UDim2.fromOffset(0, 18), Size = UDim2.new(1, 0, 0, 28),
BackgroundColor3 = Theme.Raised, BorderSizePixel = 0, ClipsDescendants = true }, { corner(8), pad(10, 10, 0, 0) })
end
local e = edge(Theme.Line)
e.Parent = holder
local tb = UI.new("TextBox", {
Parent = holder, Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, ClearTextOnFocus = false,
Text = tostring(get() or ""), PlaceholderText = placeholder or "", PlaceholderColor3 = Theme.Muted,
TextColor3 = Theme.Text, FontFace = F.med, TextSize = 12, TextXAlignment = Enum.TextXAlignment.Left,
TextTruncate = Enum.TextTruncate.AtEnd,
})
utrack(tb.Focused:Connect(function() anim(e, 0.15, { Color = Theme.Accent }) end))
utrack(tb.FocusLost:Connect(function()
anim(e, 0.15, { Color = Theme.Line })
local v = tb.Text:gsub("^%s+", ""):gsub("%s+$", "")
tb.Text = v
if get() ~= v then
set(v)
if cb then cb(v) end
end
if type(key) == "table" and key.secret then tb.Text = "" end
UI.refreshVisibility()
end))
table.insert(UI.painters, function()
if not tb:IsFocused() then tb.Text = tostring(get() or "") end
end)
return r
end
function UI.buttons(box, buttons, visibleIf)
local r = UI.row(box, 28, visibleIf)
local n = #buttons
for i, spec in ipairs(buttons) do
local label, fn = spec[1], spec[2]
local b = UI.new("TextButton", {
Parent = r, Position = UDim2.new((i - 1) / n, i > 1 and 4 or 0, 0, 0), Size = UDim2.new(1 / n, n > 1 and -4 or 0, 1, 0),
BackgroundColor3 = Theme.Raised, AutoButtonColor = false, BorderSizePixel = 0,
Text = label, TextColor3 = Theme.Text, FontFace = F.med, TextSize = 12, TextTruncate = Enum.TextTruncate.AtEnd,
}, { corner(8) })
local e = edge(Theme.Line)
e.Parent = b
utrack(b.MouseEnter:Connect(function() anim(b, 0.12, { BackgroundColor3 = Theme.Raised2 }) end))
utrack(b.MouseLeave:Connect(function() anim(b, 0.12, { BackgroundColor3 = Theme.Raised }) end))
local busy = false
utrack(b.Activated:Connect(function()
if busy then return end
busy = true
task.spawn(function()
local ok, res = pcall(fn)
if ok and type(res) == "string" and b.Parent then
b.Text = res
b.TextColor3 = Theme.Accent
e.Color = Theme.Accent
task.wait(1.4)
if b.Parent then
b.Text = label
b.TextColor3 = Theme.Text
anim(e, 0.3, { Color = Theme.Line })
end
elseif not ok then
Log.add("Button error: " .. tostring(res))
end
busy = false
end)
end))
end
return r
end
function UI.shown(o)
local x = o
while x and x ~= UI.gui do
if x:IsA("GuiObject") and not x.Visible then return false end
x = x.Parent
end
return x ~= nil
end
function UI.addRefresher(row, fn)
table.insert(UI.refreshers, function()
if UI.shown(row) then fn() end
end)
end
function UI.live(box, height, fn, props, visibleIf)
local r = UI.row(box, height, visibleIf)
local p = props or {}
local lbl = text({ Parent = r, Size = UDim2.fromScale(1, 1), Text = "", TextColor3 = Theme.Sub, FontFace = p.font or F.med,
TextSize = p.size or 12, TextWrapped = true, TextYAlignment = Enum.TextYAlignment.Top, RichText = p.rich == true,
LineHeight = p.lineHeight or 1.15 })
UI.addRefresher(r, function()
local ok, s, c = pcall(fn)
if ok then
lbl.Text = tostring(s or "")
lbl.TextColor3 = c or p.color or Theme.Sub
end
end)
return r, lbl
end
function UI.pair(box, label, fn, visibleIf)
local r = UI.row(box, 16, visibleIf)
text({ Parent = r, Size = UDim2.new(0.45, 0, 1, 0), Text = label, TextColor3 = Theme.Muted, TextSize = 12 })
local v = text({ Parent = r, AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, 0, 0, 0), Size = UDim2.new(0.55, 0, 1, 0),
Text = "", TextSize = 12, TextXAlignment = Enum.TextXAlignment.Right, TextTruncate = Enum.TextTruncate.AtEnd })
UI.addRefresher(r, function()
local ok, s, c = pcall(fn)
if ok then
v.Text = tostring(s or "")
v.TextColor3 = c or Theme.Text
end
end)
return r
end
function UI.numbers(box, cells)
local rows = math.ceil(#cells / 3)
local r = UI.row(box, rows * 46 + (rows - 1) * 6)
UI.new("UIGridLayout", { Parent = r, CellSize = UDim2.new(1 / 3, -4, 0, 46), CellPadding = UDim2.fromOffset(6, 6),
SortOrder = Enum.SortOrder.LayoutOrder })
for i, c in ipairs(cells) do
local cell = UI.new("Frame", { Parent = r, LayoutOrder = i, BackgroundColor3 = Theme.Raised, BorderSizePixel = 0 },
{ corner(8), edge(Theme.Line), pad(10, 8, 8, 6) })
text({ Parent = cell, Size = UDim2.new(1, 0, 0, 11), Text = c[1]:upper(), FontFace = F.bold, TextSize = 9, TextColor3 = Theme.Muted })
local v = text({ Parent = cell, Position = UDim2.fromOffset(0, 15), Size = UDim2.new(1, 0, 0, 17), Text = "0", FontFace = F.bold,
TextSize = 15, TextTruncate = Enum.TextTruncate.AtEnd })
local fn = c[2]
UI.addRefresher(r, function()
local ok, s, col = pcall(fn)
if ok then
v.Text = tostring(s)
v.TextColor3 = col or Theme.Text
end
end)
end
return r
end
local function mmss(s)
s = math.max(0, math.floor(s + 0.5))
if s >= 3600 then return ("%d:%02d:%02d"):format(math.floor(s / 3600), math.floor(s % 3600 / 60), s % 60) end
return ("%d:%02d"):format(math.floor(s / 60), s % 60)
end
function UI.clock(box)
local r = UI.row(box, 50)
local MOON = Color3.fromRGB(196, 208, 255)
local orb = UI.new("Frame", { Parent = r, AnchorPoint = Vector2.new(0, 0.5), Position = UDim2.new(0, 1, 0, 8), Size = UDim2.fromOffset(7, 7),
BackgroundColor3 = Theme.Gold, BorderSizePixel = 0 }, { pill() })
local orbGlow = UI.new("Frame", { Parent = r, AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0, 4.5, 0, 8), Size = UDim2.fromOffset(15, 15),
BackgroundColor3 = Theme.Gold, BackgroundTransparency = 0.8, BorderSizePixel = 0 }, { pill() })
local now = text({ Parent = r, Position = UDim2.fromOffset(15, 0), Size = UDim2.new(0.5, -15, 0, 16), Text = "", FontFace = F.bold, TextSize = 12,
RichText = true })
local nxt = text({ Parent = r, AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, 0, 0, 0), Size = UDim2.new(0.5, 0, 0, 16), Text = "",
TextSize = 11, TextXAlignment = Enum.TextXAlignment.Right, RichText = true })
local rail = UI.new("Frame", { Parent = r, Position = UDim2.fromOffset(0, 24), Size = UDim2.new(1, 0, 0, 8), BackgroundColor3 = Theme.Track,
BorderSizePixel = 0, ClipsDescendants = true }, { pill() })
local window = UI.new("Frame", { Parent = rail, Position = UDim2.fromScale(Clock.DAY_MIN / Clock.DAY_MAX, 0),
Size = UDim2.fromScale(1 - Clock.DAY_MIN / Clock.DAY_MAX, 1), BackgroundColor3 = Theme.Accent, BackgroundTransparency = 0.72,
BorderSizePixel = 0 })
local fill = UI.new("Frame", { Parent = rail, Size = UDim2.fromScale(0, 1), BackgroundColor3 = Theme.Gold, BackgroundTransparency = 0.25,
BorderSizePixel = 0, ZIndex = 2 }, { pill() })
local shimmer = UI.new("Frame", { Parent = rail, Position = UDim2.fromScale(-0.3, 0), Size = UDim2.fromScale(0.3, 1),
BackgroundColor3 = Color3.new(1, 1, 1), BorderSizePixel = 0, ZIndex = 3 },
{ UI.new("UIGradient", { Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.5, 0.8),
NumberSequenceKeypoint.new(1, 1) }) }) })
local marker = UI.new("Frame", { Parent = r, AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0, 0, 0, 28), Size = UDim2.fromOffset(22, 22),
BackgroundTransparency = 1, ZIndex = 4 })
local halo = UI.new("Frame", { Parent = marker, AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0.5, 0.5), Size = UDim2.fromScale(1, 1),
BackgroundColor3 = Theme.Gold, BackgroundTransparency = 0.8, BorderSizePixel = 0, ZIndex = 4 }, { pill() })
local core = UI.new("Frame", { Parent = marker, AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0.5, 0.5), Size = UDim2.fromOffset(10, 10),
BackgroundColor3 = Theme.Gold, BorderSizePixel = 0, ZIndex = 5 }, { pill() })
local coreEdge = edge(Theme.Bottom)
coreEdge.Thickness = 2
coreEdge.Parent = core
local ticks = {}
for i, x in ipairs({ 0, 1 / 3, 2 / 3, 1 }) do
ticks[i] = text({ Parent = r, AnchorPoint = Vector2.new(x, 0), Position = UDim2.new(x, 0, 0, 38), Size = UDim2.fromOffset(30, 11), Text = "",
TextColor3 = Theme.Muted, TextSize = 9,
TextXAlignment = (i == 1 and Enum.TextXAlignment.Left) or (i == 4 and Enum.TextXAlignment.Right) or Enum.TextXAlignment.Center })
end
local breathe, lastPhase, sweep = false, nil, -0.3
UI.addRefresher(r, function()
local phase = Clock.phase or (Clock.isNight() and "night" or "day")
local night = phase == "night"
local tint = night and MOON or Theme.Gold
local e = Clock.elapsed()
local muted = "#" .. ThemeStore.hex(Theme.Muted)
local accent = "#" .. ThemeStore.hex(Theme.Accent)
orb.BackgroundColor3, orbGlow.BackgroundColor3 = tint, tint
core.BackgroundColor3, halo.BackgroundColor3, fill.BackgroundColor3 = tint, tint, tint
now.TextColor3 = tint
now.Text = (night and "Night" or "Day") .. (Clock.known and (' %s'):format("#" .. ThemeStore.hex(Theme.Text), mmss(e)) or "")
local frac
if night then
window.Visible = false
local left = Clock.nightLeft()
if left then
nxt.Text = ('day in %s'):format(muted, mmss(left))
frac = math.clamp(e / Clock.NIGHT_LEN, 0, 1)
else
nxt.Text = ('ends within 2:35'):format(muted)
end
if lastPhase ~= phase then ticks[1].Text, ticks[2].Text, ticks[3].Text, ticks[4].Text = "0:00", "", "", "2:35" end
else
window.Visible = true
if Clock.known and e < Clock.DAY_MIN then
nxt.Text = ('night no sooner than %s'):format(muted, mmss(Clock.DAY_MIN - e))
elseif Clock.known then
nxt.Text = ('night due · within %s'):format(muted, mmss(math.max(0, Clock.DAY_MAX - e)))
else
nxt.Text = ('night within 30:00'):format(muted)
end
if Clock.known then frac = math.clamp(e / Clock.DAY_MAX, 0, 1) end
if lastPhase ~= phase then ticks[1].Text, ticks[2].Text, ticks[3].Text, ticks[4].Text = "0", "10m", "20m", "30m" end
end
nxt.TextColor3 = Theme.Text
lastPhase = phase
breathe = not breathe
anim(orbGlow, 0.5, { BackgroundTransparency = breathe and 0.65 or 0.88 })
if frac then
fill.Visible, marker.Visible, shimmer.Visible = true, true, false
anim(fill, 0.5, { Size = UDim2.fromScale(frac, 1) })
anim(marker, 0.5, { Position = UDim2.new(frac, 0, 0, 28) })
anim(halo, 0.5, { BackgroundTransparency = breathe and 0.68 or 0.86, Size = breathe and UDim2.fromScale(1, 1) or UDim2.fromScale(0.8, 0.8) })
else
fill.Visible, marker.Visible, shimmer.Visible = false, false, true
sweep = sweep + 0.16
if sweep > 1.05 then sweep = -0.3 end
anim(shimmer, 0.5, { Position = UDim2.fromScale(sweep, 0) })
end
end)
return r
end
function UI.keybind(box, label, key)
local r = UI.row(box, 24)
text({ Parent = r, Size = UDim2.new(0.5, 0, 1, 0), Text = label, TextSize = 12, TextColor3 = Theme.Sub })
local b = UI.new("TextButton", {
Parent = r, AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, 0, 0, 0), Size = UDim2.new(0, 0, 1, 0),
AutomaticSize = Enum.AutomaticSize.X, BackgroundColor3 = Theme.Raised, AutoButtonColor = false, BorderSizePixel = 0,
Text = Config[key], TextColor3 = Theme.Text, FontFace = F.med, TextSize = 11,
}, { corner(7), pad(10, 10, 0, 0), edge(Theme.Line) })
utrack(b.Activated:Connect(function()
b.Text = "Press a key"
b.TextColor3 = Theme.Accent
UI.listening = function(code)
Config[key] = code.Name
App.save()
if b.Parent then
b.Text = code.Name
b.TextColor3 = Theme.Text
end
end
end))
return r
end
function UI.openPicker(anchor, role, onDone)
UI.closePopup()
local start = UI.base[role]
local h, s, v = start:ToHSV()
local x, y, w, ah = UI.local_(anchor)
local PW, PH = 214, 182
local winW = UI.win.AbsoluteSize.X / math.max(UI.scale.Scale, 0.01)
local winH = UI.win.AbsoluteSize.Y / math.max(UI.scale.Scale, 0.01)
local px = math.clamp(x + w - PW, 6, winW - PW - 6)
local py = y + ah + 6
if py + PH > winH - 6 then py = math.max(6, y - PH - 6) end
local panel = UI.new("Frame", { Parent = UI.overlay, Position = UDim2.fromOffset(px, py), Size = UDim2.fromOffset(PW, PH),
BackgroundColor3 = Theme.Raised, BorderSizePixel = 0, ZIndex = 51, Active = true }, { corner(10), edge(Theme.Line2), pad(10, 10, 10, 10) })
local sq = UI.new("Frame", { Parent = panel, Size = UDim2.new(1, -24, 0, 120), BackgroundColor3 = Color3.fromHSV(h, 1, 1), BorderSizePixel = 0,
ZIndex = 52, Active = true }, { corner(6) })
UI.new("Frame", { Parent = sq, Size = UDim2.fromScale(1, 1), BackgroundColor3 = Color3.new(1, 1, 1), BorderSizePixel = 0, ZIndex = 53 },
{ corner(6), UI.new("UIGradient", { Transparency = NumberSequence.new(0, 1) }) })
UI.new("Frame", { Parent = sq, Size = UDim2.fromScale(1, 1), BackgroundColor3 = Color3.new(0, 0, 0), BorderSizePixel = 0, ZIndex = 54 },
{ corner(6), UI.new("UIGradient", { Rotation = 90, Transparency = NumberSequence.new(1, 0) }) })
local dot = UI.new("Frame", { Parent = sq, AnchorPoint = Vector2.new(0.5, 0.5), Size = UDim2.fromOffset(10, 10), BackgroundTransparency = 1,
ZIndex = 55 }, { pill() })
local dotEdge = edge(Color3.new(1, 1, 1))
dotEdge.Thickness = 2
dotEdge.Parent = dot
local hueKeys = {}
for i = 0, 6 do table.insert(hueKeys, ColorSequenceKeypoint.new(i / 6, Color3.fromHSV((i / 6) % 1, 1, 1))) end
local hue = UI.new("Frame", { Parent = panel, AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, 0, 0, 0), Size = UDim2.fromOffset(14, 120),
BackgroundColor3 = Color3.new(1, 1, 1), BorderSizePixel = 0, ZIndex = 52, Active = true },
{ corner(5), UI.new("UIGradient", { Rotation = 90, Color = ColorSequence.new(hueKeys) }) })
local hueMark = UI.new("Frame", { Parent = hue, AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0.5, h), Size = UDim2.new(1, 4, 0, 4),
BackgroundColor3 = Color3.new(1, 1, 1), BorderSizePixel = 0, ZIndex = 53 }, { pill() })
local swatch = UI.new("Frame", { Parent = panel, Position = UDim2.fromOffset(0, 132), Size = UDim2.fromOffset(30, 30), BorderSizePixel = 0,
BackgroundColor3 = start, ZIndex = 52 }, { corner(7), edge(Theme.Line2) })
local hexBox = UI.new("TextBox", { Parent = panel, Position = UDim2.fromOffset(38, 132), Size = UDim2.new(1, -38, 0, 30),
BackgroundColor3 = Theme.Raised2, BorderSizePixel = 0, ClearTextOnFocus = false, Text = "#" .. ThemeStore.hex(start),
TextColor3 = Theme.Text, FontFace = F.mono, TextSize = 12, ZIndex = 52 }, { corner(7), edge(Theme.Line) })
local current = start
local lastLive, previewed = 0, false
local function preview(force)
if not force and os.clock() - lastLive < 0.05 then return end
lastLive = os.clock()
local old = {}
for k, c in pairs(Theme) do old[k] = c end
UI.base[role] = current
UI.derive()
UI.recolor(old, Theme, panel)
previewed = true
end
local function update(live)
current = Color3.fromHSV(h, s, v)
sq.BackgroundColor3 = Color3.fromHSV(h, 1, 1)
dot.Position = UDim2.fromScale(s, 1 - v)
hueMark.Position = UDim2.fromScale(0.5, h)
swatch.BackgroundColor3 = current
if not hexBox:IsFocused() then hexBox.Text = "#" .. ThemeStore.hex(current) end
if live then preview(live == "force") end
anchor.BackgroundColor3 = current
end
update(false)
local mode, lastDrag = nil, 0
UI.setPopupPanel(panel)
UI.popupGuard = function(i)
return mode ~= nil or os.clock() - lastDrag < 0.25 or UI.overPopup(i)
end
local function track_(i)
if mode == "sq" then
s = math.clamp((i.Position.X - sq.AbsolutePosition.X) / math.max(sq.AbsoluteSize.X, 1), 0, 1)
v = 1 - math.clamp((i.Position.Y - sq.AbsolutePosition.Y) / math.max(sq.AbsoluteSize.Y, 1), 0, 1)
elseif mode == "hue" then
h = math.clamp((i.Position.Y - hue.AbsolutePosition.Y) / math.max(hue.AbsoluteSize.Y, 1), 0, 0.999)
end
lastDrag = os.clock()
update(true)
end
utrack(sq.InputBegan:Connect(function(i) if isPress(i) then mode = "sq" track_(i) end end))
utrack(hue.InputBegan:Connect(function(i) if isPress(i) then mode = "hue" track_(i) end end))
utrack(S.UIS.InputChanged:Connect(function(i) if mode and isMoveInput(i) then track_(i) end end))
utrack(S.UIS.InputEnded:Connect(function(i)
if isPress(i) and mode then
mode = nil
lastDrag = os.clock()
update("force")
end
end))
utrack(hexBox.FocusLost:Connect(function()
local c = ThemeStore.color(hexBox.Text)
if c then
h, s, v = c:ToHSV()
end
update("force")
end))
UI.onPopupClose = function()
if ThemeStore.hex(current) ~= ThemeStore.hex(start) then
onDone(current)
elseif previewed then
UI.base[role] = start
task.defer(UI.rebuild)
end
end
UI.overlay.Visible = true
end
function UI.colorRow(box, label, role)
local r = UI.row(box, 20)
text({ Parent = r, Size = UDim2.new(1, -50, 1, 0), Text = label, TextSize = 12, TextColor3 = Theme.Sub })
local sw = UI.new("TextButton", { Parent = r, AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, 0, 0.5, 0), Size = UDim2.fromOffset(36, 16),
BackgroundColor3 = UI.base[role], AutoButtonColor = false, BorderSizePixel = 0, Text = "" }, { corner(5), edge(Theme.Line2) })
utrack(sw.Activated:Connect(function()
UI.openPicker(sw, role, function(c)
UI.base[role] = c
UI.themeName = "Custom"
ThemeStore.setCurrent(UI.base, UI.themeName)
task.defer(UI.rebuild)
end)
end))
return r
end
function UI.applyTheme(base, name)
UI.base = base
UI.themeName = name or "Custom"
ThemeStore.setCurrent(UI.base, UI.themeName)
task.defer(UI.rebuild)
end
UI.TUTORIAL = {
{ "Pick a role", "On the Alts tab, choose Solo for one account. With more accounts, choose Main on yours and Alt on the rest." },
{ "Choose your targets", "Turn on what you want on the Targets tab: Vicious Bee, Windy Bee, sprouts, Mondo Chick and bosses." },
{ "Press Start", "It hops servers and fights on its own, and loads itself again after every hop. RightControl hides the menu." },
{ "Alts on other PCs", "Accounts on the same PC link by themselves (local sync). For other PCs, press New key under Online room on the Alts tab and paste it into each account." },
}
function UI.tutorial()
if X.read("tutorial_done.txt") or not UI.win then return end
local step = 1
local root = UI.new("TextButton", { Parent = UI.win, Size = UDim2.fromScale(1, 1), BackgroundColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 0.45, Text = "", AutoButtonColor = false, ZIndex = 60 }, { corner(12) })
local card = UI.new("Frame", { Parent = root, AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0.5, 0.5),
Size = UDim2.fromOffset(330, 0), AutomaticSize = Enum.AutomaticSize.Y, BackgroundColor3 = Theme.Main or Theme.Raised,
BorderSizePixel = 0, ZIndex = 61 }, { corner(14), edge(Theme.Line), pad(18, 18, 16, 16), list(10) })
local count = text({ Parent = card, LayoutOrder = 1, Size = UDim2.new(1, 0, 0, 14), Text = "", TextColor3 = Theme.Accent,
FontFace = F.bold, TextSize = 11, ZIndex = 62 })
local title = text({ Parent = card, LayoutOrder = 2, Size = UDim2.new(1, 0, 0, 20), Text = "", FontFace = F.bold, TextSize = 17, ZIndex = 62 })
local body = text({ Parent = card, LayoutOrder = 3, Size = UDim2.new(1, 0, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, Text = "",
TextColor3 = Theme.Sub, TextSize = 13, TextWrapped = true, LineHeight = 1.15, ZIndex = 62 })
local row = UI.new("Frame", { Parent = card, LayoutOrder = 4, Size = UDim2.new(1, 0, 0, 30), BackgroundTransparency = 1, ZIndex = 62 })
local function button(label, x, w, primary)
local b = UI.new("TextButton", { Parent = row, AnchorPoint = Vector2.new(x > 0 and 1 or 0, 0), Position = UDim2.new(x > 0 and 1 or 0, x > 0 and -(x - 1) or 0, 0, 0),
Size = UDim2.fromOffset(w, 30), BackgroundColor3 = primary and Theme.Accent or Theme.Raised, AutoButtonColor = false, Text = label,
FontFace = F.bold, TextSize = 12, TextColor3 = primary and (Theme.OnAccent or Color3.new(0, 0, 0)) or Theme.Sub, ZIndex = 63 },
{ corner(8), primary and accentGrad() or edge(Theme.Line) })
return b
end
local skip = UI.new("TextButton", { Parent = row, Size = UDim2.fromOffset(100, 30), BackgroundTransparency = 1, Text = "Skip tutorial",
FontFace = F.med, TextSize = 12, TextColor3 = Theme.Muted, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 63 })
local nextB = button("Next", 1, 78, true)
local backB = button("Back", 86, 64, false)
local function done()
X.write("tutorial_done.txt", "done " .. os.date("%Y-%m-%d"))
root:Destroy()
end
local function show()
local st = UI.TUTORIAL[step]
count.Text = ("STEP %d OF %d"):format(step, #UI.TUTORIAL)
title.Text, body.Text = st[1], st[2]
nextB.Text = step == #UI.TUTORIAL and "Done" or "Next"
backB.Visible = step > 1
end
utrack(skip.Activated:Connect(done))
utrack(backB.Activated:Connect(function() step = math.max(1, step - 1) show() end))
utrack(nextB.Activated:Connect(function()
if step == #UI.TUTORIAL then done() else step = step + 1 show() end
end))
show()
end
function UI.build()
UI.gen = UI.gen + 1
local myGen = UI.gen
UI.painters, UI.refreshers, UI.vis, UI.tabs, UI.current, UI.listening = {}, {}, {}, {}, nil, nil
UI.derive()
local gui = UI.new("ScreenGui", {
Name = "StingersNow", ResetOnSpawn = false, IgnoreGuiInset = true,
ZIndexBehavior = Enum.ZIndexBehavior.Sibling, DisplayOrder = 60,
})
if not pcall(function() gui.Parent = (gethui and gethui()) or S.CoreGui end) or not gui.Parent then
gui.Parent = LP:WaitForChild("PlayerGui")
end
UI.gui = gui
App.gui = gui
local W = 600
local M, GAP = 14, 10
local HEAD_H, TABS_H, FOOT_H = 50, 34, 30
local BODY_Y = HEAD_H + TABS_H + 12
local shell = UI.new("Frame", { Parent = gui, Size = UDim2.fromOffset(W, 420), Position = UDim2.new(0.5, -W / 2, 0.5, -210),
BackgroundTransparency = 1, Visible = Config.UIOpen })
local shellScale = UI.new("UIScale", { Parent = shell })
UI.shell, UI.scale = shell, shellScale
for _, sd in ipairs({ { 4, 0.9 }, { 10, 0.94 }, { 18, 0.97 } }) do
UI.new("Frame", { Parent = shell, AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0.5, 0, 0.5, 6),
Size = UDim2.new(1, sd[1] * 2, 1, sd[1] * 2), BackgroundColor3 = Color3.new(0, 0, 0), BackgroundTransparency = sd[2],
BorderSizePixel = 0 }, { corner(12 + sd[1]) })
end
local win = UI.new("Frame", {
Parent = shell, Size = UDim2.fromScale(1, 1), BackgroundColor3 = Color3.new(1, 1, 1), BorderSizePixel = 0, Active = true,
ClipsDescendants = true,
}, { corner(12), vgrad(Theme.Top, Theme.Bottom), edge(Theme.Line2, 0.25) })
UI.win = win
UI.new("Frame", { Parent = win, Position = UDim2.fromOffset(12, 0), Size = UDim2.new(1, -24, 0, 1), BackgroundColor3 = Color3.new(1, 1, 1),
BackgroundTransparency = 0.93, BorderSizePixel = 0 })
local head = UI.new("Frame", { Parent = win, Size = UDim2.new(1, 0, 0, HEAD_H), BackgroundTransparency = 1, Active = true })
local brand = UI.new("Frame", { Parent = head, Position = UDim2.fromOffset(M, 0), Size = UDim2.new(0, 0, 1, 0),
AutomaticSize = Enum.AutomaticSize.X, BackgroundTransparency = 1 }, { list(9, true) })
UI.logo(brand, 24, 2).LayoutOrder = 1
text({ Parent = brand, LayoutOrder = 2, Size = UDim2.new(0, 0, 0, 20), AutomaticSize = Enum.AutomaticSize.X, Text = "stingers.now",
FontFace = F.bold, TextSize = 14 })
do
local vtag = UI.new("Frame", { Parent = brand, LayoutOrder = 3, Size = UDim2.fromOffset(0, 17), AutomaticSize = Enum.AutomaticSize.X,
BackgroundColor3 = Theme.Raised, BorderSizePixel = 0 }, { pill(), pad(7, 7, 0, 0), edge(Theme.Line) })
text({ Parent = vtag, Size = UDim2.new(0, 0, 1, 0), AutomaticSize = Enum.AutomaticSize.X, Text = VERSION, TextSize = 10, TextColor3 = Theme.Muted })
end
local closeBtn = UI.new("TextButton", {
Parent = head, AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -(M - 4), 0.5, 0), Size = UDim2.fromOffset(28, 28),
BackgroundColor3 = Theme.Raised, BackgroundTransparency = 1, AutoButtonColor = false, Text = "", BorderSizePixel = 0,
}, { corner(8) })
UI.new("Frame", { Parent = closeBtn, AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0.5, 0.5), Size = UDim2.fromOffset(10, 2),
BackgroundColor3 = Theme.Sub, BorderSizePixel = 0 }, { pill() })
utrack(closeBtn.MouseEnter:Connect(function() anim(closeBtn, 0.15, { BackgroundTransparency = 0 }) end))
utrack(closeBtn.MouseLeave:Connect(function() anim(closeBtn, 0.15, { BackgroundTransparency = 1 }) end))
local status = UI.new("Frame", { Parent = head, AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -(M + 30), 0.5, 0),
Size = UDim2.fromOffset(0, 24), AutomaticSize = Enum.AutomaticSize.X, BackgroundColor3 = Theme.Raised, BorderSizePixel = 0 },
{ pill(), pad(0, 11, 0, 0), edge(Theme.Line) })
local statusDot = UI.new("Frame", { Parent = status, AnchorPoint = Vector2.new(0, 0.5), Position = UDim2.new(0, 10, 0.5, 0),
Size = UDim2.fromOffset(6, 6), BackgroundColor3 = Theme.Muted, BorderSizePixel = 0 }, { pill() })
local statusWords = UI.new("Frame", { Parent = status, AnchorPoint = Vector2.new(0, 0.5), Position = UDim2.new(0, 23, 0.5, 0),
Size = UDim2.fromOffset(0, 14), AutomaticSize = Enum.AutomaticSize.X, BackgroundTransparency = 1 }, { list(6, true) })
local statusText = text({ Parent = statusWords, LayoutOrder = 1, Size = UDim2.fromOffset(0, 14), AutomaticSize = Enum.AutomaticSize.X,
Text = "Idle", TextColor3 = Theme.Sub, TextSize = 11, TextYAlignment = Enum.TextYAlignment.Center })
local statusRole = text({ Parent = statusWords, LayoutOrder = 2, Size = UDim2.fromOffset(0, 14), AutomaticSize = Enum.AutomaticSize.X,
Text = Config.Role, TextColor3 = Theme.Muted, TextSize = 11, TextYAlignment = Enum.TextYAlignment.Center })
local tabTrack = UI.new("Frame", { Parent = win, Position = UDim2.fromOffset(M, HEAD_H), Size = UDim2.new(1, -(M * 2 + 104), 0, TABS_H),
BackgroundColor3 = Theme.Raised, BorderSizePixel = 0 }, { corner(10), edge(Theme.Line) })
local tabPill = UI.new("Frame", { Parent = tabTrack, Position = UDim2.fromOffset(3, 3), Size = UDim2.fromOffset(60, TABS_H - 6),
BackgroundColor3 = Theme.Raised2, BorderSizePixel = 0 }, { corner(8), edge(Theme.Line2, 0.3) })
local tabHolder = UI.new("Frame", { Parent = tabTrack, Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, ZIndex = 2 },
{ list(0, true), pad(3, 3, 0, 0) })
local startBtn = UI.new("TextButton", {
Parent = win, AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -M, 0, HEAD_H), Size = UDim2.fromOffset(96, TABS_H),
BackgroundColor3 = Color3.new(1, 1, 1), AutoButtonColor = false, BorderSizePixel = 0, Text = "",
}, { corner(10) })
local startGrad = accentGrad()
startGrad.Parent = startBtn
local startEdge = edge(Theme.Accent, 1)
startEdge.Parent = startBtn
local startText = text({ Parent = startBtn, Size = UDim2.fromScale(1, 1), Text = "Start", FontFace = F.bold, TextSize = 13,
TextColor3 = Theme.OnAccent, TextXAlignment = Enum.TextXAlignment.Center })
utrack(startBtn.Activated:Connect(function() App.setRunning(not Config.Running) end))
utrack(startBtn.MouseEnter:Connect(function() anim(startText, 0.12, { TextTransparency = 0.15 }) end))
utrack(startBtn.MouseLeave:Connect(function() anim(startText, 0.12, { TextTransparency = 0 }) end))
local body = UI.new("Frame", { Parent = win, Position = UDim2.fromOffset(M, BODY_Y), Size = UDim2.new(1, -M * 2, 1, -(BODY_Y + FOOT_H)),
BackgroundTransparency = 1 })
local foot = UI.new("Frame", { Parent = win, AnchorPoint = Vector2.new(0, 1), Position = UDim2.new(0, 0, 1, 0), Size = UDim2.new(1, 0, 0, FOOT_H),
BackgroundColor3 = Theme.Foot, BorderSizePixel = 0 }, { corner(12) })
UI.new("Frame", { Parent = foot, Size = UDim2.new(1, 0, 0, 12), BackgroundColor3 = Theme.Foot, BorderSizePixel = 0 })
UI.new("Frame", { Parent = foot, Size = UDim2.new(1, 0, 0, 1), BackgroundColor3 = Theme.Line, BorderSizePixel = 0, ZIndex = 2 })
local footDot = UI.new("Frame", { Parent = foot, AnchorPoint = Vector2.new(0, 0.5), Position = UDim2.new(0, M + 2, 0.5, 0), Size = UDim2.fromOffset(5, 5),
BackgroundColor3 = Theme.Muted, BorderSizePixel = 0, ZIndex = 2 }, { pill() })
local footLeft = text({ Parent = foot, Position = UDim2.fromOffset(M + 14, 0), Size = UDim2.new(1, -(M * 2 + 220), 1, 0), Text = "",
TextColor3 = Theme.Sub, TextSize = 11, TextTruncate = Enum.TextTruncate.AtEnd, ZIndex = 2 })
local footRight = text({ Parent = foot, AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -(M + 2), 0, 0), Size = UDim2.fromOffset(210, FOOT_H),
Text = "", TextColor3 = Theme.Muted, TextSize = 11, TextXAlignment = Enum.TextXAlignment.Right, ZIndex = 2 })
local overlay = UI.new("TextButton", { Parent = win, Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, Text = "",
AutoButtonColor = false, Visible = false, ZIndex = 50 })
UI.overlay = overlay
utrack(S.UIS.InputBegan:Connect(function(i)
if not overlay.Visible or not isPress(i) then return end
if UI.popupGuard and UI.popupGuard(i) then return end
UI.closePopup()
end))
local function column(parent, right)
return UI.new("ScrollingFrame", {
Parent = parent, Position = UDim2.new(right and 0.5 or 0, right and GAP / 2 or 0, 0, 0), Size = UDim2.new(0.5, -GAP / 2, 1, 0),
BackgroundTransparency = 1, BorderSizePixel = 0, ScrollBarThickness = 2, ScrollBarImageColor3 = Theme.Line2,
CanvasSize = UDim2.new(), AutomaticCanvasSize = Enum.AutomaticSize.Y, ScrollingDirection = Enum.ScrollingDirection.Y,
}, { list(GAP) })
end
local function placePill(instant)
local t = UI.current
if not t or not t.btn.Parent then return end
local sc = math.max(shellScale.Scale, 0.01)
local x = (t.btn.AbsolutePosition.X - tabTrack.AbsolutePosition.X) / sc
local w = t.btn.AbsoluteSize.X / sc
if w < 4 then return end
local pos, size = UDim2.fromOffset(x, 3), UDim2.fromOffset(w, TABS_H - 6)
if instant then tabPill.Position, tabPill.Size = pos, size else anim(tabPill, 0.28, { Position = pos, Size = size }) end
end
local function fitHeight(instant)
local t = UI.current
if not t then return end
local sc = math.max(shellScale.Scale, 0.01)
local function contentH(col)
local l = col:FindFirstChildOfClass("UIListLayout")
return l and l.AbsoluteContentSize.Y / sc or 0
end
local need = BODY_Y + math.max(contentH(t.left), contentH(t.right)) + M + FOOT_H
local cam = workspace.CurrentCamera
local maxH = cam and (cam.ViewportSize.Y / sc - 40) or 640
local h = math.floor(math.clamp(need, 200, math.max(maxH, 200)))
if instant then shell.Size = UDim2.fromOffset(W, h) else anim(shell, 0.26, { Size = UDim2.fromOffset(W, h) }) end
end
local function selectTab(name, instant)
for _, t in ipairs(UI.tabs) do
local on = t.name == name
t.page.Visible = on
if instant then t.lbl.TextColor3 = on and Theme.Text or Theme.Muted
else anim(t.lbl, 0.2, { TextColor3 = on and Theme.Text or Theme.Muted }) end
if on then UI.current = t end
end
if Config.Tab ~= name then
Config.Tab = name
App.save()
end
UI.closePopup()
placePill(instant)
fitHeight(instant)
end
local function tab(name)
local btn = UI.new("TextButton", {
Parent = tabHolder, LayoutOrder = #UI.tabs + 1, Size = UDim2.new(0, 0, 1, 0), AutomaticSize = Enum.AutomaticSize.X,
BackgroundTransparency = 1, Text = "", AutoButtonColor = false, ZIndex = 2,
}, { pad(8, 8, 0, 0) })
local lbl = text({ Parent = btn, Size = UDim2.new(0, 0, 1, 0), AutomaticSize = Enum.AutomaticSize.X, Text = name,
TextColor3 = Theme.Muted, TextSize = 12, ZIndex = 3 })
local page = UI.new("Frame", { Parent = body, Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, Visible = false })
local t = { name = name, btn = btn, lbl = lbl, page = page }
t.left, t.right = column(page, false), column(page, true)
for _, col in ipairs({ t.left, t.right }) do
utrack(col:FindFirstChildOfClass("UIListLayout"):GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
if UI.current == t then fitHeight(false) end
end))
end
table.insert(UI.tabs, t)
utrack(btn.Activated:Connect(function() selectTab(name) end))
utrack(btn.MouseEnter:Connect(function() if UI.current ~= t then anim(lbl, 0.12, { TextColor3 = Theme.Sub }) end end))
utrack(btn.MouseLeave:Connect(function() if UI.current ~= t then anim(lbl, 0.12, { TextColor3 = Theme.Muted }) end end))
return t
end
local function box(col, title, visibleIf)
local frame = UI.new("Frame", {
Parent = col, LayoutOrder = #col:GetChildren(), Size = UDim2.new(1, 0, 0, 0), AutomaticSize = Enum.AutomaticSize.Y,
BackgroundColor3 = Color3.new(1, 1, 1), BorderSizePixel = 0,
}, { corner(10), vgrad(Theme.PanelTop, Theme.PanelBot), edge(Theme.Line), list(0) })
local top = UI.new("Frame", { Parent = frame, LayoutOrder = 0, Size = UDim2.new(1, 0, 0, 34), BackgroundTransparency = 1 })
UI.new("Frame", { Parent = top, AnchorPoint = Vector2.new(0, 0.5), Position = UDim2.new(0, 13, 0.5, 0), Size = UDim2.fromOffset(5, 5),
BackgroundColor3 = Theme.Accent, BorderSizePixel = 0 }, { corner(2) })
text({ Parent = top, Position = UDim2.fromOffset(25, 0), Size = UDim2.new(1, -38, 1, 0), Text = title:upper(), FontFace = F.bold,
TextSize = 10, TextColor3 = Theme.Sub })
UI.new("Frame", { Parent = top, AnchorPoint = Vector2.new(0, 1), Position = UDim2.new(0, 13, 1, 0), Size = UDim2.new(1, -26, 0, 1),
BackgroundColor3 = Theme.Line, BorderSizePixel = 0 })
local inner = UI.new("Frame", {
Parent = frame, LayoutOrder = 1, Size = UDim2.new(1, 0, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, BackgroundTransparency = 1,
}, { list(10), pad(13, 13, 11, 13) })
if visibleIf then table.insert(UI.vis, { row = frame, fn = visibleIf }) end
return { frame = frame, body = inner, rows = 0 }
end
local tHunt, tTargets, tPlanters, tHop, tAlts = tab("Hunt"), tab("Targets"), tab("Planters"), tab("Hopping"), tab("Alts")
local tAlerts, tTheme, tSettings = tab("Alerts"), tab("Theme"), tab("Settings")
local function isAlt() return Config.Role == "Alt" end
local function isMain() return Config.Role == "Main" end
do
local b = box(tHunt.left, "Status")
UI.live(b, 34, function() return Log.text, Theme.Text end, { size = 14 })
UI.clock(b)
UI.pair(b, "Server", function()
if App.private then return "Private", Theme.Gold end
return ("%d of %d players"):format(#S.Players:GetPlayers(), S.Players.MaxPlayers)
end)
UI.pair(b, "Hive", function()
local h = Hive.mine()
local bees = Game.bees()
return (h and h.Name or "None") .. (bees and (" · " .. bees .. " bees") or "")
end)
local a = box(tHunt.left, "Log")
UI.live(a, 70, function()
local out = {}
for i = math.max(1, #Log.lines - 4), #Log.lines do
table.insert(out, (Log.lines[i]:gsub("^(%d+:%d+):%d+%s+", "%1 ")))
end
return #out > 0 and table.concat(out, "\n") or "Nothing yet", Theme.Muted
end, { font = F.mono, size = 11, lineHeight = 1.1 })
UI.buttons(a, {
{ "Copy log", function()
if type(setclipboard) ~= "function" then return "Can't copy" end
setclipboard(table.concat(Log.lines, "\n"))
return "Copied"
end },
})
local t = box(tHunt.right, "Target")
UI.slider(t, "Lowest level", "MinLevel", 1, 12, 1, plain, function(v)
if Config.MaxLevel < v then Config.MaxLevel = v end
for _, p in ipairs(UI.painters) do pcall(p) end
end)
UI.slider(t, "Highest level", "MaxLevel", 1, 12, 1, plain, function(v)
if Config.MinLevel > v then Config.MinLevel = v end
for _, p in ipairs(UI.painters) do pcall(p) end
end)
UI.switch(t, "Gifted only", "GiftedOnly")
UI.switch(t, "Join fights already going", "HelpFights")
UI.switch(t, "Grab battle tokens", "GrabBattle")
local n = box(tHunt.right, "Night")
UI.slider(n, "Watch for a spike", "SpikeWait", 2, 20, 1, secs)
local s = box(tHunt.right, "Session")
UI.numbers(s, {
{ "Servers", function() return fmtNum(Stats.data.servers) end },
{ "Found", function() return fmtNum(Stats.data.found) end },
{ "Killed", function() return fmtNum(Stats.data.killed) end },
{ "Gifted", function() return fmtNum(Stats.data.gifted), Stats.data.gifted > 0 and Theme.Gold or nil end },
{ "Stingers", function() return fmtNum(Stats.data.stingers) end },
{ "Time", function() return fmtTime(Stats.data.seconds) end },
})
end
do
local v = box(tTargets.left, "Rogue Vicious Bee")
UI.switch(v, "Hunt Vicious Bees", "Vicious")
local w = box(tTargets.left, "Wild Windy Bee")
UI.switch(w, "Hunt Windy Bees", "Windy")
UI.slider(w, "Skip if it flees within", "WindyMinTime", 0, 270, 10, secs, nil, function() return Config.Windy end)
local mo = box(tTargets.left, "Mondo Chick")
UI.switch(mo, "Auto Mondo", "Mondo")
UI.pair(mo, "Next one in", function()
local s = Jobs.mondoIn()
return ("%d:%02d"):format(math.floor(s / 60), s % 60)
end, function() return Config.Mondo end)
local sp = box(tTargets.right, "Sprouts")
UI.switch(sp, "Farm sprouts", "Sprouts")
local rarities = {}
for i = 2, #Jobs.RARITIES do table.insert(rarities, Jobs.RARITIES[i]) end
UI.multi(sp, "Rarities", rarities, function(r) return Config.SproutWant[r] ~= false end, function(r)
Config.SproutWant[r] = Config.SproutWant[r] == false
App.save()
end, function() return Config.Sprouts end)
local bo = box(tTargets.right, "Bosses")
UI.input(bo, "Recorded route", { secret = true, get = function() return "" end, set = function(v)
local key, n = Jobs.setRoute(v)
if key then Log.add(("Saved a %d-point route for %s"):format(n, key)) else Log.add(n) end
end }, "Paste from the route recorder")
for _, b in ipairs(Jobs.BOSSES) do
UI.pair(bo, b.label .. " route", function()
local r, kind = Jobs.routeFor(b)
if r then return ("%s, %d points"):format(kind, #r), Theme.Text end
return "automatic", Theme.Muted
end)
end
UI.buttons(bo, { { "Clear routes", function()
Config.BossRoutes = {}
App.save()
return "Cleared"
end } })
UI.pair(bo, "Recording", function()
local r = Jobs.rec
if not r then return "off", Theme.Muted end
return ("%s · %d point%s"):format(r.boss.label, #r.points, #r.points == 1 and "" or "s"), Theme.Accent
end)
UI.buttons(bo, { { "Record", Jobs.recStart }, { "Add point (P)", Jobs.recAdd } })
UI.buttons(bo, { { "Undo", Jobs.recUndo }, { "Save", Jobs.recSave }, { "Cancel", Jobs.recCancel } })
local df = box(tTargets.left, "During fights")
UI.switch(df, "Maintain Precision (x10)", "Precision")
UI.switch(df, "Grab Digital Bee tokens", "DigitalTokens")
UI.pair(df, "Precision", function()
local n = Game.buffStack("precision")
return n > 0 and ("x" .. n) or "none", n >= 10 and Theme.Good or (n > 0 and Theme.Text or Theme.Muted)
end)
UI.pair(df, "Haste", function()
local n = Game.buffStack("haste")
return n > 0 and ("x" .. n) or "none", n > 0 and Theme.Text or Theme.Muted
end)
for _, b in ipairs(Jobs.BOSSES) do
UI.switch(bo, b.label, b.key)
UI.pair(bo, "Back in", function()
local t, kind = Jobs.bossStatus(b)
return t, (kind == "good" and Theme.Good) or (kind == "muted" and Theme.Muted) or Theme.Text
end, function() return Config[b.key] end)
end
end
do
local function plOn() return Config.Planters end
local function smart() return Config.Planters and Config.PlanterMode == "Smart" end
local function manual() return Config.Planters and Config.PlanterMode == "Manual" end
local repaint = function() for _, p in ipairs(UI.painters) do pcall(p) end end
local b = box(tPlanters.left, "Planters")
UI.switch(b, "Auto planters", "Planters")
UI.dropdown(b, "Mode", "PlanterMode", { "Smart", "Manual" }, nil, plOn, true)
UI.dropdown(b, "Preset", { get = function() return Config.PlanterPreset end, set = function(v)
if v == "Custom" and Config.PlanterPreset ~= "Custom" then Config.NectarOrder = Jobs.nectarOrder() end
Config.PlanterPreset = v
App.save()
end }, Jobs.PRESET_NAMES, repaint, smart, true)
for i, label in ipairs({ "1st", "2nd", "3rd", "4th", "5th" }) do
UI.dropdown(b, label, { get = function() return Jobs.nectarOrder()[i] end, set = function(v)
if Config.PlanterPreset ~= "Custom" then
Config.NectarOrder = Jobs.nectarOrder()
Config.PlanterPreset = "Custom"
end
local order = Config.NectarOrder
for j = 1, #order do
if order[j] == v then order[j] = order[i] end
end
order[i] = v
App.save()
end }, Jobs.NECTARS, repaint, smart, true)
end
UI.multi(b, "Planters to use", Jobs.PLANTER_RANK, function(n) return Config.PlanterUse[n] ~= false end, function(n)
Config.PlanterUse[n] = Config.PlanterUse[n] == false
App.save()
end, smart)
for s = 1, 3 do
UI.dropdown(b, "Planter " .. s, "Planter" .. s, Jobs.PLANTER_NAMES, nil, manual, true)
UI.dropdown(b, "Field " .. s, "PlanterField" .. s, Jobs.FIELD_NAMES, nil, manual, true)
end
local h = box(tPlanters.right, "Harvest")
UI.dropdown(h, "Harvest", "PlanterHarvestMode", { "For nectar", "Full growth" }, nil, plOn, true)
UI.slider(h, "After", "PlanterHours", 0.5, 12, 0.5, function(v) return ("%.1f h"):format(v) end, nil,
function() return Config.Planters and Config.PlanterHarvestMode == "For nectar" end)
UI.slider(h, "Skip nectar above", "NectarCap", 50, 100, 5, function(v) return plain(v) .. "%" end, nil, smart)
local n = box(tPlanters.right, "Nectar")
for _, name in ipairs(Jobs.NECTARS) do
UI.pair(n, name, function()
local pct = Jobs.nectarPct(name)
if not pct then return "?" end
local w = Jobs.nectarWeights()[name] or 0
return ("%d%%"):format(math.floor(pct + 0.5)), (w >= 3 and Theme.Accent) or (pct >= Config.NectarCap and Theme.Good) or Theme.Text
end)
end
local sl = box(tPlanters.right, "Slots")
for s = 1, 3 do
UI.pair(sl, "Slot " .. s, function() return Jobs.planterStatus(s) or "empty", Jobs.planterStatus(s) and Theme.Text or Theme.Muted end)
end
local inv = box(tPlanters.left, "Inventory")
UI.live(inv, 32, function()
local owned = Jobs.ownedPlanters()
if not owned then return "Reading your inventory…", Theme.Muted end
if #owned == 0 then return "No planters in your inventory", Theme.Muted end
return table.concat(owned, " · "), Theme.Text
end)
end
do
local b = box(tHop.left, "Servers")
UI.slider(b, "Most players", "MaxPlayers", 1, 5, 1, plain)
UI.slider(b, "Skip visited for", "RevisitMinutes", 5, 60, 5, mins)
UI.switch(b, "Night forecast", "Forecast")
local g = box(tHop.left, "Stop")
UI.input(g, "Stinger goal", { get = function() return Config.StingerGoal > 0 and tostring(Config.StingerGoal) or "" end,
set = function(v)
Config.StingerGoal = math.max(0, math.floor(tonumber(v) or 0))
App.save()
end }, "0 = off", nil, nil, true)
local mv = box(tHop.left, "Movement")
local function tweening() return Config.MoveMethod == "Tween" end
UI.dropdown(mv, "Method", "MoveMethod", { "Tween", "Walk" }, nil, nil, true)
UI.switch(mv, "Walk through field decorations", "NoDecos", function() pcall(App.applyDecos) end)
UI.switch(mv, "Auto avoid mobs", "AvoidMobs")
UI.slider(mv, "Tween speed", "TweenSpeed", 1, Config.TweenUnlock and 40 or 12, 1, function(v) return plain(v) .. "x" end,
nil, tweening, nil, function(v)
if v <= 8 then return Theme.Good end
if v <= 12 then return Color3.fromRGB(240, 160, 60) end
return Theme.Bad
end)
UI.buttons(mv, { { Config.TweenUnlock and "Lock back to 12x" or "Unlock up to 40x", function()
Config.TweenUnlock = not Config.TweenUnlock
App.clampConfig()
App.saveNow()
task.defer(UI.rebuild)
return Config.TweenUnlock and "Unlocked" or "Locked"
end } }, tweening)
UI.dropdown(mv, "Speed mode", "WalkMode", { "Fixed", "Dynamic" }, nil, nil, true)
UI.slider(mv, "Walkspeed", { get = function() return Config.WalkSpeed > 0 and Config.WalkSpeed or 14 end, set = function(v)
Config.WalkSpeed = (v <= 14) and 0 or v
App.save()
end }, 14, 90, 2, function(v) return v <= 14 and "Off" or plain(v) end, nil, function() return Config.WalkMode ~= "Dynamic" end)
local dyn = function() return Config.WalkMode == "Dynamic" end
UI.slider(mv, "No Haste", "DynMin", 16, 90, 2, plain, nil, dyn)
UI.slider(mv, "10 Haste", "DynMax", 16, 90, 2, plain, nil, dyn)
local s = box(tHop.right, "Server list")
local cache = { at = 0 }
local function info()
if os.clock() - cache.at > 3 then
cache.at = os.clock()
local sv = X.load("servers.json")
cache.servers = sv and type(sv.list) == "table" and #sv.list or 0
cache.age = sv and type(sv.at) == "number" and (os.time() - sv.at) or nil
local n = 0
for _ in pairs(Hop.visited()) do n = n + 1 end
cache.visited = n
local cl = X.load("clock.json")
local k = 0
if cl and type(cl.servers) == "table" then for _ in pairs(cl.servers) do k = k + 1 end end
cache.known = k
end
return cache
end
UI.pair(s, "Cached", function()
local c = info()
return c.age and ("%d · %ds old"):format(c.servers, c.age) or "None"
end)
UI.pair(s, "Visited", function() return tostring(info().visited) end)
UI.pair(s, "Clocks known", function() return tostring(info().known) end)
UI.pair(s, "Last hop", function() return Hop.reason ~= "" and Hop.reason or "—" end)
UI.buttons(s, {
{ "Hop now", function()
if Hop.busy then return "Busy" end
if not Config.Running then App.setRunning(true) end
task.spawn(Hop.go, "asked to")
return "Hopping"
end },
{ "Refresh", function()
local l, why = Hop.fetch(true)
if not l then return why == "rate" and "Rate limited" or "Failed" end
cache.at = 0
return #l .. " servers"
end },
})
end
do
local b = box(tAlts.left, "This account")
UI.dropdown(b, "Role", "Role", { "Solo", "Main", "Alt" }, function()
if Config.Running then App.setRunning(false) end
end, nil, true)
UI.dropdown(b, "Main account", "MainName", function()
local names = {}
for _, m in ipairs(Sync.mains()) do table.insert(names, m.name) end
if Config.MainName ~= "" and not table.find(names, Config.MainName) then table.insert(names, Config.MainName) end
return names
end, nil, isAlt, true)
UI.slider(b, "Take it myself after", "AltHold", 30, 270, 10, secs, nil, isAlt)
local rm = box(tAlts.left, "Online room")
UI.pair(rm, "Room key", function()
local k = Sync.maskedKey()
return k or "none", k and Theme.Text or Theme.Muted
end)
UI.pair(rm, "Status", function()
local st = Sync.room.status
if st == "off" then return "off", Theme.Muted end
if st ~= "ok" then return st, Theme.Bad or Theme.Muted end
local n = #Sync.room.list
return n == 0 and "connected, no one else yet" or ("%d other account%s online"):format(n, n == 1 and "" or "s"), Theme.Good
end)
UI.input(rm, "Join a room", { secret = true, get = function() return "" end, set = function(v)
v = tostring(v or ""):gsub("%s", ""):upper()
if v == "" then return end
if not v:match("^SN%-%w%w%w%w%-%w%w%w%w%-%w%w%w%w%-%w%w%w%w$") then
Log.add("That doesn't look like a room key (SN-XXXX-XXXX-XXXX-XXXX)")
return
end
Config.RoomKey = v
App.save()
Log.add("Joined the room")
task.spawn(pcall, Sync.roomPost)
end }, "Paste a room key")
UI.buttons(rm, {
{ "New key", function()
Config.RoomKey = Sync.newRoomKey()
App.save()
task.spawn(pcall, Sync.roomPost)
if type(setclipboard) == "function" and pcall(setclipboard, Config.RoomKey) then return "Copied" end
return "Made"
end },
{ "Copy", function()
if Config.RoomKey == "" then return "No key" end
if type(setclipboard) == "function" and pcall(setclipboard, Config.RoomKey) then return "Copied" end
return "Can't copy"
end },
{ "Leave", function()
Config.RoomKey = ""
App.save()
Sync.room.list, Sync.room.status = {}, "off"
return "Left"
end },
})
local l = box(tAlts.right, "Linked")
local altCache, altAt = nil, 0
UI.live(l, 64, function()
if Config.Role == "Solo" then return "None", Theme.Muted end
if isAlt() then
if cleanName(Config.MainName) == "" then return "Pick a main (start stingers.now on it as Main)", Theme.Muted end
local m = Alt.main()
if not m then return Config.MainName .. " isn't running stingers.now", Theme.Muted end
local here = m.job == game.JobId
return ("%s\n%s · %s"):format(tostring(m.name), tostring(m.state),
here and "in this server" or (m.private and "private server" or "another server")), Theme.Text
end
if os.clock() - altAt > 2 then
altAt = os.clock()
altCache = Sync.alts()
end
if not altCache then return "Can't list files here", Theme.Muted end
if #altCache == 0 then return "No scouts yet", Theme.Muted end
local lines = {}
for _, a in ipairs(altCache) do
local state = tostring(a.state)
if a.running == false or os.time() - (tonumber(a.t) or 0) > 30 then
state = "stopped"
elseif a.state == "found" and type(a.report) == "table" then
if a.report.kind == "sprout" then
state = ("found %s sprout · %s"):format(tostring(a.report.rarity), tostring(a.report.field or "?"))
else
state = ("found %s· %s"):format(a.report.gifted and "gifted Vicious " or "Vicious ", tostring(a.report.field or "?"))
end
end
if a.job == game.JobId then state = state .. " · here" end
table.insert(lines, ("%s · %s"):format(tostring(a.name), state))
end
return table.concat(lines, "\n"), Theme.Text
end)
end
do
local b = box(tAlerts.left, "Discord")
UI.input(b, "Webhook", "Webhook", "https://discord.com/api/...", nil, nil, true)
UI.input(b, "Ping ID", "PingId", "Your Discord ID", nil, nil, true)
UI.switch(b, "Ping on gifted", "PingGifted")
UI.switch(b, "Post every find and kill", "HookKills")
UI.slider(b, "Status update every", "HookUpdates", 0, 60, 5, function(v) return v == 0 and "Off" or (plain(v) .. " min") end)
UI.buttons(b, { { "Send test", function()
if Config.Webhook == "" then return "Add a webhook" end
if not X.request then return "No web requests" end
Hook.send("stingers.now is connected", ("%s · %s"):format(LP.Name, Config.Role), 0xF0B23E, Config.PingId ~= "", Hook.card("start"))
return "Sent"
end } })
local s = box(tAlerts.right, "Rates")
local function perHour(n)
local h = Stats.data.seconds / 3600
if h < 0.02 then return "—" end
return ("%.1f / hr"):format(n / h)
end
UI.pair(s, "Kills", function() return perHour(Stats.data.killed) end)
UI.pair(s, "Stingers", function() return perHour(Stats.data.stingers) end)
UI.pair(s, "Servers", function() return perHour(Stats.data.servers) end)
UI.pair(s, "Find rate", function()
if Stats.data.found == 0 then return "—" end
return ("1 in %.1f"):format(Stats.data.servers / Stats.data.found)
end)
UI.buttons(s, {
{ "Copy", function()
if type(setclipboard) ~= "function" then return "Can't copy" end
setclipboard(("stingers.now · %s · %d servers · %d found · %d killed · %d gifted · %d stingers"):format(
fmtTime(Stats.data.seconds), Stats.data.servers, Stats.data.found, Stats.data.killed, Stats.data.gifted, Stats.data.stingers))
return "Copied"
end },
{ "Reset", function() Stats.reset() return "Reset" end },
})
end
do
local b = box(tTheme.left, "Themes")
UI.colorRow(b, "Background color", "bg")
UI.colorRow(b, "Main color", "main")
UI.colorRow(b, "Accent color", "accent")
UI.colorRow(b, "Outline color", "outline")
UI.colorRow(b, "Font color", "font")
local presetNames = {}
for _, p in ipairs(THEME_PRESETS) do table.insert(presetNames, p.name) end
UI.dropdown(b, "Theme list", { get = function() return UI.themeName end, set = function(v)
local base = ThemeStore.preset(v)
if base then UI.applyTheme(base, v) end
end }, presetNames)
UI.buttons(b, {
{ "Set as default", function()
ThemeStore.setDefault(UI.base, UI.themeName)
return "Saved"
end },
{ "Reset to default", function()
local base, name = ThemeStore.default()
UI.applyTheme(base, name)
return "Reset"
end },
})
local c = box(tTheme.right, "Custom themes")
UI.input(c, "Custom theme name", { get = function() return UI.state.themeName end, set = function(v) UI.state.themeName = v end }, "Name")
UI.dropdown(c, "Custom themes", { get = function() return UI.state.themeSel end, set = function(v) UI.state.themeSel = v end },
ThemeStore.customs)
UI.buttons(c, {
{ "Save theme", function()
local name = cleanFileName(UI.state.themeName)
if name == "" then return "Name it first" end
ThemeStore.saveCustom(name, UI.base)
UI.state.themeSel = name
for _, p in ipairs(UI.painters) do pcall(p) end
return "Saved"
end },
{ "Load theme", function()
if UI.state.themeSel == "" then return "Pick one" end
local base = ThemeStore.loadCustom(UI.state.themeSel)
if not base then return "Not found" end
UI.applyTheme(base, UI.state.themeSel)
return "Loaded"
end },
})
UI.buttons(c, { { "Refresh list", function()
local n = #ThemeStore.customs()
return n .. " saved"
end } })
end
do
local cf = box(tSettings.left, "Configuration")
local st = UI.state
UI.input(cf, "Config name", { get = function() return st.cfgName end, set = function(v) st.cfgName = v end }, "Name")
UI.dropdown(cf, "Config list", { get = function() return st.cfgSel end, set = function(v) st.cfgSel = v end }, Cfg.names)
UI.buttons(cf, {
{ "Create config", function()
local name = cleanFileName(st.cfgName)
if name == "" then return "Name it first" end
Cfg.save(name)
st.cfgSel = name
for _, p in ipairs(UI.painters) do pcall(p) end
return "Created"
end },
{ "Load config", function()
if st.cfgSel == "" then return "Pick one" end
if not Cfg.load(st.cfgSel) then return "Not found" end
task.defer(UI.rebuild)
return "Loaded"
end },
})
UI.buttons(cf, { { "Overwrite config", function()
if st.cfgSel == "" then return "Pick one" end
Cfg.save(st.cfgSel)
return "Overwritten"
end } })
UI.buttons(cf, { { "Refresh list", function()
return #Cfg.names() .. " configs"
end } })
UI.buttons(cf, { { "Set as autoload", function()
if st.cfgSel == "" then
Cfg.setAutoload(nil)
return "Autoload off"
end
Cfg.setAutoload(st.cfgSel)
return "Autoload set"
end } })
UI.live(cf, 30, function()
local a = Cfg.autoload()
return ("Current config: %s\nCurrent autoload config: %s"):format(Config.CurrentConfig ~= "" and Config.CurrentConfig or "none",
a or "none"), Theme.Muted
end, { size = 11 })
UI.input(cf, "Import (paste config JSON here)", { get = function() return st.import end, set = function(v) st.import = v end }, "{ ... }")
UI.buttons(cf, {
{ "Import", function()
local t = X.decode(st.import)
if not t then return "Not valid JSON" end
local wasRunning = Config.Running
local n = Cfg.apply(t)
Config.Running = wasRunning
if n == 0 then return "No settings in it" end
st.import = ""
local name = cleanFileName(st.cfgName)
if name ~= "" then Cfg.save(name) end
task.defer(UI.rebuild)
return "Imported " .. n
end },
{ "Export", function()
if type(setclipboard) ~= "function" then return "Can't copy" end
setclipboard(X.encode(Cfg.snapshot()) or "{}")
return "Copied"
end },
})
local mn = box(tSettings.right, "Menu")
UI.keybind(mn, "Toggle key", "MenuKey")
UI.slider(mn, "Size", "UIScalePct", 70, 130, 5, function(v) return plain(v) .. "%" end, nil, nil, function() UI.fit() end)
local p = box(tSettings.right, "Performance")
UI.switch(p, "Turn off 3D rendering", "No3D", function() App.applyPerf() end)
UI.switch(p, "Lower graphics during fights", "FightGfx")
UI.slider(p, "FPS cap", "FpsCap", 0, 60, 5, function(v) return v == 0 and "Off" or plain(v) end,
function() App.applyPerf() end, function() return type(setfpscap) == "function" end)
UI.switch(p, "Anti-AFK", "AntiAfk")
local s = box(tSettings.right, "Setup")
UI.pair(s, "Source", function() return "Source available · stingers.now/raw", Theme.Sub end)
UI.pair(s, "License", function() return "Free for non-commercial use", Theme.Sub end)
UI.pair(s, "Runs again from", function()
local _, src = Hop.loader()
return src == "backend" and "Backend" or "Workspace file"
end)
UI.live(s, 30, function()
local line, src = Hop.loader()
local fileOk = true
if src == "file" and line:find("readfile(\"StingersNow.lua\")", 1, true) and X.files then
local ok, found = pcall(isfile, "StingersNow.lua")
fileOk = ok and found
end
if src == "backend" then return "Restarts after each hop from stingers.now (or autoexec)", Theme.Good end
if X.queue and line ~= "" and fileOk then return "Restarts after each hop (autoexec or the re-run line)", Theme.Good end
return "Restarts after each hop only if it's in your autoexec folder", Theme.Sub
end)
UI.input(s, "Re-run line", "Loader", 'loadstring(game:HttpGet("https://stingers.now"))()', nil, function() return Hop.loader() == Config.Loader end)
UI.buttons(s, {
{ "Discord", function()
local copied = type(setclipboard) == "function" and pcall(setclipboard, "https://discord.gg/" .. App.DISCORD)
task.spawn(pcall, App.discord, true)
return copied and "Link copied" or ("discord.gg/" .. App.DISCORD)
end },
{ "Unload", function()
task.defer(function() if genv.__NNH_UNLOAD then genv.__NNH_UNLOAD() end end)
return "Bye"
end },
})
end
local bubble = UI.new("TextButton", {
Parent = gui, Position = UI.bubblePos or UDim2.new(0, 14, 0.5, 34), Size = UDim2.fromOffset(44, 44),
BackgroundColor3 = Color3.new(1, 1, 1), AutoButtonColor = false, Text = "", BorderSizePixel = 0,
}, { corner(12), vgrad(Theme.Top, Theme.Bottom) })
local bubbleEdge = edge(Theme.Line2)
bubbleEdge.Parent = bubble
do
local lg = UI.logo(bubble, 26, 2)
lg.AnchorPoint = Vector2.new(0.5, 0.5)
lg.Position = UDim2.fromScale(0.5, 0.5)
end
local function drag(handle, target, onTap, onEnd)
local dragging, moved, startIn, startPos = false, false, nil, nil
utrack(handle.InputBegan:Connect(function(i)
if isPress(i) then dragging, moved, startIn, startPos = true, false, i.Position, target.Position end
end))
utrack(S.UIS.InputChanged:Connect(function(i)
if not dragging or not isMoveInput(i) then return end
local d = i.Position - startIn
if d.Magnitude > 5 then moved = true end
if moved then
target.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + d.X, startPos.Y.Scale, startPos.Y.Offset + d.Y)
end
end))
utrack(S.UIS.InputEnded:Connect(function(i)
if not dragging or not isPress(i) then return end
dragging = false
if not moved and onTap then onTap() end
if moved and onEnd then onEnd() end
end))
end
function UI.setOpen(open)
shell.Visible = open
Config.UIOpen = open
App.save()
if open then
task.defer(function()
placePill(true)
fitHeight(true)
end)
end
end
drag(head, shell, nil, function()
local p = shell.Position
Config.UIPos = { p.X.Scale, p.X.Offset, p.Y.Scale, p.Y.Offset }
App.save()
end)
drag(bubble, bubble, function() UI.setOpen(not shell.Visible) end, function() UI.bubblePos = bubble.Position end)
utrack(closeBtn.Activated:Connect(function() UI.setOpen(false) end))
utrack(S.UIS.InputBegan:Connect(function(i, processed)
if i.UserInputType ~= Enum.UserInputType.Keyboard then return end
if UI.listening then
local fn = UI.listening
UI.listening = nil
fn(i.KeyCode)
return
end
if not processed and i.KeyCode.Name == Config.MenuKey then UI.setOpen(not shell.Visible) end
end))
function UI.fit()
local cam = workspace.CurrentCamera
if not cam or not shell.Parent then return end
local vp = cam.ViewportSize
if vp.X < 10 or vp.Y < 10 then return end
local want = math.clamp(Config.UIScalePct / 100, 0.5, 1.5)
local sc = math.max(math.min(want, (vp.X - 24) / W), 0.4)
shellScale.Scale = sc
local saved, placed = Config.UIPos, false
if type(saved) == "table" and tonumber(saved[1]) and tonumber(saved[2]) and tonumber(saved[3]) and tonumber(saved[4]) then
local ax = saved[1] * vp.X + saved[2]
local ay = saved[3] * vp.Y + saved[4]
if ax > 60 - W * sc and ax < vp.X - 60 and ay > -10 and ay < vp.Y - 40 then
shell.Position = UDim2.new(saved[1], saved[2], saved[3], saved[4])
placed = true
end
end
if not placed then shell.Position = UDim2.new(0.5, -W * sc / 2, 0.5, -210 * sc) end
task.defer(function()
placePill(true)
fitHeight(true)
end)
end
UI.fit()
if workspace.CurrentCamera then
utrack(workspace.CurrentCamera:GetPropertyChangedSignal("ViewportSize"):Connect(UI.fit))
end
UI.tutorial()
UI.refreshVisibility()
do
local first = UI.tabs[1].name
for _, t in ipairs(UI.tabs) do
if t.name == Config.Tab then first = t.name end
end
selectTab(first, true)
task.delay(0.15, function()
if UI.gen ~= myGen then return end
placePill(true)
fitHeight(true)
end)
end
task.spawn(function()
local blink = false
local wasOn = nil
while App.alive and UI.gen == myGen do
local on = Config.Running
local label, color
if not on then
label, color = "Idle", Theme.Muted
elseif Hop.busy then
label, color = "Hopping", Theme.Accent
elseif Fight.active then
label, color = "Fighting", Theme.Bad
elseif Config.Role == "Alt" then
label, color = Alt.hold and ((Alt.hold.kind == "sprout") and "Holding sprout" or "Holding Vicious") or "Scouting", Theme.Good
else
label, color = (Hunt.state == "found") and "Found one" or "Searching", Theme.Good
end
statusText.Text = label
statusRole.Text = Config.Role
statusDot.BackgroundColor3 = color
footDot.BackgroundColor3 = color
blink = not blink
if on then
anim(statusDot, 0.45, { BackgroundTransparency = blink and 0.65 or 0 })
else
statusDot.BackgroundTransparency = 0
end
if on ~= wasOn then
wasOn = on
startText.Text = on and "Stop" or "Start"
startText.TextColor3 = on and Theme.Text or Theme.OnAccent
startGrad.Enabled = not on
startBtn.BackgroundColor3 = on and Theme.Raised2 or Color3.new(1, 1, 1)
anim(startEdge, 0.2, { Transparency = on and 0.35 or 1 })
bubbleEdge.Color = on and Theme.Accent or Theme.Line2
end
footLeft.Text = Log.text
footRight.Text = ("%s · %d/%d · %s"):format(App.private and "Private" or "Public", #S.Players:GetPlayers(), S.Players.MaxPlayers,
fmtTime(Stats.data.seconds))
for _, f in ipairs(UI.refreshers) do pcall(f) end
UI.refreshVisibility()
task.wait(0.5)
end
end)
end
function UI.rebuild()
if not App.alive then return end
UI.onPopupClose = nil
for _, c in ipairs(UI.conns) do pcall(function() c:Disconnect() end) end
UI.conns = {}
if UI.gui then pcall(function() UI.gui:Destroy() end) end
UI.build()
end
UI.build()
genv.__NNH_UNLOAD = function()
if not App.alive then return end
App.alive = false
if Config.Running then
Config.Running = false
if Config.Role == "Main" then pcall(Sync.publishMain, "stopped") end
end
App.saveNow()
Stats.save()
for _, c in ipairs(App.conns) do pcall(function() c:Disconnect() end) end
for _, c in ipairs(UI.conns) do pcall(function() c:Disconnect() end) end
pcall(Fight.watch, false)
pcall(Move.noclip, false)
pcall(function() S.Run:Set3dRenderingEnabled(true) end)
pcall(App.fightGfx, false)
pcall(function() UI.gui:Destroy() end)
genv.__NNH_UNLOAD = nil
genv.__NNH_LOADING = nil
end
Log.add(("Loaded v%s as %s%s"):format(VERSION, Config.Role, Config.Running and " (running)" or ""))