scripts.nitaimaarek.com 11 scripts Log in
  1. scripts
  2. SaB grab diagnostic

SaB grab diagnostic

For Steal a Brainrot by BRAZILIAN SPYDER

steal-a-brainrot diagnostic

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

Source

--!nonstrict
--[[=========================================================================
    Steal a Brainrot -- grab diagnostic
    -------------------------------------------------------------------------
    Ends the guessing about why auto-grab does not steal. It measures, on YOUR
    executor and THIS game version, exactly:

      1. what fireproximityprompt actually does -- fires the full hold
         (PromptButtonHoldBegan -> Triggered) or just Triggered
      2. whether getconnections works on a real steal prompt, and what it returns
      3. the steal prompts' real properties (Enabled, HoldDuration, distance)
      4. whether a controlled test-fire actually starts a steal (Stealing flips)

    HOW TO USE
      1. Stand right next to a stealable brainrot on SOMEONE ELSE'S base
         (so a grab prompt is visible/holdable).
      2. Run this.
      3. Do NOT touch anything for ~6 seconds -- it runs a controlled test-fire.
      4. Send me the file it names (workspace / nmhub_capture / grabdiag_*.txt).
    Passive + one self-fire. No metatable hooks.
=========================================================================]]

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

local out = {}
local function log(s) out[#out+1] = s ; print("[grabdiag] " .. s) end

local function save(reason)
    local text = "grab diagnostic (" .. reason .. ")\n" ..
        string.rep("-", 50) .. "\n" .. table.concat(out, "\n")
    -- clipboard first -- no file needed, just paste it back to me
    if type(setclipboard) == "function" then
        pcall(setclipboard, text)
    elseif type(toclipboard) == "function" then
        pcall(toclipboard, text)
    end
    -- file as a bonus if the executor allows it
    if type(writefile) == "function" then
        pcall(function()
            if makefolder and isfolder and not isfolder("nmhub_capture") then
                makefolder("nmhub_capture")
            end
            writefile("nmhub_capture/grabdiag.txt", text)
        end)
    end
end

--=========================================================================
log("== grab diagnostic ==")
log("fireproximityprompt: " .. type(fireproximityprompt))
log("getconnections:      " .. type(getconnections))
log("firesignal:          " .. type(firesignal))

--=========================================================================
-- find the steal prompts
--=========================================================================
local prompts = {}
local plots = workspace:FindFirstChild("Plots")
if not plots then
    log("!! workspace.Plots MISSING -- the scan target does not exist")
    save("no plots") ; return
end
log("plots: " .. #plots:GetChildren())

for _, plot in ipairs(plots:GetChildren()) do
    local podiums = plot:FindFirstChild("AnimalPodiums")
    if podiums then
        for _, d in ipairs(podiums:GetDescendants()) do
            if d:IsA("ProximityPrompt") then prompts[#prompts+1] = d end
        end
    end
end
log("AnimalPodiums prompts found: " .. #prompts)
if #prompts == 0 then
    log("!! no prompts under AnimalPodiums -- scan path is wrong for this version")
    save("no prompts") ; return
end

-- sample the nearest few, with properties
local root = LP.Character and LP.Character:FindFirstChild("HumanoidRootPart")
local myPos = root and root.Position
local ranked = {}
for _, p in ipairs(prompts) do
    local host = p.Parent
    if host and host:IsA("Attachment") then host = host.Parent end
    local pos = host and host:IsA("BasePart") and host.Position
    local dist = (pos and myPos) and (pos - myPos).Magnitude or 9e9
    ranked[#ranked+1] = { p = p, d = dist }
end
table.sort(ranked, function(a,b) return a.d < b.d end)

log("")
log("nearest prompts:")
for i = 1, math.min(5, #ranked) do
    local p = ranked[i].p
    local okH, hold = pcall(function() return p.HoldDuration end)
    local okE, en = pcall(function() return p.Enabled end)
    local okD, md = pcall(function() return p.MaxActivationDistance end)
    local okA, at = pcall(function() return p.ActionText end)
    log(string.format("  #%d  %.0f studs | Enabled=%s Hold=%s MaxDist=%s Action=%q",
        i, ranked[i].d, tostring(okE and en), tostring(okH and hold),
        tostring(okD and md), tostring(okA and at)))
    log("        path: " .. p:GetFullName())
end

--=========================================================================
-- getconnections probe on the nearest enabled prompt
--=========================================================================
local target
for _, e in ipairs(ranked) do
    local okE, en = pcall(function() return e.p.Enabled end)
    if okE and en then target = e.p break end
end
target = target or ranked[1].p
log("")
log("probe target: " .. target:GetFullName())

if type(getconnections) == "function" then
    for _, sig in ipairs({"Triggered", "PromptButtonHoldBegan", "PromptButtonHoldEnded"}) do
        local ok, conns = pcall(function() return getconnections(target[sig]) end)
        if ok and type(conns) == "table" then
            local withFn = 0
            for _, c in ipairs(conns) do
                if type(c.Function) == "function" then withFn = withFn + 1 end
            end
            log(string.format("  getconnections(%s): %d conns, %d with .Function",
                sig, #conns, withFn))
        else
            log("  getconnections(" .. sig .. "): FAILED " .. tostring(conns))
        end
    end
else
    log("  getconnections unavailable -- replay method not possible")
end

--=========================================================================
-- watch the events, then TEST-FIRE and see what actually happens
--=========================================================================
local saw = { hb = 0, tr = 0, he = 0 }
pcall(function()
    target.PromptButtonHoldBegan:Connect(function() saw.hb = saw.hb + 1 end)
    target.Triggered:Connect(function() saw.tr = saw.tr + 1 end)
    target.PromptButtonHoldEnded:Connect(function() saw.he = saw.he + 1 end)
end)

local function stealing() return LP:GetAttribute("Stealing") == true end

task.spawn(function()
    task.wait(1)
    log("")
    log("TEST 1: fireproximityprompt(prompt, 0)  [instant]")
    local before = stealing()
    saw.hb, saw.tr, saw.he = 0, 0, 0
    pcall(function() fireproximityprompt(target, 0) end)
    task.wait(1.5)
    log(string.format("  -> HoldBegan=%d Triggered=%d HoldEnded=%d | Stealing %s->%s",
        saw.hb, saw.tr, saw.he, tostring(before), tostring(stealing())))

    task.wait(1)
    log("TEST 2: HoldDuration=0 then fireproximityprompt(prompt)")
    pcall(function() target.HoldDuration = 0 end)
    before = stealing()
    saw.hb, saw.tr, saw.he = 0, 0, 0
    pcall(function() fireproximityprompt(target) end)
    task.wait(1.5)
    log(string.format("  -> HoldBegan=%d Triggered=%d HoldEnded=%d | Stealing %s->%s",
        saw.hb, saw.tr, saw.he, tostring(before), tostring(stealing())))

    if type(firesignal) == "function" and type(getconnections) == "function" then
        task.wait(1)
        log("TEST 3: firesignal on HoldBegan then Triggered")
        before = stealing()
        saw.hb, saw.tr, saw.he = 0, 0, 0
        pcall(function() firesignal(target.PromptButtonHoldBegan) end)
        task.wait(0.1)
        pcall(function() firesignal(target.Triggered) end)
        task.wait(1.5)
        log(string.format("  -> HoldBegan=%d Triggered=%d HoldEnded=%d | Stealing %s->%s",
            saw.hb, saw.tr, saw.he, tostring(before), tostring(stealing())))
    end

    log("")
    log("VERDICT: whichever TEST flips Stealing false->true is the method that works.")
    log("If none do, the steal is not on this prompt's Triggered -- send me the file.")
    save("done")
    log("")
    log(">>> The full report is now on your CLIPBOARD. Paste it back to me. <<<")
    print("[grabdiag] DONE -- report copied to clipboard, just paste it here.")
end)

save("started")