HyperScript
Docs

← All of the Docs Commands and events

Actions

effectset <variable> to <value>

Assign

set tool of player to 1 stone sword
Try it
effectset <variable>, <variable> to <value>since 1.7.58

The same value for several: set {_a}, {_b} to 0

command /resetgame:
    trigger:
        set {game.red}, {game.blue} to 0
        send "&7Scores reset."
Try it
effectset <variable> to <value> for <duration>since 1.7.58

Assign for a time; afterwards it is unset again by itself, also across a restart. For saved variables

command /boost:
    trigger:
        set {%player%.boost} to 2 for 10 minutes
        send "&aDouble coins for ten minutes."
Try it
effectadd <value> to <variable>

Increase a number (or append to a list)

add 100 to {%player%.coins}
Try it
effectadd <n>% to <variable> / subtract <n>% from <variable>since 1.7.58

Change a number by a share of itself: add 10% to {_price} makes 100 into 110

command /sale:
    trigger:
        set {_price} to 200
        subtract 25% from {_price}
        send "&eToday only: &f%{_price}% coins"
Try it
effectsubtract <value> from <variable>

Decrease a number

subtract 1 from {_n}
Try it
expressionmultiply <variable> by <value> / divide <variable> by <value>since 1.7.57

Change a number in place: multiply {_price} by 2. An unset variable counts as 0; dividing by 0 is refused

command /double:
    trigger:
        multiply {%player%.coins} by 2
        send "&aDoubled: &f%{%player%.coins}%"
Try it
effectappend <value> to <variable>

Add to a list

append {_name} to {_picked}
Try it
effectremove <value> from <variable>

Remove from a list

remove player.name from {winners}
Try it
effectremove <item> from <who>since 1.5.6

Take items out of an inventory. The player may be in a variable: remove 5 diamond from {_target}

if player has 5 diamond:
    remove 5 diamond from player
Try it
expressionincrease <variable> by <n> / decrease <variable> by <n>since 1.7.1

The same as add and subtract, in other words

increase {%player%.coins} by 10
decrease {%player%.lives} by 1
Try it
expressiontoggle <variable>since 1.7.1

Flip between true and false; an unset variable becomes true

toggle {%player%.pvp_on}
send "&7PvP: %{%player%.pvp_on}%"
Try it
expressionswap <variable> and <variable>since 1.7.1

Exchange two values

swap {team.red.score} and {team.blue.score}
Try it
structuredefault <variable> to <value>since 1.7.1

Set it only if it has no value yet

on load:
    default {motd} to "&aWelcome!"
Try it
effectdelete <variable>

Unset; several at once with commas: delete {_a}, {_b}

delete boots of player
Try it
effectdelete <variable> for all playerssince 1.7.61

Unset a variable each player has, for everybody who has it, online or not: delete {coins} for all players. For the end of a season

command /newseason:
    permission: "staff.season"
    trigger:
        delete {coins} for all players
        send "&eA new season begins." to all players
Try it
effectset <variable> to <value> for all playerssince 1.7.61

Give it that value for everybody who has ever played: set {coins} to 100 for all players

command /gift:
    permission: "staff.gift"
    trigger:
        set {tokens} to 5 for all players
Try it
effectdelete all variables of <who>since 1.7.61

Everything the scripts keep for one player. What HyperScript itself keeps for them, such as permissions it gave and saved inventories, stays

command /wipe <who:offline player>:
    permission: "staff.wipe"
    trigger:
        delete all variables of arg.1
        send "&7Everything of %arg.1% is gone."
Try it
effectsend <text>

Message whoever triggered the script (player or console)

send "&7You are not wearing a helmet."
Try it
effectsend <text> to playersince 1.5.6

The same

send "&aSaved." to player
Try it
effectsend <text> to <player name>

Message a named online player

send "&e%player.name% says hi!" to arg.1
Try it
expressiontell <who> <text>since 1.7.67

