Pulse.Memory
Pulse.Memory provides two utilities: checking whether an executor supports a UNC function before calling it, and safely resolving a ModuleScript from the character tree without crashing if any step is missing.
API
Pulse.Memory.supports(fnName)
Returns true if the named global function exists on this executor.
if Pulse.Memory.supports("writefile") then
Pulse.Log.save("pulse_log.txt")
end
if Pulse.Memory.supports("readfile") then
local data = readfile("config.json")
end
Use this before calling any UNC API that isn't guaranteed to exist. Common checks: "writefile", "readfile", "appendfile", "setclipboard".
Pulse.Memory.testWritable(tbl, key)
Returns true if tbl[key] is actually writable on this executor. Some executors have read-only properties even when the API appears to exist.
if Pulse.Memory.testWritable(workspace, "Gravity") then
workspace.Gravity = 20
end
Pulse.Memory.requireFrom(...)
Traverses _LocalPlayer.Character by the given child names in order, then calls require() on the final instance. Returns the module value or nil if any step fails.
-- Equivalent to:
-- require(Character:FindFirstChild("ODMG"):FindFirstChild("Client"):FindFirstChild("Memory"))
local mem = Pulse.Memory.requireFrom("ODMG", "Client", "Memory")
if mem then
-- use mem
end
Every step is wrapped in pcall, so a missing child or a failed require returns nil without throwing.
When to use each
| Function | Use when |
|---|---|
supports(fnName) | Gating UNC file/clipboard calls |
testWritable(tbl, key) | Verifying a property can be set before setting it |
requireFrom(...) | Loading a game's own ModuleScript from inside Character |