Slice

Scripting

The client embeds a light Luau script host. A user script runs once, after the replication snapshot has been applied, inside the live Engine Luau state, so it can reach the same globals a real LocalScript sees:

game, workspace, game:GetService("Players"), Players.LocalPlayer,
Players.LocalPlayer.Character, ...

Usage

roblox --connection-type=RakNet --place-id 1818 --roblosecurity "$COOKIE" \
       --headless --script examples/walk.lua

--script FILE compiles the source with luau_compile and runs it in the persistent Engine state (LiveRuntime::runUserScript). The host is also available programmatically:

LiveRuntime live(job, log);
// ... feed the snapshot ...
std::string err;
live.runUserScript("examples/walk.lua", &err);   // false + err on compile/run error
lua_State* L = live.luaState();             // read globals the script set

The script runs with the engine's game/services installed, and can traverse the world (for _, c in ipairs(game:GetChildren()) do ... end) to find and modify instances.

Loader surface: loadstring(game:HttpGet(url))()

game is the replicated DataModel, so the standard loader pattern runs as-is:

Verified end-to-end against a live 735 KB Luraph payload: fetch, compile, and execution all succeed (the payload then parks on a condition the offline fixture world cannot satisfy - busy-loop loaders spin, wait-gated ones wait).

Headless dump and replay

The replication path can operate without a renderer or a native client:

python3 tools/rum/rx_frames.py CAPTURE_DIR -o frames.bin
RBX_RX_REPLAY=frames.bin roblox --join-json join.json --skip-join ...

What this does and does not do

A script can read and write the local DataModel - set a Part's CFrame, read Humanoid.Health, walk the instance tree, and so on. Those writes land in the client's copy of the world.

Moving the character server-side is not implemented. Changing a CFrame locally does not replicate to the RCC on its own: that needs the owned-write / movement send path, which is the documented next milestone (see docs/PROTOCOL.md "Send path: groundwork + plan"). Until that ships, a script can position the local world but the server keeps the authoritative position and the character will not actually walk for other clients.

The two paths to real movement, both needing reverse-engineering work:

  1. Input (ControlState) - the native moves via the 0xA6 input stream. The slot-to-movement mapping (which bit is "forward") is not recovered.
  2. Owned writes - the client owns its character and would send position updates; the upstream item grammar for those writes is not mapped.

docs/PROTOCOL.md covers the input framing; tools/tx_diff.py (native-vs-ours TX comparator) and the gdb capture scripts are the tools for the next step.