Another way to say send <text> to <who>: tell player "Hello". message <who> <text> is the same

command /hi <target:player>:
    trigger:
        tell arg.1 "&e%player.name% says hi!"
        tell player "&7Sent."
Try it
effectsend <text> to all playerssince 1.5.6

Message every online player

send "&6The event starts in one minute!" to all players
Try it
effectsend <text> to all players with permission <node>since 1.7.57

Only those who have it. Also in world <name>, within <n> blocks of <location> and where <condition> with loop-player as each of them. These work wherever all players does

command /staffchat <words:text>:
    trigger:
        send "&d[Staff] %player.name%: &f%arg.1%" to all players with permission "staff.chat"
Try it
effectsend <text> with click command <text>since 1.5.7

A message that runs a command when clicked; see below

send "&a[Go home]" with click command "/home"
Try it
effectsend <text> with hover <text>since 1.5.7

A message that shows more when the mouse is over it

send "&e[?]" with hover "&7Hover text can explain things."
Try it
effectsend <text> with click copy <text>since 1.7.60

A message that puts the text on the clipboard of whoever clicks it: an address, a code

command /ip:
    trigger:
        send "&b[Click to copy the address]" with click copy "play.example.net"
Try it
effectsend <list> to <who> in pages of <n>since 1.7.61

A long list a page at a time, with arrows under it to click for the page before and after. titled <text> puts a heading over it, with the page beside it: send {_warps} to player in pages of 8 titled "&6Warps"

command /warps:
    trigger:
        set {_names} to keys of {warp}
        send {_names} to player in pages of 8 titled "&6Warps"
Try it
effectset chat slow mode to <duration>since 1.7.61

So long between one chat message of a player and their next; who writes sooner is told how long is left. set chat slow mode off ends it. It is kept across restarts, and players with the permission hyperscript.chat.bypass are not slowed

command /slow <time:duration>:
    permission: "staff.slow"
    trigger:
        set chat slow mode to arg.1
        send "&eChat is slowed down." to all players
Try it
effectsend <text> to <who> when they joinsince 1.7.60

Said now if they are online; if not, kept and said the next time they join. For somebody who has played here before. The last 50 are kept for each player

command /thank <who:offline player>:
    trigger:
        send "&a%player.name% says thank you!" to arg.1 when they join
        send "&7They will be told."
Try it
effectbroadcast <text>

Message every online player and the console. announce <text> is the same

broadcast "&7Remember to vote!"
Try it
effectlog <text>

Write to the server console

log "%player.name% left"
Try it
effectexecute console command <text>

Run a command as the console

execute console command "stop"
Try it
effectexecute player command <text>

Run a command as the player

execute player command "spawn"
Try it
effectgive <who> <item> or give <item> to <who>since 1.3.0

Put an item in an inventory; whatever does not fit is dropped at their feet

give player 3 diamond
give 16 bread to player
Try it
effectgive <item> to <who> [or drop]since 1.7.45

The same: or drop only says out loud what happens when the inventory is full

give 16 bread to player
Try it
effectset helmet of <who> to <item>since 1.5.7

Put an item on a player or in their hand; see below

set helmet of player to 1 diamond helmet enchanted with protection 4
Try it
effectset name of <place> to <text>since 1.7.61

Rename the item that is there, without making a new one: set name of tool of player to "&6Excalibur". The place is what an item can be read from: tool of player, helmet of player, inventory slot 3 of player

command /rename <words:text>:
    trigger:
        set name of tool of player to arg.1
        send "&aRenamed."
Try it
effectset lore of <place> to <text>, <text>since 1.7.61

Its description, a line for each text; a list gives as many lines as it has elements

command /describe:
    trigger:
        set lore of tool of player to "&7Forged in the deep", "&7Owner: %player.name%"
Try it
effectadd <text> to lore of <place>since 1.7.61

One more line under what it has

command /bind:
    trigger:
        add "&cSoulbound" to lore of tool of player
Try it
effectremove line <n> of lore of <place>since 1.7.61

