Getting Started
From LSL script to modern TypeScript in under a minute.
What is BlackBox Scripter?
BlackBox Scripter is a transpiler that converts LSL (Linden Scripting Language) and OSSL scripts into clean, type-safe TypeScript for the poqpoq World engine.
It handles the entire LSL language: types, events, state machines, operator overloading, 400+ constants, and 200+ built-in functions. The output runs in a SES-secured Web Worker sandbox.
How It Works
The transpiler pipeline has four stages:
- Preprocess Strip BOM, normalize line endings, remove null bytes and zero-width characters.
- Tokenize LSL source is lexed into tokens: keywords, identifiers, operators, literals, comments.
- Parse Tokens become an AST (Abstract Syntax Tree) with full LSL grammar support: states, events, global variables, user functions, type declarations.
-
Generate
The AST is walked to emit TypeScript. LSL functions become World API calls,
operator overloading becomes method calls (
vec1.add(vec2)), and events become typed handler methods.
Using the Editor
The fastest way to try Scripter is the online editor. Paste an LSL script in the left pane, and the transpiled TypeScript appears on the right.
Press Ctrl+S to force a transpile. The editor auto-saves to localStorage.
Using the CLI
For batch processing, use the CLI:
# Transpile a single file
npx blackbox-scripter transpile script.lsl
# Transpile an OAR bundle (from Legacy converter)
npx blackbox-scripter bundle manifest.json -o output/
The SES Sandbox
Transpiled scripts run inside a
Secure ECMAScript (SES) compartment within a Web Worker.
This means scripts cannot access the DOM, network, or file system directly.
They interact with the world exclusively through the typed
WorldScript API — which the host engine controls.
Next Steps
- Function Reference — every LSL function and its TypeScript equivalent
- Event Reference — all 38 LSL events mapped to handler methods
- Constants Reference — ~400 LSL constants with TS values