HyperScript
Docs

← All of the Docs More

Things kept track of for you

expressionmute <who>since 1.7.52

They cannot chat, or use the commands for talking, until unmute <who>. for 10 minutes gives it an end and because "<reason>" a reason they are told. Works for somebody who is offline, and lasts through restarts

mute arg.1
Try it
expressionunmute <who>since 1.7.52

They can talk again

unmute arg.1
Try it
condition<who> is mutedsince 1.7.52

Whether they are; mute time left of <who> and mute reason of <who> say the rest

if arg.1 is muted:
    send "&7%arg.1% is muted."
Try it
effectmake <who> invulnerablesince 1.7.52

Nothing hurts them. for 5 seconds, until <condition> or while <condition> to say how long

make player invulnerable
Try it
effectmake <who> vulnerablesince 1.7.52

They can be hurt again; also written unmake <who> invulnerable

make player vulnerable
Try it
condition<who> is invulnerablesince 1.7.52

Whether a script made them so

if player is invulnerable:
    send "&7Nothing can hurt you right now."
Try it
effectkill streak of <who>since 1.7.52

How many players they have killed in a row since they last died; reset kill streak of <who> sets it back

send "&7Your streak: &c%kill streak of player%"
Try it
expressionlast location of <who>since 1.7.52

Where they were before they were last taken somewhere: a teleport of more than a few blocks, or to another world. Unset if there was none

command /back:
    trigger:
        set {_place} to last location of player
        if {_place} is not set:
            send "&cThere is nowhere to go back to."
            stop
        teleport player to {_place}
Try it
expressiondeath location of <who>since 1.7.52

Where they last died

set {_place} to death location of player
if {_place} is set:
    teleport player to {_place}
Try it
expressionstart stopwatch <name>since 1.7.52

Start counting for the player, under a name; for <who> for somebody else

start stopwatch "race"
Try it
effectstop stopwatch <name>since 1.7.52

Stop it. It goes on saying how long it ran

stop stopwatch "race"
set {_time} to stopwatch "race" of player
send "&aYou finished in %{_time}%."
Try it
expressionstopwatch <name> of <who>since 1.7.52

How long it has run, or ran until it was stopped, as a duration; unset if it was never started

set {_time} to stopwatch "race" of player
send action bar "&e%{_time}%" to player
Try it
conditionstopwatch <name> of <who> is runningsince 1.7.52

Whether it is counting now

if stopwatch "race" of player is running:
    send "&7You are in a race."
Try it
effectreset stopwatch <name>since 1.7.52

As if it had never been started

reset stopwatch "race"
Try it
expressionkeep inventorysince 1.7.52

In on player death:: whoever died keeps what they carried, and nothing is dropped

on player death:
    keep inventory
Try it
expressionkeep experiencesince 1.7.52

In on player death:: they keep their levels

on player death:
    keep experience
Try it
expressionrandom safe location within <n> blocks of <location>since 1.7.52

A place around there to put a player: ground to stand on, room for the body, nothing that burns or drowns. Unset if none was found

command /rtp:
    cooldown: 1 minute
    trigger:
        set {_place} to random safe location within 2000 blocks of spawn of world "world"
        if {_place} is not set:
            send "&cNo safe place was found. Try again."
            stop
        teleport player to {_place} after 3 seconds unless they move
Try it
Guide and examples

More that HyperScript remembers about every player by itself.

SyntaxMeaning
mute <who>They cannot chat, or use the commands for talking, until unmute <who>. for 10 minutes gives it an end and because "<reason>" a reason they are told. Works for somebody who is offline, and lasts through restarts
unmute <who>They can talk again
<who> is mutedWhether they are; mute time left of <who> and mute reason of <who> say the rest
make <who> invulnerableNothing hurts them. for 5 seconds, until <condition> or while <condition> to say how long
make <who> vulnerableThey can be hurt again; also written unmake <who> invulnerable
<who> is invulnerableWhether a script made them so
kill streak of <who>How many players they have killed in a row since they last died; reset kill streak of <who> sets it back
last location of <who>Where they were before they were last taken somewhere: a teleport of more than a few blocks, or to another world. Unset if there was none
death location of <who>Where they last died
start stopwatch <name>Start counting for the player, under a name; for <who> for somebody else
stop stopwatch <name>Stop it. It goes on saying how long it ran
stopwatch <name> of <who>How long it has run, or ran until it was stopped, as a duration; unset if it was never started
stopwatch <name> of <who> is runningWhether it is counting now
reset stopwatch <name>As if it had never been started
keep inventoryIn on player death:: whoever died keeps what they carried, and nothing is dropped
keep experienceIn on player death:: they keep their levels
random safe location within <n> blocks of <location>A place around there to put a player: ground to stand on, room for the body, nothing that burns or drowns. Unset if none was found
command /rtp:
    cooldown: 1 minute
    trigger:
        set {_place} to random safe location within 2000 blocks of spawn of world "world"
        if {_place} is not set:
            send "&cNo safe place was found. Try again."
            stop
        teleport player to {_place} after 3 seconds unless they move

command /back:
    trigger:
        set {_place} to last location of player
        if {_place} is not set:
            send "&cThere is nowhere to go back to."
            stop
        teleport player to {_place}

on player respawn:
    make player invulnerable for 5 seconds

on player death:
    if player has permission "vip.keep":
        keep inventory
        keep experience

on kill streak:
    if event.streak is 5:
        broadcast "&6%player.name% is on a killing spree!"
  • Muting. A muted player who tries to talk is told so, with the reason and how long is left; the words are messages.muted in config.yml. The commands that count as talking are mute-commands there: /msg, /tell, /w, /me, /r and a few more.
  • Invulnerable is HyperScript's own and lasts while the server runs: it is not the "Invulnerable" a player's file can carry, so nobody stays unhurtable after a crash. Falling out of the world still kills. It ends when the player leaves or dies.
  • Kill streaks count players killed by players. on kill streak: runs at every kill, with %event.streak% and %event.opponent%; ask for the number you want with if.
  • Stopwatches are kept with the player's saved variables, so one that is running goes on through a restart, and through the player being away.
  • A safe place is looked for in up to thirty spots, and each one loads its chunk, which the server waits for. Put a cooldown: on a command that uses it. In the Nether it looks under the roof.
  • These are kept under names that start with hs. among the player's saved variables ({%player%.hs.kill_streak}, {%player%.hs.last_location} and so on). Read them if you like; change them with the lines above.