Take one line out, counting from 1

command /unline:
    trigger:
        remove line 1 of lore of tool of player
Try it
effectdelete lore of <place>since 1.7.61

Take all of it away

command /plain:
    trigger:
        delete lore of tool of player
Try it
effectclear inventory of <who>since 1.5.7

Empty an inventory

clear inventory of player
Try it
expressionsave inventory of <who> as <name>since 1.7.15

Put a copy of everything they carry away under a name: the inventory, the armour and the off hand. Saving again under the same name replaces it

command /arena:
    trigger:
        save inventory of player as "before-arena"
        clear inventory of player
        give player 1 iron sword
        send "&7Your things are safe. &f/leave &7gives them back."
Try it
expressionrestore inventory of <who> from <name>since 1.7.15

Give it back, in place of what they carry now. The copy is kept until it is deleted

command /leave:
    trigger:
        if player has saved inventory "before-arena":
            restore inventory of player from "before-arena"
            delete saved inventory "before-arena"
            send "&aYour things are back."
Try it
expressionsave state of <who> as <name>since 1.7.59

Put away everything a game changes about a player, under a name: what they carry, health, food, experience, game mode and where they stand

command /joinarena:
    trigger:
        save state of player as "before-arena"
        clear inventory of player
        give 1 iron sword to player
Try it
expressionrestore state of <who> from <name>since 1.7.59

Give all of it back and take them to where they stood. The copy is kept, so it can be given back again

command /leavearena:
    trigger:
        restore state of player from "before-arena"
        send "&7Everything is as it was."
Try it
effectdelete saved inventory <name>since 1.7.15

Throw the copy away; of <who> for someone else

on player join:
    # Left over from a round that never ended properly.
    if player has saved inventory "before-arena":
        restore inventory of player from "before-arena"
        delete saved inventory "before-arena"
Try it
effectteleport <who> to <position>since 1.3.0

Move a player. tp for short: tp player to {spawn}

teleport player to {_loc}
Try it
effectheal, feed, apply <effect>, freeze, vanishsince 1.5.8

See Players

heal player
apply regeneration 2 to player for 10 seconds
Try it
expressionkick, ban, unbansince 1.5.7

See Moderation

kick arg.1 because "&cPlease calm down."
ban arg.1 for 7 days because "&cGriefing"
Try it
effectadd <who> to team <name>since 1.5.7

See Teams

add player to team "red"
Try it
effectset block at <position> to <block>since 1.5.5

Place or replace a block; see Worlds and regions

set block at {_ahead} to stone
Try it
effectset block at <position> to <block> for <duration>since 1.7.50

The same for a time: afterwards what was there is put back. Also put back when the scripts are reloaded or the server stops, so nothing is left behind

set block at player to glass for 5 seconds
Try it
effectsummon [<amount>] <entity> [named <text>] at <position>since 1.5.1

Spawn mobs or other entities

summon {boss_type} at {arena}
Try it
effectsummon ... at <position> with health <n> holding <item> dropping <item>, ...since 1.7.15

A creature with details of its own, written after the position in any order; see Entities

command /boss:
    permission: boss.spawn
    trigger:
        summon zombie named "&cThe Warden" at player glowing with health 200 with damage 12 holding diamond sword wearing diamond helmet dropping 5 diamond, 1 nether star
        broadcast "&cA boss has appeared!"
Try it
effectpermission <who> add <node> / permission <who> remove <node>since 1.5.1

Give or take back a permission; see Permissions

permission player add "server.fly"
permission player remove "server.fly"
Try it
effectplay sound <name> ...since 1.4.0

Play a sound; see Sounds

play sound "block.note_block.pling" for player
Try it
effectsend resource pack <url> ...since 1.4.0

Offer a resource pack; see Resource packs

send resource pack "https://example.com/pack.zip" with hash "da39a3ee5e6b4b0d3255bfef95601890afd80709" to player
Try it
effectset time in world ..., set weather in world ...since 1.4.0

