What ShotScript is
The Luau you already write, one declaration per file. shot writes the strict Luau around it and checks it all.
You'll learn what a .shot file becomes, the three kinds of project, and the project this guide builds.
Coins.shotWallet.shotTypes.shotshot checkshot build--!strictWhat you get
- Less to write. A class is one block; a system's types are written once.
- Mistakes before anything runs, at the
.shotline and column. - Rules Luau can't see: sides, events,
match, start order, owned fields. - Plain Luau out.
shot buildwrites a Rojo layout you can read.
Tip Inside a function body nothing changes: it is ordinary Luau, checked by the Luau type checker.
Project kinds
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 genericshot new makes a project in one file, <Name>.ssp (System when you don't say a kind):
made Coins.ssp: a Roblox project, the library Coins (Coins/Coins.shot); shot check checks it, and building it for Roblox comes later (shot open Coins.ssp)
shotsystem 1 kind Roblox export Coins id e00c8b830b312ffbb9882ff43d0a7885 Folder Coins #0b2f8f2d Script Coins #82570725 source types script.Parent.Types module Coins = { function Hello() : string return "Hello from Coins" end } Script Types #8852a1fc source (no newline at end)
Tip An .ssp is the whole project as text you can read and diff: the header, then one line per instance, one tab per level, each script's source under it.
0 errors (2 files checked, 0.4 s)
The project in this guide
Watch out A Roblox .ssp is checked today, and its Roblox build comes later. So this guide builds a folder, MyProject, which shot build turns into Luau for Studio. The language is the same in both.
One system, Wallet, one idea a step:
Run shot new Hello, then shot run Hello.ssp. It prints Hello from Hello: a System project, whole in one file, running on your computer.
