Skip to main content
Effects are statements that perform actions or modify the game state. They’re the “verbs” of Skript that tell the server what to do.

What are Effects?

Effects execute actions without returning values. They can:
  • Send messages to players
  • Give or remove items
  • Teleport entities
  • Modify blocks
  • Change game state

Common Effects

# Send to a specific player
send "Hello, world!" to player

# Broadcast to everyone
broadcast "Server restart in 5 minutes!"

# Send with formatting
send "<green>Success! <reset>Your home has been set." to player

Effect Syntax

Effects follow natural English patterns:
<action> <target> <preposition> <value>
Examples:
  • send "message" to player
  • give 5 diamonds to player
  • set player's health to 20
  • teleport player to spawn

Message Formatting

Skript supports color codes and formatting in messages:
command /color:
	permission: skript.example.color
	trigger:
		send "&6This message is golden."
		send "<light red><bold>This message is light red and bold."
		send "<#FF0000>This message is red."

Interactive Text

Create clickable text with links, tooltips, and commands:
command /forum:
	permission: skript.example.link
	trigger:
		send "To visit the website, [<link:https://google.com><tooltip:click here>click here<reset>]"

command /suggest:
	permission: skript.example.suggest
	trigger:
		send "<cmd:/say hi>Click here to run the command /say hi"
		send "<sgt:/say hi>Click here to suggest the command /say hi"

Variable Effects

Modify variables with effects:
# Set a value
set {timer} to now
set {homes::%uuid of player%::%arg-2%} to player's location

# Clear variables
delete {homes::%uuid of player%::%arg-2%}
clear {items::%uuid of player%::*}

Inventory Effects

Manipulate player inventories:
command /simplechest:
	permission: skript.example.chest
	trigger:
		set {_chest} to a new chest inventory named "Simple Chest"
		set slot 0 of {_chest} to apple # Slots are numbered 0, 1, 2...
		open {_chest} to player

Delays

Wait before executing the next effect:
on first join:
	wait 1 second
	say_message("Welcome, %player%!")

command /countdown:
	trigger:
		send "3..."
		wait 1 second
		send "2..."
		wait 1 second
		send "1..."
		wait 1 second
		send "Go!"
Long delays can cause issues. Use loops with delays for repeating actions instead of many consecutive wait effects.

Event-Specific Effects

Some effects only work in certain events:
on join:
	# Only works in join events
	set the join message to "Welcome, %player%!"

on quit:
	# Only works in quit events
	set the quit message to "Goodbye, %player%!"

on damage:
	# Works in damage events
	cancel event

Conditional Effects

Combine effects with conditions for complex behavior:
command /item <items>:
	permission: skript.example.item
	executable by: players
	trigger:
		if player has permission "skript.example.item.all":
			give argument to player
		else:
			loop argument:
				if loop-item is not blacklisted:
					give loop-item to player
				else:
					send "<red>%loop-item%<reset> is blacklisted and cannot be spawned." to player

Complete Example

Here’s a real example from the Skript source showing multiple effects:
#
# A simple /home command that allows players to set, remove and travel to homes.
# This command is executable only by players, and has a `correct usage` message.
# The first argument is required, whereas the second is optional.
#

command /home <text> [<text>]:
	description: Set, delete or travel to your home.
	usage: /home set/remove <name>, /home <name>
	permission: skript.example.home
	executable by: players
	trigger:
		if arg-1 is "set":
			if arg-2 is set:
				set {homes::%uuid of player%::%arg-2%} to player's location
				send "Set your home <green>%arg-2%<reset> to <grey>%location of player%<reset>" to player
			else:
				send "You must specify a name for this home." to player
		else if arg-1 is "remove":
			if arg-2 is set:
				delete {homes::%uuid of player%::%arg-2%}
				send "Deleted your home <green>%arg-2%<reset>" to player
			else:
				send "You must specify the name of this home." to player
		else if arg-2 is set:
			send "Correct usage: /home set/remove <name>" to player
		else if {homes::%uuid of player%::%arg-1%} is set:
			teleport player to {homes::%uuid of player%::%arg-1%}
		else:
			send "You have no home named <green>%arg-1%<reset>." to player

Effect Categories

  • send <text> to <player>
  • give <items> to <player>
  • teleport <entity> to <location>
  • kill <entity>
  • heal <entity>
  • feed <entity>
  • kick <player>
  • set <block> to <type>
  • break <block>
  • spawn <entity> at <location>
  • create explosion
  • strike lightning
  • set weather to <weather>
  • set <variable> to <value>
  • delete <variable>
  • add <value> to <variable>
  • remove <value> from <variable>
  • clear <variable>
  • cancel event
  • wait <timespan>
  • stop
  • return <value>
  • exit loop
  • continue
Effects are executed in order from top to bottom. Use proper indentation to control which effects run under which conditions.

Next Steps

Conditions

Add conditional logic to your effects

Expressions

Learn about values used in effects

Build docs developers (and LLMs) love