See Worlds and regions

set time in world "%player.world%" to 1000
Try it
effectcreate region ..., delete region ...since 1.4.0

See Worlds and regions

create region "spawn_protection" from -20, 0, -20 to 20, 255, 20 in "world"
Try it
effectsend get request to ..., send post request to ...since 1.4.0

See Web requests

set {_data} to send get request to "https://hyperscript.monoforge.net/api/test"
Try it
effectcreate file, set file at, append ... to file at, delete file atsince 1.3.0

Work with text files; see Files

create file "proplayer300data.txt" at "plugins/HyperScript/"
Try it
expressionfire event <name>since 1.7.10

Run every on event "<name>": block, in this script and every other. Add with {_a}, {_b} to hand local variables over; the blocks read them under the same names

on player kill:
    set {_victim} to victim
    fire event "kill" with {_victim}

on event "kill":
    add 1 to {%player%.kills}
    send "&7You defeated &f%{_victim}%"
Try it
effectcancel event

Cancel the current event, where the event allows it

cancel event
Try it
effectwait <duration>since 1.5.2

Pause this trigger; see Waiting

wait 1 tick
Try it
effectbreak / continuesince 1.5.7

Leave a loop, or skip to its next round; see Loops

for each {_name} in {queue}:
    if {_name} is "Steve":
        continue
    send "&7Next: %{_name}%"
    break
Try it
effectstop

End the trigger immediately

stop
Try it
effectstop if <condition> / stop unless <condition>since 1.7.57

End it there if the condition holds, or unless it does. break and continue take the same

command /vip:
    trigger:
        stop unless player has permission "vip.use"
        send "&6Welcome to the lounge."
Try it
effectstop with <text> [if <condition>]since 1.7.57

Send the text to the player, then end the trigger

command /heal:
    trigger:
        stop with "&cYou are in a fight." if player is in combat
        heal player
Try it
effectreturn [<value>]since 1.5.6

Leave a function, handing back a value; see Functions

function double({_n}):
    return {_n} * 2
Try it
effectreturn if <condition> / return unless <condition>since 1.7.58

Leave the function there, handing nothing back, if the condition holds or unless it does

function pay({_who}, {_amount}):
    return if {_amount} < 1
    add {_amount} to {%{_who}%.coins}
Try it
expressionhelmet, chestplate, leggings, bootssince 1.5.7

The four armour places

set chestplate of player to 1 iron chestplate
delete boots of player
Try it
expressiontoolsince 1.5.7

What is in the main hand

if tool of player is not set:
    send "&7Your hand is empty."
Try it
expressionoffhandsince 1.5.7

What is in the other hand

set offhand of player to 1 shield
Try it
expressioninventory slot <n>since 1.5.7

One of the 36 inventory slots; 1 to 9 are the hotbar

set inventory slot 1 of player to 1 compass named "&bMenu"
Try it
effectwith click command <text>since 1.5.7

Runs the command as the player who clicks

send "&a[Accept]" with click command "/accept"
Try it
effectwith click suggestion <text>since 1.5.7

Puts the text in their chat box without sending it

send "&7[Reply]" with click suggestion "/msg Alex "
Try it
effectwith click url <text>since 1.5.7

Offers to open the web page

send "&b[Website]" with click url "https://example.com"
Try it
effectwith hover <text>since 1.5.7

Shown while the mouse is over the message

