scripts.nitaimaarek.com 11 scripts Log in
  1. scripts
  2. SaB runtime recorder (passive logger)

SaB runtime recorder (passive logger)

For Steal a Brainrot by BRAZILIAN SPYDER

steal-a-brainrot diagnostic recorder

Paste it into any executor. It always pulls the latest version of this script.
8 views· 293 lines· 11.7 KB· added 21d ago raw

Source

--!nonstrict
--[[=========================================================================
    Steal a Brainrot -- passive runtime recorder  (NO HOOKS)
    -------------------------------------------------------------------------
    This game detects metatable hooks (__namecall) and SILENTLY disables its
    own remotes if it sees one -- so anything that logs remote calls trips it.

    So this logs NOTHING via hooks. It only READS state the game changes and
    connects to ordinary instance signals -- attributes, Humanoid properties,
    prompt triggers, leaderstats, position. That is indistinguishable from the
    game's own UI code and cannot be detected.

    We don't need remote arguments -- the place dump already gave us those.
    What we're missing is TIMING and EFFECTS, which this captures fully:

      * the real steal hold time (Stealing true -> false, and what moves between)
      * the anticheat's speed tolerance (per-frame position delta, live)
      * what a tripmine actually does to you (attribute + ragdoll timeline)
      * RagdollEndTime / SpeedAllowance as the SERVER sets them

    HOW TO USE
      1. Run this.
      2. Do ONE normal steal by hand -- walk up, hold the prompt, collect.
      3. If you can, walk onto a tripmine once.
      4. Send me the file it names (workspace / nmhub_capture/…).
    Auto-saves every 5s and survives a kick.
=========================================================================]]

local Players    = game:GetService("Players")
local RunService = game:GetService("RunService")
local LocalPlayer = Players.LocalPlayer

local canWrite = type(writefile) == "function"
local mkfolder = makefolder or make_folder
local isfolderF = isfolder
local START = os.clock()

local FOLDER = "nmhub_capture"
local FILE   = FOLDER .. "/sab_" .. tostring(math.floor(tick())) .. ".log"

