# ── Top level ─────────────────────────────────────────────
# A character, any other constant, and saved story variables.
define mila = Character("Mila", { color = "#e8a0bf" })
default bag = { "ticket" }
# Luau that runs once when the story loads.
function greet(name) return "Hi, " .. name end
# The story starts at `start`.
# ── Dialogue ──────────────────────────────────────────
mila "A line of dialogue."
mila "{b}Bold{/b} {i}italic{/i} {color=#f80}color{/color} {size=1.3}size{/size}"
mila "{wave}wave{/wave} {shake}shake{/shake} {ruby=よみ}読み{/ruby} pause{w=0.5} here"
mila "Trust is [trust]. A [[note] and a {{brace} start doubled."
# ── Stage ─────────────────────────────────────────────
scene bg station with fade
# Same tag: replaces the image and keeps her place.
# Transition everything that changed since the last click.
# ── Sound ─────────────────────────────────────────────
play music "audio/theme.ogg" fadein 2
play sound "audio/door.ogg"
play voice "voice/mila_001.ogg"
play sound "audio/rain.ogg" loop
# Wait a second; `pause` alone waits for a click.
# Play a video and wait for it; a click skips it.
# Play a transform (defined at the top level) on what is shown; alone, it stops.
# ── Choices and logic ─────────────────────────────────
"Only if you pay." if trust > 2:
$ table.insert(bag, "coin")
# Back to the caller, or the end of the story.