variables:
{freeze.maincolor} = "&c"
{freeze.seccolor} = "&c"
{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 "%{freeze.errorcolor}%You are frozen and cannot move"
set {freeze.%player%.lastused} to now
on command:
{freeze.%player%.value}
cancel the event
message "%{freeze.errorcolor}%You are frozen and cannot execute commands"
command /freeze [<player>]:
trigger:
set {_prefix} to "&8&l[&4&lAnySMP&8&l] "
arg 1 is not set:
message "%{freeze.errorcolor}%Wrong syntax! Usage: /freeze <player>"
stop
{freeze.%arg 1%.value} is not set:
set {freeze.%arg 1%.value} to false
player is arg 1:
player does not have permission "freeze.freeze":
message "%{freeze.errorcolor}%You don't have permission to do that"
stop
message "%{freeze.errorcolor}%You can't freeze yourself"
stop
not {freeze.%arg 1%.value}:
player does not have permission "freeze.freeze":
message "%{freeze.errorcolor}%You don't have permission to do that"
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 "%{_prefix}%&cYou froze %{freeze.seccolor}%%arg 1%"
message " " to arg 1
message "%{_prefix}%&c&lYou are being screenshared. If you disconnected you will automatically be banned. You have 5 minutes to join the discord or you will be banned for refusal to screenshare. After joining the discord, join the Waiting room voice chat. &4&l&n<link:https://discord.gg/y8cZSBjK9p>CLICK HERE<reset> &c<o join the screensharing discord." to arg 1
message " " to arg 1
stop
player does not have permission "freeze.unfreeze":
message "%{freeze.errorcolor}%You don't have permission to do that"
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 "%{_prefix}%&cYou unfroze %{freeze.seccolor}%%arg 1%"
message "%{_prefix}%&cYou have been unfrozen by %{freeze.seccolor}%%player%" to arg 1
How do I make it so after you enter /freeze it freezes the player and puts a gui on there screen and they cant exit out of it and move any of the items in the gui? something like this: https://imgur.com/2Zyv86Y (if you don't know how to add the gui can you give me improvements to add to the skript?)