local log = {}
local save                       -- forward decl: used by handlers above its def
local function stamp() return string.format("%8.3f", os.clock() - START) end
local function line(s)
    log[#log + 1] = stamp() .. "  " .. s
    if #log > 30000 then table.remove(log, 1) end
end

local function short(v)
    local t = typeof and typeof(v) or type(v)
    if t == "string" then return (#v > 50 and v:sub(1,50).."..." or v) end
    if t == "Vector3" then return string.format("v3(%.1f,%.1f,%.1f)", v.X, v.Y, v.Z) end
    if t == "Instance" then return "<"..v.ClassName..":"..v.Name..">" end
    return tostring(v)
end

--=========================================================================
-- 1. attribute timeline -- the goldmine (Stealing, SpeedAllowance, RagdollEndTime)
--    Pure reads + AttributeChanged on normal instances. Undetectable.
--=========================================================================
local function watchAttributes(inst, tag)
    local ok, attrs = pcall(function() return inst:GetAttributes() end)
    if ok and attrs then
        for k, v in pairs(attrs) do
            line(string.format("ATTR    %s.%s = %s   (initial)", tag, k, short(v)))
        end
    end
    pcall(function()
        inst.AttributeChanged:Connect(function(name)
            line(string.format("ATTR    %s.%s -> %s",
                tag, name, short(inst:GetAttribute(name))))
        end)
    end)
end

watchAttributes(LocalPlayer, "Player")

--=========================================================================
-- 2. character + humanoid state
--=========================================================================
local curRoot, curHum
local function onChar(char)
    line("CHAR    respawn")
    watchAttributes(char, "Char")
    curRoot = char:FindFirstChild("HumanoidRootPart")
        or char:WaitForChild("HumanoidRootPart", 5)
    curHum = char:FindFirstChildOfClass("Humanoid")
        or char:WaitForChild("Humanoid", 5)
    if curHum then
        line(string.format("HUM     WalkSpeed=%.1f JumpPower=%.1f HipHeight=%.2f",
            curHum.WalkSpeed, curHum.JumpPower, curHum.HipHeight))
        for _, prop in ipairs({"WalkSpeed", "JumpPower", "PlatformStand", "Sit"}) do
            pcall(function()
                curHum:GetPropertyChangedSignal(prop):Connect(function()
                    line("HUM     " .. prop .. " -> " .. tostring(curHum[prop]))
                end)
            end)
        end
        curHum:GetPropertyChangedSignal("Health"):Connect(function()
            if curHum.Health <= 0 then line("HUM     DIED") end
        end)
    end
    -- watch tools coming/going (carpet, cloner, brainrot-in-hand)
    pcall(function()
        char.ChildAdded:Connect(function(c)
            if c:IsA("Tool") then line("TOOL    equipped  " .. c.Name) end
        end)
        char.ChildRemoved:Connect(function(c)
            if c:IsA("Tool") then line("TOOL    unequipped " .. c.Name) end
        end)
    end)
end
if LocalPlayer.Character then onChar(LocalPlayer.Character) end
LocalPlayer.CharacterAdded:Connect(onChar)

--=========================================================================
-- 3. steal window + anticheat tolerance -- per-frame position sampling
--    (reading root.Position/Velocity is what the game itself does; no hook)
--=========================================================================
local lastPos, maxStep, sampleN = nil, 0, 0
local wasStealing = false
RunService.Heartbeat:Connect(function(dt)
    local root = curRoot
    if not (root and root.Parent) then return end
    local pos = root.Position

    -- horizontal studs/sec this frame -- the number the anticheat watches
    if lastPos and dt > 0 then
        local dx, dz = pos.X - lastPos.X, pos.Z - lastPos.Z
        local step = math.sqrt(dx*dx + dz*dz) / dt
        if step > maxStep then maxStep = step end
        sampleN = sampleN + 1
        -- log any frame that spikes past normal run speed (~16-50)
        if step > 80 then
            line(string.format("MOVE!   %.0f studs/s spike  vel=%s",
                step, short(root.AssemblyLinearVelocity)))
        end
    end
    lastPos = pos

    -- steal edges, from the Stealing attribute the server sets
    local stealing = LocalPlayer:GetAttribute("Stealing") == true
    if stealing ~= wasStealing then
        line(string.format("STEAL   Stealing -> %s   (pos %s)",
            tostring(stealing), short(pos)))
        wasStealing = stealing
    end
end)

-- periodic max-speed readout so the file shows the tolerance ceiling
task.spawn(function()
    while true do
        task.wait(3)
        if sampleN > 0 then
            line(string.format("SPEED   peak %.0f studs/s over last window", maxStep))
            maxStep, sampleN = 0, 0
        end
    end
end)

--=========================================================================
-- 4. tripmines -- does walking near one change an attribute / ragdoll you?
--=========================================================================
pcall(function()
    local tools = workspace:FindFirstChild("ToolsAdds")
    if tools then
        local function watchMine(m)
            if m:IsA("BasePart") and m.Name:match("SubspaceTripmine") then
                line("MINE    present: " .. m.Name)
            end
        end
        for _, m in ipairs(tools:GetChildren()) do watchMine(m) end
        tools.ChildAdded:Connect(watchMine)
    end
end)

--=========================================================================
-- 5. leaderstats / money -- effect confirmation
--=========================================================================
pcall(function()
    local ls = LocalPlayer:FindFirstChild("leaderstats")
        or LocalPlayer:WaitForChild("leaderstats", 5)
    if ls then
        for _, stat in ipairs(ls:GetChildren()) do
            line("STAT    " .. stat.Name .. " = " .. tostring(stat.Value))
            pcall(function()
                stat:GetPropertyChangedSignal("Value"):Connect(function()
                    line("STAT    " .. stat.Name .. " -> " .. tostring(stat.Value))
                end)
            end)
        end
    end
end)

--=========================================================================
-- 6. prompt triggers -- the legit steal timeline
--=========================================================================
pcall(function()
    for _, inst in ipairs(workspace:GetDescendants()) do
        if inst:IsA("ProximityPrompt") and inst:FindFirstAncestor("AnimalPodiums") then
            inst.Triggered:Connect(function()
                line("PROMPT  Triggered " .. short(inst))
            end)
            inst.PromptButtonHoldBegan:Connect(function()
                line("PROMPT  HoldBegan " .. short(inst))
            end)
            inst.TriggerEnded:Connect(function()
                line("PROMPT  TriggerEnded " .. short(inst))
            end)
        end
    end
end)

--=========================================================================
-- 7. kicks / teleports -- so a capture ending in a kick says why
--=========================================================================
LocalPlayer.OnTeleport:Connect(function(state)
    line("TELEPORT state=" .. tostring(state)); save("teleport")
end)
pcall(function()
    local cg = (gethui and gethui()) or game:GetService("CoreGui")
    cg.DescendantAdded:Connect(function(d)
        if d:IsA("TextLabel") or d:IsA("TextButton") then
            local low = tostring(d.Text or ""):lower()
            if low:find("kick") or low:find("ban") or low:find("cheat")
               or low:find("disconnect") or low:find("suspicious") then
                line("GUI!    " .. short(d.Text)); save("kicktext")
            end
        end
    end)
end)

--=========================================================================
-- flush
--=========================================================================
function save(reason)                       -- assigns the forward-declared local
    if not canWrite then return end
    pcall(function()
        if mkfolder and isfolderF and not isfolderF(FOLDER) then mkfolder(FOLDER) end
    end)
    local header = table.concat({
        "Steal a Brainrot PASSIVE capture (no hooks)",
        "writefile: " .. tostring(canWrite),
        "lines: " .. #log,
        "reason: " .. reason,
        string.rep("-", 60),
    }, "\n")
    pcall(function() writefile(FILE, header .. "\n" .. table.concat(log, "\n")) end)
end

task.spawn(function()
    while true do task.wait(5); save("auto") end
end)
if type(getgenv) == "function" then
    getgenv().NMHUB_SAVE_CAPTURE = function() save("manual") end
end

--=========================================================================
-- on-screen readout
--=========================================================================
local gui = Instance.new("ScreenGui")
gui.Name = "SabRecorder"; gui.ResetOnSpawn = false; gui.IgnoreGuiInset = true
pcall(function() gui.Parent = (gethui and gethui()) or game:GetService("CoreGui") end)
if not gui.Parent then gui.Parent = LocalPlayer:WaitForChild("PlayerGui") end

local lbl = Instance.new("TextLabel")
lbl.Size = UDim2.new(0, 470, 0, 54)
lbl.Position = UDim2.new(0, 12, 0, 12)
lbl.BackgroundColor3 = Color3.fromRGB(16, 16, 22)
lbl.BackgroundTransparency = 0.1
lbl.TextColor3 = Color3.fromRGB(120, 255, 150)
lbl.Font = Enum.Font.Code
lbl.TextSize = 13
lbl.TextXAlignment = Enum.TextXAlignment.Left
lbl.TextYAlignment = Enum.TextYAlignment.Top
lbl.TextWrapped = true
lbl.Text = "recording (passive, no hooks)..."
lbl.Parent = gui

task.spawn(function()
    while true do
        task.wait(0.5)
        lbl.Text = string.format(
            "REC (passive) %ss | %d events\nfile: %s\ndo ONE steal by hand, then send me the file",
            (stamp():gsub("%s","")), #log,
            canWrite and FILE or "NO writefile -- console fallback")
        if not canWrite and #log % 50 == 0 then print(table.concat(log, "\n")) end
    end
end)

line("passive recorder started -- no metatable hooks, nothing to detect")
save("start")
print("[recorder] passive. Do one steal by hand, then send me: " .. FILE)