no it didn't work. here's my entire code:
code_language.skript:
on join:
loop all players:
if player has permission "staff.join":
loop-player has permission "staff.join"
send "&3&lSTAFF &8» &b%player% &3has joined the network." to loop-player
stop
command /staffmode:
aliases: sm
permission: staff.mode
permission message: &3&lPERMISSION &8» &cYou do not have permission to execute that command.
trigger:
if {staffmode.%player%} is not set:
set gamemode of player to adventure
clear player's inventory
wait 1 tick
send "&3&lSTAFF MODE &8» &3You have &aenabled &3Staff mode."
set slot 0 of player to compass named "&3Compass"
set slot 1 of player to book named "&3Inventory Viewer"
set slot 2 of player to feather named "&3Flight"
set slot 6 of player to packed ice named "&3Freeze"
set slot 8 of player to gray dye named "&3Vanish"
set slot 7 of player to blaze rod named "&3Random Teleporter"
set {staffmode.%player%} to true
stop
else:
send "&3&lSTAFF MODE &8» &3You have &cdisabled &3Staff mode."
wait 1 second
set gamemode of player to adventure
clear player's inventory
reveal player to all players
delete {staffmode.%player%}
stop
command /staffmodevanishon:
description: Use this command to be vanished.
permission: staff.mode
permission message: &3&lPERMISSION &8» &cYou do not have permission to execute that command.
aliases: smvon
executable by: player
trigger:
player has permission "staff.mode"
hide the player from all players
send "&3&lSTAFF MODE &8» &3You are now vanished." to the player
set the player's gamemode to adventure
command /staffmodevanishoff:
description: Use this command to be vanished.
permission: staff.mode
permission message: &3&lPERMISSION &8» &cYou do not have permission to execute that command.
aliases: smvoff
executable by: player
trigger:
player has permission "staff.mode"
reveal the player from all players
send "&3&lSTAFF MODE &8» &3You are no longer vanished." to the player
on mine:
if {staffmode::%player%} is true:
cancel the event
on pickup:
if {staffmode.%player%} is true:
cancel the event
on hunger bar change:
if {staffmode.%player%} is true:
set the player's food level to 10
on damage:
if {staffmode.%victim%} is true:
cancel event
if {staffmode.%attacker%} is true:
cancel event
on break:
if {staffmode.%player%} is true:
cancel event
on build:
if {staffmode.%player%} is true:
cancel event
on drop:
if {staffmode.%player%} is true:
cancel event
on command "/v":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/vanish":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/v":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/gm 0":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/gm 1":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/gm 2":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/gmc":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/gma":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/gms":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/gm c":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/gm a":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/gm s":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/gamemode 1":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/gamemode 2":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/gamemode 0":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/gamemode a":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/gamemode c":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/gamemode s":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/clear":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/ci":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/asdunranked":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/asdranked":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/accept <player> [<text>]":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/duel <player> [<text>]":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/asdleave":
if {staffmode.%player%} is true:
cancel event
send "&3&lSTAFF MODE &8» &cYou cannot execute that command while in Staff mode."
on command "/tp <player>":
if {staffmode.%player%} is true:
hide player to all players
on command "/spawn":
if {staffmode.%player%} is true:
clear player's inventory
teleport player to {spawn}
reveal player to all players
delete {staffmode.%player%}
on command "/suicide":
if {staffmode.%player%} is true:
kill the player
reveal player to all players
delete {staffmode.%player%}
on quit:
if {staffmode.%player%} is true:
delete {staffmode.%player%}
set gamemode of player to adventure
clear player's inventory
reveal player to all players
stop
if {staffmode.%player%} is true:
delete {staffmode.%player%}
stop
on place:
if {staffmode.%player%} is true:
cancel event
stop
on break:
if {staffmode.%player%} is true:
cancel event
stop
on inventory click:
if {staffmode.%player%} is true:
cancel event
stop
else:
stop
on rightclick on player:
if player's tool is a packed ice:
if name of player's tool is "&3Freeze":
if player has permission "staff.mode":
wait 1 ticks
execute player command "/freeze %clicked player%"
stop
on right click:
if player's tool is a gray dye:
if name of player's tool is "&3Vanish":
if player has permission "staff.mode":
set slot 8 of player to dye:10 named "&3Vanish"
make player execute command "/staffmodevanishon"
delete {staffmode.%player%}
stop
on left click:
if player's tool is a dye:10:
if name of player's tool is "&3Vanish":
if player has permission "staff.mode":
set slot 8 of player to gray dye named "&3Vanish"
make player execute command "/staffmodevanishoff"
stop
on right click on a player:
if player's tool is a book:
if name of player's tool is "&3Inventory Viewer":
if player has permission "staff.mode":
open the inventory of the clicked entity to the player
stop
on right click with blaze rod:
if player is holding a blaze rod named "&3Random Teleporter":
if player has permission "staff.mode":
set {_random} to a random player out of all players
while {_random} is name of player:
set {_random} to a random player out of all players
wait 1 tick
if {_random} is not name of player:
teleport player 1 behind {_random}
send "&3&lSTAFF MODE &8» &3You have been teleported to &b%{_random}%&3."
else:
message "&3&lPERMISSION &8» &cYou do not have permission to execute that command."
variables:
{freeze.maincolor} = "&3"
{freeze.seccolor} = "&b"
{freeze.errorcolor} = "&c"
{freeze.%player%.value} = false
on any movement:
{freeze.%player%.value}
cancel the event
set {_checktime} to now
subtract 2 seconds from {_checktime}
{freeze.%player%.lastused} is less than {_checktime}
message "&3&lFROZEN &8» &cYou have been frozen."
set {freeze.%player%.lastused} to now
on command:
{freeze.%player%.value}
cancel the event
message "&3&lFROZEN &8» &cYou cannot execute commands while frozen."
command /freeze [<player>]:
trigger:
set {_prefix} to "%{freeze.maincolor}%&lFreeze%{freeze.seccolor}%&l> %{freeze.maincolor}%"
if player does not have permission "staff.mode":
message "&3&lPERMISSION &8» &cYou do not have permission to execute that command."
stop
else:
arg 1 is not set:
message "&3&lUSAGE &8» &c/freeze <player>"
stop
{freeze.%arg 1%.value} is not set:
set {freeze.%arg 1%.value} to false
player is arg 1:
message "&3&lERROR &8» &cYou cannot freeze yourself."
stop
not {freeze.%arg 1%.value}:
player does not have permission "staff.mode":
message "&3&lPERMISSION &8» &cYou do not have permission to execute that command."
stop
set {freeze.%arg 1%.value} to true
set {_templastused} to now
subtract 1 hour from {_templastused}
set {freeze.%arg 1%.lastused} to {_templastused}
message "&3&lFROZEN &8» &b%arg 1% &3is now frozen."
message "&3&lFROZEN &8» &cYou are now frozen." to arg 1
stop
player does not have permission "staff.mode":
message "&3&lPERMISSION &8» &cYou do not have permission to execute that command."
stop
set {freeze.%arg 1%.value} to false
set {_templastused} to now
subtract 1 hour from {_templastused}
set {freeze.%arg 1%.lastused} to {_templastused}
message "&3&lFROZEN &8» &b%arg 1% &3is no longer frozen."
message "&3&lFROZEN &8» &3You are no longer frozen." to arg 1