Overview
A ShotScript project is one .ssp file that holds its whole tree, and its kind is System, Generic or Roblox.
A Roblox game: server and client code, remotes, built into plain Luau for Studio.
Runs in Roblox--kind robloxA tool on your computer: on its own with shot run, or in the editor's window.
--kind systemCode any project can use: plain Luau and the shared datatypes, no services.
Runs where it is used--kind genericOne file
<Name>.sspholds folders,.shotfiles (ShotScript),.luaufiles (plain Luau) and Value instances.shot runtakes the file; other commands take--project Station.ssp.- shot shows the tree inside as a folder of files:
shot show Station/Station.shot(One-file projects). - The header comes first:
shotsystem 1, the kind, and the export: the programshot runruns, or what other projects use.
The three kinds
kind System | a program or library that runs on this computer, with services: may use System and Generic projects |
kind Generic | plain logic with no services: may use Generic projects |
kind Roblox | Roblox code: may use Roblox and Generic projects |
shot new makes each:
shot new Demo.ssp
shot new Units.ssp --kind Generic
shot new Rbx.ssp --kind RobloxThey print:
made Demo.ssp: a System project, whose program Main.shot prints a line (shot run Demo.ssp, or shot open Demo.ssp)
made Units.ssp: a Generic project, the library Units (Units/Units.shot) that any project can use: plain Luau and the shared datatypes, no services (shot open Units.ssp)
made Rbx.ssp: a Roblox project, the library Rbx (Rbx/Rbx.shot); shot check checks it, and building it for Roblox comes later (shot open Rbx.ssp)shot run Demo.ssp prints Hello from Demo.
- System is the default (
--kind System), also for a header without a kind line. It has the services and makes its own instances (Services, Instances). - Generic has no services, so any kind may use it. A service in one is an error:
Gen.ssp/Gen/Gen.shot:3:5 FileService is a System project's service: a Generic project has none (plain Luau and the shared datatypes, so it runs in any project)- Roblox in an
.sspfile is a libraryshot checkchecks, without services and without Roblox's own API yet (game:GetServiceis refused). Roblox games are folder projects.
Using another kind is an error at its line (Externals, THE KINDS RULE).
The examples
The System pages share three projects in one folder:
Units.ssp | kind Generic: the module Units, CelsiusOf(fahrenheit) and Round(x, places) |
Station.ssp | kind System: the class Station, readings kept in a JSON file; it uses Units |
Forecast.ssp | kind System: a program that adds the readings it is given and prints a summary; it uses Station |
Externals shows Units and Station. Forecast's program:
Main/Main.shot
use TimeService
use RunService
use external "Station.ssp"
local station = Station.LoadAsync(root.File.Value)
for _, word in RunService.Arguments do
local fahrenheit = tonumber(word)
if fahrenheit then
station:AddFahrenheit(fahrenheit)
end
end
local saved, why = station:SaveAsync()
if not saved then
error("couldn't save: " .. tostring(why))
end
print(`{#station.Readings} readings, average {station:Average()} C`)
print("summary made " .. TimeService:Iso(TimeService:Now()))Run it:
shot run Forecast.ssp -- 50 61 72It prints (the second line is the run's time):
3 readings, average 16.1 C
summary made 2026-10-20T06:18:28Zuse external "Station.ssp"gives the file Station's class. The run runs Station's code and the Units code it uses (Externals).- Services are instances: call them with a colon,
TimeService:Now()(Services). root.Fileis the StringValue at the root of Forecast's tree; its Value names the JSON file (One-file projects, ROOT AND SCRIPT).- The words after
--areRunService.Arguments(One-file projects, RUNNING A PROGRAM). readings.jsonlands beside Forecast.ssp, in the project file's folder (FileService). The next run loads it first.
The order of work
shot map --project Station.ssp | the export, the projects it uses, the folders and files |
shot show Station/Station.shot --project ... | the exact source (shot show .shotsystem: the header) |
shot edit, shot write | change it; each change is checked right after |
shot check --project Station.ssp | 0 errors before anything runs |
shot run Forecast.ssp -- 50 61 72 | run the program (on a library: its scenarios) |
shot map --project Station.ssp prints:
Shot project Station.ssp: 2 files in 1 folders
kind System: it can only use System and Generic projects
export Station: a library, Station/Station.shot
external Units: "Units.ssp", interface 62f942db347c
Station/ class Station Temperature readings in Celsius, kept in a JSON file
Types.shot types
Next: shot outline <folder or name>, shot find <name>, shot show <Name.Member>, shot docsAfter changing a project others use, check its users (Externals, WHEN A USED PROJECT CHANGES).
Read next
These pages, for System and Generic projects, in order:
| Getting started | a walk through making and running a project |
| One-file projects | the .ssp file: header, kind, export, tree, root and script, running it, the mistakes |
| Running a project | running a program or a library's scenarios, and reading what stops a run |
| Externals | use external and import external: another project's export, the kinds rule, the interface |
| Instances | ShotInstance: the tree, events and signals, attributes, Destroy, Instance.new, Clone |
| Checked paths | checked paths: a misspelt child or a wrong-typed value fails before anything runs |
| FileService | files and folders on this computer |
| Services | the services a System project uses, called with a colon, and what a call gives back |
| ProcessService | start programs, read their lines as they print, write to them, stop them |
| The window | shot open's window, in the ShotScript Editor's pages: menus, panes, keys, saving, running |
The language pages hold on every kind. Their examples are Roblox games: read @shot.Wallet as root.Wallet (One-file projects, USING A MODULE).
| Classes | classes, constructors, methods, statics, inheritance |
| Modules | modules: one shared table of properties and functions |
| Funcs | a file that returns a single function |
| Interfaces | interfaces and implements |
| Match | match on a string union |
| Types | Types files, what each file sees, imports |
| Doc comments | doc and rootdoc |
| Uses | which systems of the project a system may use |
| Owned fields | which system may change a field, and through which function |
| Id kinds | id kinds: string ids one system defines, checked at every literal |
| Events | declared events, checked at every publish and listener (needs the project's own EventBus module) |
| Start order | which Starts run before which, checked against the start script (here the exported program) |
| Scenarios | written for Roblox's mock world; here a scenario is Scenarios/ |
| The shot command | every shot command for reading and changing code |
| Rules | every error shot check gives |
| Luau tips | type-checker traps and their fixes |
For Roblox projects only: Adopt, Compiled, Invariants, Remotes, SaveLock, Scripts and SplitAndSides. Files is the Roblox layout; its BOOKMARKS section holds everywhere.
