Scripting help

Every word

Every word Splat Script has, and which scripts can use it.

These are all the words Splat Script has. The Who column shows which scripts can use a word, and a word with no symbol works in every script. Numbers in the examples are yours to change.

Triggers

WhoWordWhat it does
Every scriptwhen "alarm"When any script sets off a trigger with this name, like trigger “alarm”. Read what it brought with trigger @count, trigger 1st value, or trigger who for who set it off.
EnemiesVillagersThe hero scriptBlock scriptsObject scriptswhen I startWhen the level starts, and when I come back after being beaten.
Block scriptsObject scriptsPlatformer games onlywhen the {Hero} steps on meWhen the hero lands on me, and again each time they walk onto another of my blocks. {trigger id} is the block they're on.
Block scriptsObject scriptsPlatformer games onlywhen the {Hero} steps off meWhen the hero isn't standing on any of my blocks any more. {trigger id} is the last block they were on.
Block scriptsPlatformer games onlywhen I get hit from belowWhen the hero jumps up and bumps their head on one of my blocks. {trigger id} is that block.
Block scriptsObject scriptsPlatformer games onlywhen I get hitWhen the hero's attack reaches me (or one of my blocks), once a swing. Nothing else happens to me unless my script says so. For blocks, {trigger id} is the block hit.
Object scriptsPlatformer games onlywhen the {Hero} reaches meWhen the hero reaches me. A goal waits for this rule to finish, 5 seconds at most, before the level is won.
Object scriptsPlatformer games onlywhen I touch the {Hero}When the hero and I start touching. Harmful flyers hurt them too; say “I am harmless” to only hear it.
Object scriptsPlatformer games onlywhen the {Hero} goes through meWhen the hero goes in through me.
Object scriptsPlatformer games onlywhen I am openedWhen the hero opens me with my key.
Object scriptsPlatformer games onlywhen the {Hero} picks me upWhen the hero picks me up. My script stops after this rule: I'm carried now.
Object scriptsPlatformer games onlywhen the {Hero} bounces on meWhen I launch the hero into the air (OBJECT-SCRIPTS.SCRATCH.md).
Enemieswhen I see the {Hero} within 5 blocksWhen the hero comes into view. Without “within”, my Notice distance in Object settings is used.
Enemieswhen I lose the {Hero}When the hero gets out of view.
Enemieswhen the {Hero} swings at meJust before the hero's swing would hit me. Good for “dodge”.
Enemieswhen I get hitWhen the hero hurts me and I'm not beaten yet.
Enemieswhen the {Hero} touches meWhen I bump into the hero and hurt them.
Every scriptevery 3 secondsAgain and again, this often, counted from when the script starts. “every 2 to 4 seconds” picks a new time between them each time, so characters don't keep step with each other.
Every scriptafter 3 secondsOnce, this long after I start.
EnemiesPlatformer games onlywhen I reach an edgeWhen my next step would walk off the floor I'm on.
EnemiesPlatformer games onlywhen I bump into a wallWhen I walk into a wall, or the side of the level.
EnemiesPlatformer games onlywhen I landWhen I come down on a floor after a jump or a fall.
Villagerswhen the {Hero} talks to meWhen the {Hero} talks to me.
VillagersAdventure games onlywhen the {Hero} makes an offerWhen the hero picks things to give me with Make offer. Count them with “… in the offer”, then “accept the offer” or “turn down the offer”. One I don't answer is turned down when this rule ends.
Villagerswhen the {Hero} comes nearWhen the hero walks up close: 3 blocks, unless you say how near.
Villagerswhen the {Hero} walks awayWhen the hero goes more than 3 blocks away again.
Every scriptwhen @apples is at least 3“when” and any check an “if” can make: once each time it comes true, like “when the {Hero} has at least 10 coins”.
The game scriptLevel scriptswhen the countdown endsWhen a countdown gets to 0.
The game scriptwhen the game startsOnce, as the game starts (and again after Try again or From start).
The game scriptLevel scriptswhen any {Heroes} entersWhen the hero comes into this level, or into the place you name: a level, a world or a building, like the {Bakery}.
The game scriptLevel scriptswhen any {Heroes} leavesWhen the hero goes out of this level, or out of the place you name.
EnemiesThe game scriptLevel scriptswhen the {Slime King} is beatenWhen the enemy with this ID is beaten, or a boss's part: {Slime King}'s {left head}. A boss's own scripts call it {boss}, and a part my {left head}. In a game or level script, “when any {Ghosts} is beaten” is each enemy in that family.
EnemiesPlatformer games onlywhen the {Slime King} gets hitWhen the enemy with this ID, or a boss's part ({Slime King}'s {left head}, or my {left head} in the boss's own scripts), takes a hit but isn't beaten yet.
The game scriptLevel scriptswhen all {Ghosts} are beatenWhen the last enemy in this family in the hero's level is beaten. For one at a time, write “when any {Ghosts} is beaten”.
The game scriptLevel scriptswhen any {Heroes} picks up the {Gold key}When the hero picks up the thing with this ID, or an item by its name in quotes.
The game scriptLevel scriptswhen any {Heroes} opens the {North door}When the hero opens the door, lock or chest with this ID.
The hero scriptwhen I get hurtEach time I'm hurt.
The game scriptLevel scriptswhen any {Heroes} gets hurtEach time a hero is hurt. Inside the rule, the {Hero} is that hero.
The hero scriptwhen I am beatenWhen I run out of health.
The hero scriptwhen I come backWhen I come back to play after being beaten (online, with Respawn).
The game scriptLevel scriptswhen any {Heroes} comes backWhen a beaten hero comes back to play (online, with Respawn). Inside the rule, the {Hero} is that hero.
The hero scriptwhen I collect a coinEach time I pick up coins.
The game scriptLevel scriptswhen any {Heroes} collects a coinEach time a hero picks up coins. Inside the rule, the {Hero} is that hero.
The game scriptLevel scriptsAdventure games onlywhen any {Heroes} talks to the {Baker}When the hero talks to the villager with this ID.
The hero scriptAdventure games onlywhen I find a shardEach time I find one of the goal's shards.
The game scriptLevel scriptsAdventure games onlywhen any {Heroes} finds a shardEach time a hero finds one of the goal's shards. Inside the rule, the {Hero} is that hero.
The hero scriptAdventure games onlywhen I get a goal keyEach time I find one of the goal's keys.
The game scriptLevel scriptsAdventure games onlywhen any {Heroes} gets a goal keyEach time a hero finds one of the goal's keys. Inside the rule, the {Hero} is that hero.
The hero scriptAdventure games onlywhen I gain a skillWhen I gain a skill, like Dash. Inside the rule, trigger skill is which one: dash, smash or swim.
The game scriptLevel scriptsAdventure games onlywhen any {Heroes} gains a skillWhen a hero gains a skill, like Dash. Inside the rule, the {Hero} is that hero, and trigger skill is which one: dash, smash or swim.
The game scriptLevel scriptsPlatformer games onlywhen any {Heroes} reaches a checkpointWhen the hero reaches a checkpoint flag, or the one with this ID.
The game scriptLevel scriptsPlatformer games onlywhen any {Heroes} reaches the goalWhen the hero reaches the goal flag, just as the level ends.
The hero scriptPlatformer games onlywhen I hatch a power-upWhen I hatch a power-up egg. Inside the rule, trigger power-up is which one, like speed boost.
The game scriptLevel scriptsPlatformer games onlywhen any {Heroes} hatches a power-upWhen a hero hatches a power-up egg. Inside the rule, the {Hero} is that hero, and trigger power-up is which one, like speed boost.
The hero scriptPlatformer games onlywhen I get an extra lifeWhen I earn an extra life.
The game scriptLevel scriptsPlatformer games onlywhen any {Heroes} gets an extra lifeWhen a hero earns an extra life. Inside the rule, the {Hero} is that hero.
The game scriptLevel scriptsPlatformer games onlywhen any {Heroes} bounces on a springWhen the hero bounces on a spring, or on the one with this ID.
The hero scriptPlatformer games onlywhen my shield breaksWhen one of my shields breaks.
The game scriptLevel scriptsPlatformer games onlywhen any {Heroes} loses a shieldWhen one of a hero's shields breaks. Inside the rule, the {Hero} is that hero.
The hero scriptPlatformer games onlywhen I jumpEach time I jump.
The game scriptLevel scriptsPlatformer games onlywhen any {Heroes} jumpsEach time a hero jumps. Inside the rule, the {Hero} is that hero.
The hero scriptwhen I attackEach time I attack.
The game scriptLevel scriptswhen any {Heroes} attacksEach time a hero attacks. Inside the rule, the {Hero} is that hero.
The hero scriptPlatformer games onlywhen I crouchEach time I crouch down.
The game scriptLevel scriptsPlatformer games onlywhen any {Heroes} crouchesEach time a hero crouches down. Inside the rule, the {Hero} is that hero.
The hero scriptwhen I stand still for 5 secondsWhen I've stood still this long. Moving again lets it happen again.
The hero scriptwhen I joinWhen I come into the game, alone or online: the hero script's start.
The game scriptwhen any {Heroes} joinsOnline, each time a hero joins the game, and for everyone at the start. Inside the rule, the {Hero} is the one who joined.
The game scriptwhen any {Heroes} quitsOnline, each time a hero leaves the game. Inside the rule, the {Hero} is the one who left.
The game scriptLevel scriptsPlatformer games onlywhen any {Heroes} opens a mystery boxWhen the hero breaks open a mystery box.