send "&6Rules" with hover "&7Be kind.\n&7No griefing."
Try it
Guide and examples
StatementEffect
set <variable> to <value>Assign
set <variable>, <variable> to <value>The same value for several: set {_a}, {_b} to 0
set <variable> to <value> for <duration>Assign for a time; afterwards it is unset again by itself, also across a restart. For saved variables
add <value> to <variable>Increase a number (or append to a list)
add <n>% to <variable> / subtract <n>% from <variable>Change a number by a share of itself: add 10% to {_price} makes 100 into 110
subtract <value> from <variable>Decrease a number
multiply <variable> by <value> / divide <variable> by <value>Change a number in place: multiply {_price} by 2. An unset variable counts as 0; dividing by 0 is refused
append <value> to <variable>Add to a list
remove <value> from <variable>Remove from a list
remove <item> from <who>Take items out of an inventory. The player may be in a variable: remove 5 diamond from {_target}
increase <variable> by <n> / decrease <variable> by <n>The same as add and subtract, in other words
toggle <variable>Flip between true and false; an unset variable becomes true
swap <variable> and <variable>Exchange two values
default <variable> to <value>Set it only if it has no value yet
delete <variable>Unset; several at once with commas: delete {_a}, {_b}
delete <variable> for all playersUnset a variable each player has, for everybody who has it, online or not: delete {coins} for all players. For the end of a season
set <variable> to <value> for all playersGive it that value for everybody who has ever played: set {coins} to 100 for all players
delete all variables of <who>Everything the scripts keep for one player. What HyperScript itself keeps for them, such as permissions it gave and saved inventories, stays
send <text>Message whoever triggered the script (player or console)
send <text> to playerThe same
send <text> to <player name>Message a named online player
tell <who> <text>Another way to say send <text> to <who>: tell player "Hello". message <who> <text> is the same
send <text> to all playersMessage every online player
send <text> to all players with permission <node>Only those who have it. Also in world <name>, within <n> blocks of <location> and where <condition> with loop-player as each of them. These work wherever all players does
send <text> with click command <text>A message that runs a command when clicked; see below
send <text> with hover <text>A message that shows more when the mouse is over it
send <text> with click copy <text>A message that puts the text on the clipboard of whoever clicks it: an address, a code
send <list> to <who> in pages of <n>A long list a page at a time, with arrows under it to click for the page before and after. titled <text> puts a heading over it, with the page beside it: send {_warps} to player in pages of 8 titled "&6Warps"
set chat slow mode to <duration>So long between one chat message of a player and their next; who writes sooner is told how long is left. set chat slow mode off ends it. It is kept across restarts, and players with the permission hyperscript.chat.bypass are not slowed
send <text> to <who> when they joinSaid now if they are online; if not, kept and said the next time they join. For somebody who has played here before. The last 50 are kept for each player
broadcast <text>Message every online player and the console. announce <text> is the same
log <text>Write to the server console
execute console command <text>Run a command as the console
execute player command <text>Run a command as the player
give <who> <item> or give <item> to <who>Put an item in an inventory; whatever does not fit is dropped at their feet
give <item> to <who> [or drop]The same: or drop only says out loud what happens when the inventory is full
set helmet of <who> to <item>Put an item on a player or in their hand; see below
set name of <place> to <text>Rename the item that is there, without making a new one: set name of tool of player to "&6Excalibur". The place is what an item can be read from: tool of player, helmet of player, inventory slot 3 of player
set lore of <place> to <text>, <text>Its description, a line for each text; a list gives as many lines as it has elements
add <text> to lore of <place>One more line under what it has
remove line <n> of lore of <place>Take one line out, counting from 1
delete lore of <place>Take all of it away
clear inventory of <who>Empty an inventory
save inventory of <who> as <name>Put a copy of everything they carry away under a name: the inventory, the armour and the off hand. Saving again under the same name replaces it
restore inventory of <who> from <name>Give it back, in place of what they carry now. The copy is kept until it is deleted
save state of <who> as <name>Put away everything a game changes about a player, under a name: what they carry, health, food, experience, game mode and where they stand
restore state of <who> from <name>Give all of it back and take them to where they stood. The copy is kept, so it can be given back again
delete saved inventory <name>Throw the copy away; of <who> for someone else
teleport <who> to <position>Move a player. tp for short: tp player to {spawn}
heal, feed, apply <effect>, freeze, vanishSee Players
kick, ban, unbanSee Moderation
add <who> to team <name>See Teams
set block at <position> to <block>Place or replace a block; see Worlds and regions
set block at <position> to <block> for <duration>The same for a time: afterwards what was there is put back. Also put back when the scripts are reloaded or the server stops, so nothing is left behind
summon [<amount>] <entity> [named <text>] at <position>Spawn mobs or other entities
summon ... at <position> with health <n> holding <item> dropping <item>, ...A creature with details of its own, written after the position in any order; see Entities
permission <who> add <node> / permission <who> remove <node>Give or take back a permission; see Permissions
play sound <name> ...Play a sound; see Sounds
send resource pack <url> ...Offer a resource pack; see Resource packs
set time in world ..., set weather in world ...See Worlds and regions
create region ..., delete region ...See Worlds and regions
send get request to ..., send post request to ...See Web requests
create file, set file at, append ... to file at, delete file atWork with text files; see Files
fire event <name>Run every on event "<name>": block, in this script and every other. Add with {_a}, {_b} to hand local variables over; the blocks read them under the same names
cancel eventCancel the current event, where the event allows it
wait <duration>Pause this trigger; see Waiting
break / continueLeave a loop, or skip to its next round; see Loops
stopEnd the trigger immediately
stop if <condition> / stop unless <condition>End it there if the condition holds, or unless it does. break and continue take the same
stop with <text> [if <condition>]Send the text to the player, then end the trigger
return [<value>]Leave a function, handing back a value; see Functions
return if <condition> / return unless <condition>Leave the function there, handing nothing back, if the condition holds or unless it does

