# ───────────────────────────────────────────────
# Author: Miko – SkriptRush
# Version: 1.0
# Notes: Do not claim as your own or redistribute without permission.
# ───────────────────────────────────────────────
options:
em: "&7[&cCommand Error&7] &fI'm sorry. Something went wrong trying to run this command. Try contacting a member of staff!"
# ───────────────────────────────────────────────
# Chat Formatting
# Player's prefix requires a permission plugin to work - such as LuckPerms
# ───────────────────────────────────────────────
on chat:
cancel event
broadcast "%player's prefix% &6%player%&f: %message%"
# ───────────────────────────────────────────────
# Message Command
# This command has a longer skript to overlap MC
# ───────────────────────────────────────────────
command /message <player> <text>:
trigger:
if arg-1 is online:
set {lastMsg::%player%} to arg-1
set {lastMsg::%arg-1%} to player
send "&7[&6From %player%&7] &o%arg-2%" to arg-1
send "&7[&6Sent to %arg-1%&7] &o%arg-2%" to player
loop all players:
if loop-player has permission "viewmessages.sk":
if {viewMessages-%loop-player%} is set:
send "&7[&6Messages: From %player% to %arg-1%&7] &o%arg-2%" to loop-player
else:
send "&cThe player %arg-1% is not online."
command /msg <player> <text>:
trigger:
if arg-1 is online:
set {lastMsg::%player%} to arg-1
set {lastMsg::%arg-1%} to player
send "&7[&6From %player%&7] &o%arg-2%" to arg-1
send "&7[&6Sent to %arg-1%&7] &o%arg-2%" to player
loop all players:
if loop-player has permission "viewmessages.sk":
if {viewMessages-%loop-player%} is set:
send "&7[&6Messages: From %player% to %arg-1%&7] &o%arg-2%" to loop-player
else:
send "&cThe player %arg-1% is not online."
command /reply <text>:
trigger:
if {lastMsg::%player%} is set:
set {_recipient} to {lastMsg::%player%}
if {_recipient} is online:
send "&7[&6From %player%&7] &o%arg-1%" to {_recipient}
send "&7[&6Sent to %{lastMsg::%player%}%&7] &o%arg-1%" to player
loop all players:
if loop-player has permission "viewmessages.sk":
if {viewMessages-%loop-player%} is set:
send "&7[&6Messages: From %player% to %{lastMsg::%player%}%&7] &o%arg-1%" to loop-player
else:
send "&7[&6Messages&7] &fThe player you were last messaging is no longer online."
else:
send "&7[&6Messages&7] &fYou have no one to reply to."
command /r <text>:
trigger:
if {lastMsg::%player%} is set:
set {_recipient} to {lastMsg::%player%}
if {_recipient} is online:
send "&7[&6From %player%&7] &o%arg-1%" to {_recipient}
send "&7[&6Sent to %{lastMsg::%player%}%&7] &o%arg-1%" to player
loop all players:
if loop-player has permission "viewmessages.sk":
if {viewMessages-%loop-player%} is set:
send "&7[&6Messages: From %player% to %{lastMsg::%player%}%&7] &o%arg-1%" to loop-player
else:
send "&7[&6Messages&7] &fThe player you were last messaging is no longer online."
else:
send "&7[&6Messages&7] &fYou have no one to reply to."
command /viewmessages:
aliases: /vm
trigger:
if player has permission "viewmessages.sk":
if {viewMessages-%player%} is not set:
set {viewMessages-%player%} to true
send "&7[&6Admin Console&7] &fAll private messages will now be visible!"
else:
delete {viewMessages-%player%}
send "&7[&6Admin Console&7] &fAll private messages will no longer be visible!"
on leave:
delete {lastMsg::%player%}
# ───────────────────────────────────────────────
# Crafting Table Command
# ───────────────────────────────────────────────
command /craftingtable:
aliases: /craft
trigger:
wait 5 ticks
open crafting table to player
# ───────────────────────────────────────────────
# Ender Chest Command
# ───────────────────────────────────────────────
command /enderchest:
aliases: /ec
trigger:
wait 5 ticks
open player's ender chest to player
# ───────────────────────────────────────────────
# Spawn Command
# ───────────────────────────────────────────────
command /spawn:
trigger:
if {pvp::%player%} is set:
send "&7[&6Server Console&7] &fIt appear's you are currently in combat. Please wait &e10 seconds&f!"
stop
send "&7[&6Server Console&7] &fSending you to spawn in 3 seconds!"
wait 3 seconds
teleport player to {serverSpawnPoint}
execute command "/holo reload"
# ───────────────────────────────────────────────
# Set Spawn Command - Admin Command
# Permissions: admin.setspawn
# ───────────────────────────────────────────────
command /setspawn:
trigger:
if player has permission "admin.setspawn":
set {serverSpawnPoint} to player's position
send "&7[&6Server Console&7] &fYou have set world spawn to: %{serverSpawnPoint}%"
else:
send "&7[&cPermission Error&7] &fIt appears you do not have the correct permissions for this command!"
# Detects if the player is combat to ensure they can't leave mid fight
on damage:
attacker is a player
victim is a player
set {pvp::%attacker%} to true
set {pvp::%victim%} to true
wait 10 seconds
delete {pvp::%attacker%}
delete {pvp::%victim%}
# ───────────────────────────────────────────────
# Fly Command - Admin Command
# Permissions: admin.fly
# ───────────────────────────────────────────────
command /fly [<player>]:
trigger:
if player has permission "admin.fly":
if arg-1 is set:
if {flyToggle::%arg-1%} is not set:
set {flyToggle::%arg-1%} to true
send "&7[&dFly&7] &fYou have &aenabled &fflight mode for &e%arg-1%!" to player
send "&7[&dFly&7] &fYou have &aenabled &fflight mode!" to arg-1
enable fly for arg-1
else:
delete {flyToggle::%arg-1%}
send "&7[&dFly&7] &fYou have &cdisabled &fflight mode for &e%arg-1%!" to player
send "&7[&dFly&7] &fYou have &cdisabled &fflight mode!" to arg-1
disable fly for arg-1
else:
if {flyToggle::%player%} is not set:
set {flyToggle::%player%} to true
send "&7[&dFly&7] &fYou have &aenabled &fflight mode!"
enable fly for player
else:
delete {flyToggle::%player%}
send "&7[&dFly&7] &fYou have &cdisabled &fflight mode!"
disable fly for player
else:
send "%{@em}%"