Behaviors

WhoWordWhat it does
EnemiespatrolWalk about near my start: as far as my Walk distance in Object settings, or as many blocks as you say.
EnemiesVillagerswanderStroll about near my start, turning when something's in the way: a little way, or as many blocks as you say.
Enemiesstand guardStay put and turn to face a hero I see.
EnemiesVillagersstand stillStay on my block.
Enemieschase the {Hero}Run after the hero and bite.
EnemiesAdventure games onlyfight smartCircle the hero, dart in to bite, and back off again.
EnemiesVillagersfollow the {Hero}Stay a little way behind the hero, without hurting them.
EnemiesVillagersrun awayKeep away from the {Hero} while I can see them.
EnemiesVillagerswatch the {Hero}Stand still and keep turning to face the {Hero}.
EnemiesPlatformer games onlycharge at the {Hero}Swimmers: rush fast at the hero I can see. Walkers chase them.

Actions

WhoWordWhat it does
Object scriptsPlatformer games onlylock meLock again, so the hero needs my key once more.
Object scriptsPlatformer games onlyunlock meOpen, as if the hero had used my key.
Object scriptsPlatformer games onlymy leads to is {Door 3}Send the hero to another door, or to a level, by its name.
Object scriptsPlatformer games onlymy key is {Key 2}The key that opens me now, by its name.
Object scriptsPlatformer games onlystopStop what I always do until I hear “go”: a spring lies flat and doesn't bounce the hero; a platform, press, saw, belt or flyer stays still.
Object scriptsPlatformer games onlygoStart doing what I always do again, after “stop”.
Object scriptsPlatformer games onlyturn aroundGo back the way I came. A belt carries the other way.
Object scriptsPlatformer games onlyfly bySwoop across the screen now, along my fly-by path.
Object scriptsPlatformer games onlyfollow the {Hero}Fly after the hero and hover over them, until I hear “fly home”.
Object scriptsPlatformer games onlyfly homeStop following and fly back to where I was placed.
Object scriptsPlatformer games onlypressStart a press from the beginning now. After “stop”, I do just this one and wait.
Object scriptsPlatformer games onlycutDrop down and come back up now. After “stop”, I do just this one and wait at the top.
Object scriptsPlatformer games onlysinkStart sinking under the water now, as if the hero stood on me.
Object scriptsPlatformer games onlyriseFloat back up to the top of the water.
Object scriptsPlatformer games onlymy sinks when stood on is onOn: I start to sink when the hero stands on me. Off: I just float. “settings sinks when stood on” is where it started.
EnemiesPlatformer games onlyturn aroundFace the other way, and walk that way if I'm walking.
EnemiesattackUse my weapon on the hero whenever I can. With no weapon, I bite.
Enemiesstop attackingStop using my weapon until I'm told to attack again.
EnemiesPlatformer games onlyuse my weaponUse my weapon once, right now, at the hero, even after “stop attacking”. The next line waits until the shot is away. With no weapon, or Charge or Spooky, nothing happens.
EnemiesAdventure games onlydodgeSlip out of the way. Use it under “when the {Hero} swings at me”.
EnemiesVillagersrun away 3 blocksRun this far away from the {Hero}, then carry on. Add “over 2 seconds” or “slowly” to set how long it takes.
EnemiesVillagersmove toward the {Hero} 2 blocksWalk this far toward the hero, then carry on.
EnemiesVillagersBlock scriptsmove left 3 blocksWalk this far left, right, up or down (in a Platformer, left or right), then carry on. Blocks move all four ways, and carry whoever stands on them.
EnemiesVillagersmy row is 2Jump straight to this row. Row 1 is the bottom of the map. If I can't stand there, I stay put.
EnemiesVillagersmy column is 4Jump straight to this column. Column 1 is the left edge of the map. Set my row on the next line, and I go to both at once.
EnemiesPlatformer games onlywalk uphillOn a tipped seesaw platform, walk up it until it's level, or this far, like “walk uphill 2 blocks”. Nothing when it's level.
EnemiesPlatformer games onlywalk downhillOn a tipped seesaw platform, walk down it until it's level, or this far, like “walk downhill 2 blocks”. Nothing when it's level.
EnemiesVillagersgo homeWalk back to where I started.
Enemiesjump backHop a little way back from the {Hero}.
EnemiesPlatformer games onlyjumpJump straight up (2 blocks, or as high as it says, like “jump up 4 blocks”), and land before the next line.
EnemiesPlatformer games onlyjump toward the {Hero}Leap toward the hero, onto a ledge or over a gap, and land before the next line. “jump toward the {Hero}, up 3 blocks” says how high.
EnemiesPlatformer games onlyjump awayLeap away from the {Hero}, and land before the next line. “jump away, up 3 blocks” says how high.
EnemiesPlatformer games onlyhop left 1 blockA short, low hop left or right (1 block, or as far as it says), landing before the next line.
EnemiesPlatformer games onlyjump left 3 blocks, up 3 blocksOne jump left or right this far (2 blocks if it doesn't say), 2 blocks high or as high as its “up” part says, landing before the next line. The parts can come in either order.
EnemiesI burrow over 0.5 secondsGo underground, where nobody can touch or hurt me. Without a time it happens instantly. With a time, finish before the next line; add ‘and go’ to carry on while sinking.
EnemiesI emerge over 0.5 secondsCome out of the ground. Without a time it happens instantly. With a time, finish before the next line; add ‘and go’ to keep sensing while rising. Object settings choose how much is above ground.
Every scriptwait 1 secondStand still this long. Short waits can be in words: “wait half a second”, “wait a quarter of a second”. “wait 1 to 3 seconds” picks a time between them.
EnemiesVillagersface the {Hero}Turn to look at the {Hero}.
Every scripttrigger "alarm"Set off every “when” with this name, in every script, and wait until they're all done. Give it values by name, like trigger “alarm” with @count is 5, and they read them as trigger @count. End with “and go” to carry on straight away.
Every scriptstop triggeringInside a “when” with a name: the scripts after this one don't hear the trigger. Put it before any step that takes time.
EnemiesVillagersBlock scriptsObject scriptstrigger my familyRun my family's steps for this same “when”, right here. A “when” of mine takes the place of my family's “when” with the same words, so this is how I do theirs too.
Every scriptsay "Hello!"Show words in a bubble above me for a few seconds. While a scroll is open (“show a scroll”), write them on the scroll instead, and wait for the player to read them. The game and level scripts say things only on a scroll.
Every scriptlog "I am chasing the hero"Write a line in the builder's log, to see what a script is doing while you try the game. Put a @variable in it to see its value, like log “Health is @health”. Turn on Script log in Game settings to see it; players never do.
Every scriptlog @countWrite what a @variable holds in the builder's log, like “@count is 3”. For a thing, it says what the thing is, its ID, its level and where it is now; for a list, each thing in it.
The game scriptLevel scriptsshow "The gate is open!"Show words in a banner across the screen, for 4 seconds or as long as you say. Banners show one after another.
VillagersThe game scriptLevel scriptsThe hero scriptshow a scrollOpen a scroll for a story moment. Until “hide the scroll”, “say” writes on it and questions are asked on it, and the heroes stay still. Add “with typing effect” to type the words out, or “with auto scroll” to move on by itself after a pause.
VillagersThe game scriptLevel scriptsThe hero scripthide the scrollPut away the scroll from “show a scroll”, and let the heroes move again.
EnemiesVillagersThe hero scriptBlock scriptsObject scriptsrestore my sizePut one of my settings back to how the builder set it, whatever scripts changed: my size, opacity, hue, angle, look, effect, pose, weapon, speed and the rest. Add “over 2 seconds” to change back slowly, where the setting can.
The game scriptLevel scriptsrestore level musicPut a setting of the hero's level back to its Map settings: its music, darkness, weather, gravity, traction or autoscroll. Add “over 2 seconds” to change darkness, gravity or traction back slowly.
The game scriptLevel scriptsrestore {Game} boss musicPut the game's boss music or win music back to its Game settings.
VillagersThe game scriptLevel scriptsThe hero scriptshow addon "Game Logo"On a scroll: show one of the game's sprite addons by its name, playing, in the middle of the scroll. Choose a pose with “with @pose is "Walk left"”. A weapon shows still.
VillagersThe game scriptLevel scriptsThe hero scriptshow picture "Boar"On a scroll: show a built-in sprite by the name the builder gives it, like “Boar” or “Cooper”, playing, in the middle of the scroll. Choose a pose with “with @pose is "Walk left"”.
VillagersThe game scriptLevel scriptsThe hero scriptshow the {Hero}On a scroll: show the hero the player plays, looking out at them, in the middle of the scroll. Choose a pose with “with @pose is "Walk left"”.
VillagersAdventure games onlyshow my pictureOn my scroll: show my own sprite, looking out, in the middle of the scroll. Choose a pose with “with @pose is "Walk left"”.
The game scriptLevel scriptsObject scriptsopen the {North door}Open the door, gate or lock with this ID (unlocking it first). It must be in the hero's level.
The game scriptLevel scriptsAdventure games onlyclose the {North door}Close the castle door with this ID again.
The game scriptLevel scriptsObject scriptslock the {North door}Lock the door, gate or chest with this ID again. Only things with a lock in Object settings can be locked.
The game scriptLevel scriptsObject scriptsunlock the {North door}Take the lock off the door, gate or chest with this ID, as its key would.
The game scriptLevel scriptsBlock scriptsObject scriptshide the {Bridge}Take the thing with this ID out of play: it can't be seen, touched or walked on until it's brought back.
The game scriptLevel scriptsBlock scriptsObject scriptsbring back the {Bridge}Put a hidden thing back where it was.
Block scriptsObject scriptshide meTake all my blocks out of play: they can't be seen, touched or stood on until they're brought back.
Block scriptsObject scriptsbring me backPut my hidden blocks back.
The game scriptLevel scriptsAdventure games onlysend home the {Baker}The villager or enemy with this ID walks back to where it started.
The game scriptLevel scriptsAdventure games only{Game} take a "Sack of apples" from {Hero}Take one of this item out of the {Hero}'s bag, if they have it.
The game scriptLevel scripts{Game} take 5 coins from the {Hero}Take coins from the {Hero} (all they have, if they have fewer).
The game scriptLevel scriptsmove the {Hero} to the {Old well}The screen fades and the hero is put by the thing with this ID, in the hero's level: just below it, or on the block itself.
The hero scriptI freezeKeep me still (for a story moment) until “I unfreeze”.
The hero scriptI unfreezeLet me move again after “I freeze”.
The hero scriptmy attack is offStop me attacking or jumping (in a peaceful village, a sneaky room), until “my attack is on” or “my jump is on”.
The hero scriptmy attack is onLet me attack or jump again.
The hero scriptAdventure games onlyI gain dashGain a skill, as finding it would: dash, smash or swim.
The hero scriptAdventure games onlyI lose dashLose a skill I gained: dash, smash or swim.
The hero scriptPlatformer games onlyI get a speed boostA power-up, as hatching its egg gives: speed boost, super jump, jetpack or invincible.
The game scriptLevel scriptsstart a countdown of 60 secondsShow a clock counting down on the screen. “when the countdown ends” says what happens then.
The game scriptLevel scriptsstop the countdownStop the countdown and take it off the screen, without its “when the countdown ends”.
The hero scriptAdventure games onlymy health is 50%Set my health, in percent of full.
The game scriptLevel scriptslevel darkness is 80%How dark the hero's level is, 0 (lit) to 100, as its Darkness in Map settings; “off” is 0. Add “over 2 seconds” to fade.
The game scriptLevel scriptsmy weather is rainingChange the hero's level's weather: its name as its settings show it, like snow, fog or wind and rain, or a word like raining, stormy or sunny.
The game scriptLevel scriptsBlock scriptsObject scriptsplay the sound "Coin"Play a sound: one of your own (its name in Media), or a built-in one, like “Coin”, “Door open” or “Fanfare”.
The game scriptLevel scriptslevel music is "Midnight Dash"Change the hero's level's music: one of your own songs, or a built-in one by its name in the Music list.
The game scriptLevel scripts{Game} boss music is "Shadow Sneak"Change the game's Boss music for the rest of the run.
The game scriptLevel scripts{Game} win music is "Zoomies"Change the game's Win music for the rest of the run.
Every script{Game} is wonThe game is won, there and then, whatever its goal: its ending plays. Add words to show: {Game} is won with "You saved the village!"
Every script{Game} is lostGame over, there and then. Try again keeps the @variables.
Platformer games onlylevel is wonThe level is beaten, as if the hero reached the goal: on to the next level.
Platformer games onlylevel is lostThe hero loses a life and goes back to the last checkpoint, as falling into a pit does.
The hero scriptPlatformer games onlymy lives is 5Set how many lives I have.
The game scriptLevel scriptsPlatformer games onlylevel gravity is 60%The hero's level's gravity, 50% to 200%, as Gravity in Map settings: lower jumps higher and falls slower. Add “over 2 seconds” to change it slowly.
The game scriptLevel scriptsPlatformer games onlylevel traction is 20%How well the hero grips the ground, 5% (slippery as ice) to 200%, as Traction in Map settings.
The game scriptLevel scriptsPlatformer games onlylevel autoscroll is onStart or stop the camera moving on by itself, as Autoscroll in Map settings.
The game scriptLevel scriptsPlatformer games onlylevel autoscroll speed is 3 blocks a secondHow fast an autoscrolling camera moves, in blocks a second (half a block to 6).
EnemiesVillagersmy speed goes upMove one of my settings up a step: speed (slow, normal, fast, extra fast), and for enemies shot speed, shot size, grip (slippery, normal, sticky) or weight (normal, heavy). At the top step it stays there.
EnemiesVillagersmy speed goes downMove one of my settings down a step, the other way from “my … goes up”. At the bottom step it stays there.
Villagersgive my gift to the {Hero}Hand the hero what “Gives the hero” is set to in Object settings.
Block scriptsObject scriptsflash for 1 secondBlink on and off this long (half a second if it doesn't say), then carry on.
VillagersThe game scriptLevel scripts{Game} give a "Sack of apples" to {Hero}The game makes an item and puts it in the {Hero}'s bag: its name in quotes, as the bag shows it. Only the game can make things: a villager gives from their own bag with “give”.
VillagersAdventure games onlygive a "Sack of apples" to {Hero}Give the {Hero} an item from my own bag, if it's in there. To make a new one from nothing, the game does it: {Game} give.
VillagersThe game scriptLevel scriptsBlock scriptsObject scripts{Game} give 5 coins to the {Hero}The game gives the hero coins, made from nothing.
VillagersThe game scriptLevel scriptsAdventure games onlyoffer "Health egg" to {Hero} for 3 "Sack of apples"Offer the hero a deal: what they get, then “for” and what they give. Each side is an item in quotes, with how many in front, or coins. The hero sees both sides and picks Deal or No thanks. A villager gives from their bag, and what the hero gives goes into it. The script waits for the answer.
VillagersAdventure games onlyclose my shopMy talk box has no Shop button until “open my shop”. Put it first in “when the {Hero} talks to me” to talk or make deals instead.
VillagersAdventure games onlyopen my shopMy talk box has its Shop button again.
VillagersAdventure games onlyaccept the offerTake what the hero offered, and give them the item “Gives the hero” is set to, if I still have it.
VillagersAdventure games onlyaccept the offer for "Health egg"Take what the hero offered, and give them this item from my bag.
VillagersAdventure games onlyturn down the offerSay no to what the hero offered: they keep everything.
The game scriptLevel scriptsAdventure games onlyput "Health egg" in the {Baker}'s bagPut an item in the bag of the villager with this ID, if it has room. A shop keeper's bag is his shelves: add “for 10 coins” to set its price.
The game scriptLevel scriptsAdventure games onlytake "Health egg" from the {Baker}'s bagTake one of this item out of the bag of the villager with this ID, if they have it.
The game scriptLevel scriptsAdventure games onlyclose the {Baker}'s shopThe talk box of the shop keeper with this ID has no Shop button, until “open the {Baker}'s shop”.
The game scriptLevel scriptsAdventure games onlyopen the {Baker}'s shopThe talk box of the shop keeper with this ID has its Shop button again.

Settings

WhoWordWhat it does
Object scriptsPlatformer games onlymy rest between presses is 2 secondsHow long I wait between presses (a saw: at the top and at the bottom). “settings rest between presses” is where it started.
Object scriptsPlatformer games onlylower 2 blocks over 1 secondLet my chain out, so I hang this many blocks lower. With no time said, I go 2 blocks a second.
Object scriptsPlatformer games onlyraise 1 blockPull my chain in, so I hang this many blocks higher, up to where I hang from. With no time said, I go 2 blocks a second.
Object scriptsPlatformer games onlyI start rockingSwing back and forth from where I hang, 15 degrees each way unless you say how far. A longer chain swings more slowly.
Object scriptsPlatformer games onlyI stop rockingStop swinging: I settle down to hang straight.
Object scriptsPlatformer games onlymy launch speed is 20 blocks a secondHow fast I launch the hero, from 12 to 25 blocks a second. “settings launch speed” is where it started.
EnemiesVillagersThe hero scriptmy name is "Goblin"The name the triggers I send give as trigger name. Until I set one, it's my brush's name, like “Bubble, green”. A name is words, not an ID: other scripts still point at me with my ID.
The game scriptPlatformer games only{Game} starting lives is 6How many lives the hero starts the game with. It goes at the top of the game script, before any “when” line.
EnemiesVillagersThe hero scriptBlock scriptsObject scriptsmy opacity is 50How solid I look: 100 is solid, 0 is invisible (I can still be touched). Add “slowly” or “over 2 seconds” to fade.
Block scriptsObject scriptsPlatformer games onlyI am solidThe hero can stand on me and rides along when I move. A block that was pass through blocks everyone again.
Block scriptsObject scriptsPlatformer games onlyI am not solidEveryone goes through me as if I'm not there, though I can still be seen and still do what I do.
Block scriptsmy pass through is onOn: everyone goes through me as if I'm not there, though I can still be seen. Off: I'm solid again.
EnemiesVillagersThe hero scriptBlock scriptsObject scriptsmy hue is 25Turn my colors round the rainbow, from -180 to 180; 0 is my own colors. Add “slowly” or “over 2 seconds” to shift.
EnemiesVillagersThe hero scriptBlock scriptsObject scriptsmy angle is 45Tilt me clockwise, from -180 to 180; 0 is upright, and -90 tips me the other way. Only my picture turns. Add “slowly” or “over 2 seconds” to turn.
EnemiesVillagersThe hero scriptObject scriptsI am spinningSpin round where I am, clockwise, 1 turn a second, until “I am not spinning”. Only my picture turns, so I can spin anywhere, even in the air. “left” spins the other way. Say how fast with “2 turns a second”, “slowly” or “quickly”.
EnemiesVillagersThe hero scriptObject scriptsI am not spinningStop spinning, and stay at the angle I'm at. “I stop spinning slowly” or “over 1 second” slows me down until I'm upright.
EnemiesVillagersThe hero scriptBlock scriptsObject scriptsmy size is 150%How big I am, from 10% to 400%, growing from my feet; “normal” is my own size, 100%. Add “slowly” or “over 2 seconds” to grow.
EnemiesVillagersThe hero scriptBlock scriptsObject scriptsmy size goes up by 20%Grow by this much of my own size: from 100%, “goes up by 20%” makes 120%, up to 400%. Add “slowly” to grow gradually.
EnemiesVillagersThe hero scriptBlock scriptsObject scriptsmy size goes down by 25%Shrink by this much of my own size: from 100%, “goes down by 25%” makes 75%, down to 10%. Add “slowly” to shrink gradually.
EnemiesVillagersThe hero scriptmy look is darkLook light or dark, or normal: as set in Colors.
EnemiesVillagersThe hero scriptObject scriptsmy effect is frostPut an effect round me: sparkles, fire, electric, frost, shadow, hearts, music, bubbles, dizzy, petals, or none.
EnemiesVillagersmy direction is leftTurn to face left, right, up or down.
EnemiesBlock scriptsmy pose is windupShow one of my art's poses, until another one. A pose you named in the Addon Lab goes in quotes: my pose is "Anger". “normal” goes back to walking and standing.
Enemiesmy weapon is lightningCarry a weapon, as in Object settings: sword, ball-and-chain, crossbow, lightning, fireball, slimeball, ray gun, bomb, charge, run and leap, spooky, lobbed shot, beam, or none. A weapon of your own from the Addon Lab goes by its name in quotes: my weapon is "Ninja star".
Enemiesmy shot speed is slowHow fast my shots fly: slow, normal or fast. For a weapon that shoots or throws.
Enemiesmy shot size is bigHow big my shots are: small, normal or big. For a weapon that shoots or throws.
Enemiesmy shot spin is onMy shots turn round and round as they fly.
Enemiesmy shot spin is offMy shots fly without turning.
Enemiesmy attack time is 2 secondsHow often I use my weapon, as Attacks every in Object settings. “1 to 3 seconds” picks a time between them.
Enemiesmy defeat effect is splatHow I go when I'm beaten, as Defeat effect in Object settings: normal, poof, fireballs, pop, splat, leaves, zap.
EnemiesVillagersmy speed is fastHow fast I move, as an enemy's Speed in Object settings: slow, normal, fast or extra fast. “my speed goes up” and “my speed goes down” move it a step.
Block scriptsObject scriptsmy speed is 4 blocks a secondHow fast my blocks move when a “move” doesn't say how long to take. 2 blocks a second to start with.
EnemiesPlatformer games onlymy grip is slipperyHow well I keep my footing on a tipped seesaw platform, as Grip in Object settings: sticky (I never slide), normal or slippery (I slide twice as fast).
EnemiesPlatformer games onlymy weight is heavyHow hard I land, as Weight in Object settings: normal, or heavy to tip a seesaw platform where I stand and land.
EnemiesPlatformer games onlymy walk left is 4 blocksHow far left of my start I walk, as Walk left in Object settings.
EnemiesPlatformer games onlymy walk right is 4 blocksHow far right of my start I walk, as Walk right in Object settings.
EnemiesPlatformer games onlymy notice left is 8 blocksHow near on my left the hero must come before I notice them, as Notice left in Object settings.
EnemiesPlatformer games onlymy notice right is 8 blocksHow near on my right the hero must come before I notice them, as Notice right in Object settings.
EnemiesAdventure games onlymy walk distance is 4 blocksHow far from my start I walk, each way, as Walk distance in Object settings.
EnemiesAdventure games onlymy notice distance is 8 blocksHow near the {Hero} must come before I notice them, as Notice distance in Object settings.
EnemiesPlatformer games onlymy walk down stairs is onGo down with the floor when it drops, as Walk down stairs in Object settings.
EnemiesPlatformer games onlymy walk down stairs is offTurn around where the floor drops: Walk down stairs off.
EnemiesObject scriptsI am harmlessI can't hurt the hero: touching me does nothing, and I stop using my weapon. Shots already in the air still hurt. The hero can still beat me.
EnemiesObject scriptsI am harmfulI can hurt the hero again, by touch and with my weapon: “I am harmless” off.
EnemiesI am invulnerableThe hero's attacks and stomps cannot hurt me. This does not change whether touching me hurts the hero.
EnemiesI am vulnerableThe hero's attacks and stomps can hurt me again. This does not change whether touching me hurts the hero.
EnemiesPlatformer games onlymy body motion is bobbingBob, peck or splutter as I go, as Body motion in Object settings. How far and how fast stay as set there.
EnemiesPlatformer games onlymy swivel angle is 180 degrees over 1 secondTurn my physical swivel to this angle. A timed turn starts now and continues while the script runs its next step.
EnemiesPlatformer games onlymy length is 2 blocks over 1 secondSet how many blocks long my physical string is. A timed change reels it while the script continues.
EnemiesPlatformer games onlymy thickness is 0.06 blocksSet the drawn width of my string in blocks. This does not change its collision shape.
EnemiesPlatformer games onlymy color is "#292827"Set a physical string's color with six hexadecimal digits, such as "#292827".
EnemiesVillagersLevel scriptsThe hero scriptBlock scriptsObject scriptsmy @range is 5Give me a @variable of my own, at the top of my script. Each copy of me has its own, set each time I start. In my script, @range means mine; write “shared @range” for the game's. Other scripts can use it too, as {my ID} @range.
EnemiesVillagersLevel scriptsThe hero scriptBlock scriptsObject scriptssecret my @mood is "grumpy"Give me a @variable of my own that only my script can use. Other scripts can't read or change it.
The game script@coins_needed starts at 10What a shared @variable holds when a new game starts. It goes at the top of the game script, before any “when” line.

Variables

WhoWordWhat it does
Every script@count is 0Remember a number, words in quotes, yes or no in a @variable. Every character in the game shares it, until a new game starts. “@count is nothing” clears it. Put it in “say” to show it, like say “You have @count”. For a list, put commas between the values: @months is “Jan”, “Feb” and “Mar”. “@picked is a list of words” starts an empty one.
Every scriptadd "May" to @monthsPut a value on the end of a list. A @variable holding nothing becomes a list. A list holds up to 200 values.
Every scriptremove "Jan" from @monthsTake a value out of a list: the first one that matches. If it isn't there, nothing changes.
Every scriptset item 2 of @months to "Feb"Change the value at a place in a list: item 1 is the first. Past the end of the list, nothing changes.
Every script@seen is whether I see the {Hero}Remember the answer to any check an “if” can make: yes or no. Then “if @seen” asks it again later.
Every script@roll is a random number from 1 to 100Pick a whole number at random, from the first number to the last, both included, and remember it in a @variable. Either end can be a @variable. Every player in an online game gets the same number.
The game scriptLevel scripts@left is the remaining {Heroes}Remember how many of a family are still standing in the hero's level, like {Ghosts}. For {Heroes}, how many heroes are still in play, wherever they are.
The game scriptLevel scripts@team is the number of {Heroes}Remember how many heroes are in the game, beaten or not. Only for {Heroes}: for a family, write “the remaining {Ghosts}”.
Every script@count goes up by 1Add to the number in a @variable. The same as “@count is @count + 1”.
Every script@count goes down by 1Take away from the number in a @variable. The same as “@count is @count - 1”.
Every scriptgive back @a + @bInside a function: end it here, and hand a value back to the line that used it, like “@total is sum with 2, 3”.
VillagersThe game scriptLevel scriptsThe hero script@answer is the answer to "Would you like some apples?" with yes or noAsk the hero a question, and remember the answer they pick. List 2 to 6 answers, with “or” or commas: yes, no, or words in quotes. Or give one list on its own, like “with @fruits”, and its values are the answers. The script waits for the answer. A villager asks only in “when the {Hero} talks to me”.
VillagersThe game scriptLevel scriptsThe hero script@name is the typed answer to "What's your name?"Ask the hero a question they answer by typing, and remember what they type. Up to 20 letters, or say how many: “with @letters is 30” (at most 40). “@default is "Hero"” starts the box with an answer, which is also the answer if they close it. In order: “with 30, "Hero"”. The script waits for the answer. A villager asks only in “when the {Hero} talks to me”.
VillagersThe game scriptLevel scriptsAdventure games only@deal is offer "Health egg" to {Hero} for 3 "Sack of apples"Offer the hero a deal, and remember yes if they took it, or no if they said no or couldn't.
VillagersThe game scriptLevel scripts@apples is the number of "Sack of apples" in the {Hero}'s bagRemember how many of something there is: an item in the {Hero}'s bag or in my bag (a shop keeper's shelves), or the {Hero}'s coins, shards or goal keys.

Choices

WhoWordWhat it does
Every scriptif … else … endDo the steps under “if” when its check is true, or else the ones under “else”. Close it with “end”.
Every scriptelse if a 1 in 2 chanceAnother check, tried when the ones above it weren't true.
Every scriptelseWhat to do when no check above it was true.
Enemiesif my health is under 50Check my health, in percent: “under”, “over”, “at least”, “at most”, or “is” for exactly.
EnemiesVillagersThe hero scriptif my opacity is at least 50Check how solid I look, from 0 to 100.
EnemiesVillagersThe hero scriptif my hue is over 0Check how far round the rainbow my colors are turned, from -180 to 180.
EnemiesVillagersThe hero scriptif my angle is over 45Check how far I'm tilted, clockwise, from -180 to 180; 0 is upright. While I spin, it's the angle I'm at now.
EnemiesVillagersThe hero scriptif I am spinningWhether I'm spinning, or slowing down to stop.
EnemiesVillagersThe hero scriptif my size is over 150Check how big I am, in percent of my own size: 100 is my own size.
EnemiesVillagersThe hero scriptif my look is darkCheck whether I look light, dark, or normal (as set in Colors).
EnemiesVillagersThe hero scriptif my effect is fireCheck the effect round me, or “none”.
EnemiesVillagersif my direction is leftCheck which way I'm facing: left, right, up or down.
Enemiesif my weapon is lightningCheck the weapon I carry, as Object settings or “my weapon is” set it, or “none”.
Enemiesif my speed is fastCheck my speed setting: slow, normal, fast or extra fast.
EnemiesVillagersif the {Hero} is nearWhether the hero is within 3 blocks of me.
EnemiesVillagersif the {Hero} is farWhether the hero is more than 3 blocks from me: the other way round from “near”. “far away” works too, and so does “far from the {Door}”.
EnemiesVillagersif the {Hero} is within 5 blocksWhether the {Hero} is within this many blocks of me.
EnemiesVillagersif the {Door} is within 5 blocks of meWhether the thing with this ID is within this many blocks of me, or “near” for 3, and “far” for further. Measure between any two: “the {Goblin} is near the {Door}”, “I am far from the {Door}”, “the {Hero} is near the {Door}”.
EnemiesVillagersif my row is over 1Check where I am: my row (row 1 is the bottom of the map) or my column (column 1 is the left edge).
Every scriptif the {Hero}'s column is over 10Check where the hero is, or a thing by its ID, like the {Guard}'s row. One that isn't here has no row or column.
EnemiesVillagersif my distance to the {Door} is under 5How far apart two things are, in blocks, in a straight line: my distance to the {Door}, the {Goblin}'s distance to the {Hero}. “is within 5 blocks” means at most 5.
Enemiesif I see the {Hero}Whether the hero is in my view (my Notice distance in Object settings).
Enemiesif I am undergroundCheck whether I am underground, above ground, emerging, or burrowing. Above ground means I have finished rising to the height in Object settings.
EnemiesPlatformer games onlyif I am tiltingWhether the seesaw platform I stand on has tipped.
The hero scriptif my health is under 30%Check my health, in percent of full.
The hero scriptPlatformer games onlyif my lives is under 2Check how many lives I have.
VillagersThe game scriptLevel scriptsif the {Hero} has at least 10 coinsWhether the hero carries at least this much: coins, shards, goal keys, an item by its name in quotes, or a key by its {ID}. A villager checks the hero talking to them.
The game scriptLevel scriptsif the {Hero} is near the {Old well}Whether the hero is within 3 blocks of the thing with this ID, or “within 5 blocks of {…}”. “the {Hero} is far from the {Old well}” is the other way round. Any two things work too: “the {Goblin} is near the {Old well}”, and “the {Hero}'s distance to the {Old well}” is how far, in blocks.
The game scriptLevel scriptsif the {North door} is lockedWhether the door, gate or chest with this ID is locked, unlocked, open or closed.
The game scriptLevel scriptsif the remaining {Ghosts} is under 3How many enemies of this family are still standing in the hero's level. Give a family its name in the Families tab.
Every scriptif the {Hero} health is under 30%Check the {Hero}'s health, in percent of full: in a game or level script, the hero who set off this rule. In a Platformer, “the {Hero} lives is under 2” too.
The game scriptLevel scriptsThe hero scriptif the remaining {Heroes} is under 2How many heroes are still in play, wherever they are. “the number of {Heroes}” counts every hero in the game, beaten or not.
Every scriptif trigger is from a bossIn a “when” with a name: who sent the trigger. From me, the hero, a friend, an enemy, a boss, a shop keeper, the game or a level; or “trigger is making deals” for a villager whose item is a deal.
The game scriptLevel scriptsThe hero scriptif the game is onlineWhether friends are playing together online.
Every scriptif @answer is yesCheck what a @variable holds: yes, no, words (capitals don't matter), or a number with “under”, “over”, “at least” or “at most”. One never set is nothing, or 0 next to a number.
Every scriptif @door_openA @variable alone asks whether it holds yes. “if not @door_open” is when it holds anything else.
Every scriptif @key is nothingWhether a @variable was never set, or was cleared with “@key is nothing”. 0 isn't nothing.
Every scriptif a 1 in 3 chanceSometimes: 1 time in 3, or write a percent, like “a 30% chance”.
Every scriptif @count is at least 3 and a 1 in 2 chanceJoin checks with “and” (all must be true) or “or” (any one will do). Put “not” in front of a check for the opposite, like “if not the {Chest} is open”.

Loops

WhoWordWhat it does
Every scriptrepeat 3 times … endDo the steps between “repeat” and “end” this many times. “repeat forever”, or “repeat” on its own, keeps going until “stop repeating”.
Every scriptrepeat until … endDo the steps between “repeat” and “end” again and again, until the check is true. It checks before every round, so if it's true already, the steps are skipped.
Every scriptrepeat for … endCount with a @variable: it's 1 the first time round, then 2, up to 5. “from 10 to 1” counts down, and “by 2” goes up in twos. The @variable is the repeat's own, and is gone after “end”.
Every scriptrepeat for … in … endDo the steps once for each value in a list, or each one in a family: @month is the one it's on now. “repeat for @number, @month in @months” also counts where it is in the list, from 1. Both @variables are the repeat's own, and are gone after “end”.
Every scriptrepeat all {…} … endDo the steps once for each one in a family, like {Enemies}, {Heroes} or one of your own. Inside, {this one} is the one it's on now. It goes top row first, left to right, through the ones here as it starts.
Every scriptendCloses a “repeat” or an “if”. A “when” can end with one too, but doesn't need it, and neither does an “if” at the end of its “when”.
Every scriptstop repeatingLeave the “repeat” early, like when a check inside it comes true.

Built-in functions

WhoWordWhat it does
Every script@day is the day of the weekToday's day of the week, as a number: 1 is Monday and 7 is Sunday.
Every script@today is the dateToday's date, in words, like “16 November 2026”.
Every script@day is the dayToday's day of the month, from 1 to 31.
Every script@month is the monthThis month, as a number: 1 is January and 12 is December.
Every script@year is the yearThis year, like 2026.
Every script@hour is the hourThe hour of the day, from 0 (midnight) to 23 (11 at night).
Every script@word is a random one of "foo", "bar" and "baz"Pick one of the values at random, one of a list, like @jokes, or one of a family, like {Ghosts}. Every player in an online game gets the same one.
Every script@month is item 2 of @monthsThe value at a place in a list: item 1 is the first. Past the end of the list, it's nothing.
Every script@x is replace "hello" with "goodbye" in "Hello everyone"Swap every “hello” in the last words for “goodbye”. Capitals don't matter when it looks.
Every script@length is the number of letters in "Hello"How many letters some words have, spaces too.
Every script@size is the number of @monthsHow many values a list has. Nothing has 0.
Every script@best is the bigger of @score, @bestThe biggest of two or more numbers.
Every script@least is the smaller of @a, @bThe smallest of two or more numbers.
Every script@left is the remainder of @count / 3What's left over when one number is divided by another: the remainder of 7 / 3 is 1.

Filters

WhoWordWhat it does
Every script@x is "hello" then upper caseEvery letter a capital: “HELLO”.
Every script@x is "HELLO" then lower caseEvery letter small: “hello”.
Every script@x is "hELLO world" then capitalizeA capital at the start of each word, and the rest small: “Hello World”.
Every script@x is "hello" then reverseThe letters back to front: “olleh”.
Every script@x is 7 / 2 then roundedThe nearest whole number: 3.5 is 4, and 3.4 is 3.
Every script@x is 7 / 2 then rounded upThe whole number at or above it: 3.1 is 4.
Every script@x is 7 / 2 then rounded downThe whole number at or below it: 3.9 is 3.