command /freeze <player>:
trigger:
set {freeze::%arg-1%} to location of arg-1
set {_x} to x coord of arg-1
set {_z} to z coord of arg-1
set {_y} to y coord of arg-1
while arg-1 is online:
if {freeze::%arg-1%} is set:
if x coord of arg-1 is not {_x}:
teleport arg-1 to location({_x}, {_y}, {_z}, world of arg-1)
if z coord of arg-1 is not {_z}:
teleport arg-1 to location({_x}, {_y}, {_z}, world of arg-1)
if y coord of arg-1 is not {_y}:
teleport arg-1 to location({_x}, {_y}, {_z}, world of arg-1)
wait 3 tick
else:
stop
command /unfreeze <player>:
trigger:
delete {freeze::%arg-1%}
on join:
set {_x} to x coord of arg-1
set {_z} to z coord of arg-1
set {_y} to y coord of arg-1
while arg-1 is online:
if {freeze::%arg-1%} is set:
if x coord of arg-1 is not {_x}:
teleport arg-1 to location({_x}, {_y}, {_z}, world of arg-1)
if z coord of arg-1 is not {_z}:
teleport arg-1 to location({_x}, {_y}, {_z}, world of arg-1)
if y coord of arg-1 is not {_y}:
teleport arg-1 to location({_x}, {_y}, {_z}, world of arg-1)
wait 3 tick
else:
stop