Here is a simple ranks script.
command /rank [<offline player>] [<string>]:
trigger:
if {rank::%uuid of executor%} is "owner" or "manager" or "admin":
if arg 1 is set:
if arg 2 is set:
if arg 2 is not {rank::%uuid of arg 1%}:
if arg 2 is "srmod" or "mod" or "trmod" or "default":
set {rank::%uuid of arg 1%} to arg 2
send "&9Assigned rank &7%arg 2% &9for &3%arg 1%"
send "&9Your rank has been set to &7%arg 2% &9by &3%executor%" to arg 1
else if arg 2 is "admin":
if {rank::%uuid of executor%} is "manager" or "owner":
send "&9Assigned rank &7%arg 2% &9for &3%arg 1%"
send "&9Your rank has been set to &7%arg 2% &9by &3%executor%" to arg 1
set {rank::%uuid of arg 1%} to "admin"
else:
send "&cYou cannot set someone's rank to that"
else if arg 2 is "manager":
if {rank::%uuid of executor%} is "owner":
set {rank::%uuid of arg 1%} to "manager"
send "&9Assigned rank &7%arg 2% &9for &3%arg 1%"
send "&9Your rank has been set to &7%arg 2% &9by &3%executor%" to arg 1
else:
send "&cYou cannot set someone's rank to that"
else if arg 2 is "owner":
if {rank::%uuid of executor%} is "owner":
set {rank::%uuid of arg 1%} to "owner"
send "&9Assigned rank &7%arg 2% &9for &3%arg 1%"
send "&9Your rank has been set to &7%arg 2% &9by &3%executor%" to arg 1
else:
send "&cYou cannot set someone's rank to that"
else:
send "&cThat is not a valid rank"
else:
send "&cThat player already has that rank"
else:
send "&c/rank <player> <rank (owner, manager, srmod, mod, trmod, default)>"
else:
send "&c/rank <player> <rank (owner, manager, srmod, mod, trmod, default)>"
else:
send "&cYou do not have permission"
on first join:
set {rank::%uuid of player%} to "default" where [{rank::%uuid of player%} is not set]
on chat:
if {rank::%uuid of player%} is "owner":
set chat format to "&8[&cOwner&8] &7%player% &8» &f%colored message%"
if {rank::%uuid of player%} is "manager":
set chat format to "&8[&5Manager&8] &7%player% &8» &f%colored message%"
if {rank::%uuid of player%} is "admin":
set chat format to "&8[&cAdmin&8] &7%player% &8» &f%colored message%"
if {rank::%uuid of player%} is "srmod":
set chat format to "&8[&eSenior Mod&8] &7%player% &8» &f%message%"
if {rank::%uuid of player%} is "mod":
set chat format to "&8[&eMod&8] &7%player% &8» &f%message%"
if {rank::%uuid of player%} is "trmod":
set chat format to "&8[&eTrial Mod&8] &7%player% &8» &f%message%"
if {rank::%uuid of player%} is "default":
set chat format to "&8[&7Default&8] &7%player% &8» &f%message%"