Colours. Anywhere text is shown (chat, titles, sidebars, the tab list, item names, holograms) three kinds of colour work:

send "&aGreen, &lbold&r and plain again"
send "&#ff5555Any colour by its hex number, or <#55ffff>written like this"
send "<gradient:#ff5555:#ffaa00:#55ff55>A gradient through three colours</gradient>"
set tab name of player to "<gradient:#4ade9f:#6aa9ff>&l%player.name%</gradient>"
  • &0 to &9, &a to &f, &l bold, &o italic, &n underline, &m strikethrough, &k scrambled, &r back to normal.
  • &#rrggbb and <#rrggbb> are the same thing: any of sixteen million colours. They need Minecraft 1.16 or newer on the player's side, as every supported server has.
  • <gradient:#from:#to>text</gradient> shades the text letter by letter. Give more colours for more stops. A format code inside, such as &l, applies to the whole gradient after it.
  • uncolored <text> takes all of them out again.

send and broadcast translate & colour codes (&a, &l, ...). Inside a string, write \" for a quote, \\ for a backslash and \n for a line break. On-screen text, GUI, world, async and Discord statements are described in their own sections below.

Giving items. give puts an item in a player's inventory; anything that does not fit is dropped at their feet. The recipient may be written first or last:

give player 1 diamond sword named "&6Excalibur" with lore "&7A legendary blade", "&7Forged in fire."
give 16 bread to player
give 3 golden apple to all players
give {%player%.backpack.item} to arg.1

The item is anything described under Value types: plain words, a variable holding an item, or text holding a material name ("%{_material}%"). Up to 2304 can be given at a time. Recipient-first works with player and all players; to give to a named player, put them last after to.

Enchantments. After an item's name and lore come its enchantments and two flags:

give 1 diamond sword named "&6Excalibur" enchanted with sharpness 5, fire aspect 2 unbreakable to player
give player 1 stick glowing
set {reward} to 1 bow enchanted with power 3

enchanted with takes one or more enchantments with a level each (1 if left out). Names are Minecraft's own, written as words (fire aspect, protection) and checked when the script loads. Levels above the normal maximum are allowed. unbreakable makes the item never wear out, and glowing makes it shimmer like an enchanted item without being one. All of it is kept when the item is stored in a variable.

Tags and models. Two more things can follow an item:

give 1 blaze rod named "&dMagic wand" tagged "wand" to player
give 1 paper named "&6Ticket" model 12 to player
on right click:
    if tool of player is tagged "wand":
        apply levitation 2 to player for 3 seconds

tagged "<name>" puts a hidden label on the item. It stays with the item wherever it goes, players cannot see it, and an anvil cannot fake it, so it is how a script recognises its own items: <item> is tagged "wand", or tag of <item> for the label itself. player has 1 stick tagged "wand" and remove ... from only count items with that tag, whatever name or lore the item has. model <number> sets the custom model number a resource pack uses to draw the item differently.

Wearing and holding. What a player wears and holds can be read and set directly:

set helmet of player to 1 diamond helmet enchanted with protection 4
set tool of player to 1 stone sword
if helmet of player is not set:
    send "&7You are not wearing a helmet."
delete boots of player
clear inventory of player
PlaceMeaning
helmet, chestplate, leggings, bootsThe four armour places
toolWhat is in the main hand
offhandWhat is in the other hand
inventory slot <n>One of the 36 inventory slots; 1 to 9 are the hotbar

Each is written <place> of <who>. Reading gives an item, or unset when the place is empty; set ... to <item> replaces what is there (it is not dropped); delete empties it.

Naming an item once. An item that several lines need can be described once, at the left margin of a file, and then asked for by name wherever an item is expected, in that file or any other:

item magic wand:
    blaze rod named "&dMagic wand" with lore "&7Right-click to cast" glowing

command /wand:
    trigger:
        give player magic wand

on right click with magic wand:
    apply levitation 2 to player for 3 seconds

Under the header goes one line: an item exactly as give takes it. The name is one to five plain words and may not be the name of a Minecraft item. give player 3 magic wand, player has magic wand, player is holding magic wand and slot 5 is magic wand all work, and more can be added for one use: magic wand named "&6Golden wand".

Such an item carries its name as a hidden tag (magic_wand), so it is still recognised after a player renames it on an anvil, and a plain blaze rod is never mistaken for it. on right click with <item>: and on left click with <item>: run only for players holding that item, in either hand; any item can be written there, not only a named one.

Tools. What a player is holding can be worn down, mended and enchanted in place:

damage tool of player by 25
repair tool of player
enchant tool of player with efficiency 5

Clickable messages. A chat message can do something when clicked and show more when the mouse is over it:

send "&a[Go home]" with click command "/home" with hover "&7Teleports you home"
send "&b[Our website]" with click url "https://example.com" to all players
send "&7[Reply]" with click suggestion "/msg %player.name% " to arg.1
PartEffect
with click command <text>Runs the command as the player who clicks
with click suggestion <text>Puts the text in their chat box without sending it
with click url <text>Offers to open the web page
with hover <text>Shown while the mouse is over the message

The whole message is clickable. Write with before each part, as in the first example; to <who> may come before or after them.

Taking items. remove takes items out of an inventory, and has tests for them first:

if player has 5 diamond:
    remove 5 diamond from player
    add 100 to {%player%.coins}

It takes up to the amount given and simply stops when there is no more, so test with has when the amount matters. remove 1 diamond from all players and remove 1 diamond from arg.1 work too. What comes after from decides the meaning: a variable is a list to take a value out of, anything else is a player. For a player whose name is in a variable, write it as text: remove 1 diamond from "%{_who}%".

Teleporting. teleport player to {%player%.home} or teleport player to 0, 80, 0 in "world" moves a player and keeps the direction they are facing.

Summoning. summon spawns entities at a position:

summon zombie at player's location
summon 3 chicken at event's location
summon iron golem named "&6Town Guard" at 0, 80, 0 in "world"
summon {boss_type} at {arena}

The entity is a Minecraft entity type written as plain words (zombie, iron golem), checked when the script loads, or any value holding a type name. Up to 50 can be summoned at a time, and named gives them a visible custom name.

Who a statement is for. Statements that take a recipient accept player (the player of this trigger), all players, or anything that gives a player name such as %arg.1% or "Alex".