command /secrettracker:
trigger:
if player has permission "tracker.use":
give player a compass named "&5&lTracker"
else:
send "&cYou do not have permission to use this command!"
on right click with compass:
if name of player's tool is "&5&lTracker":
set {_gui} to chest inventory with 3 rows named "&5&lPlayer Tracker"
set {_slot} to 0
loop all players:
if loop-player is not player:
set {_head} to skull of loop-player
set {_item} to {_head} named "&a%loop-player%" with lore "&7Click to track!"
set {_slot} to {_slot} + 1
set slot {_slot} of {_gui} to {_item}
open {_gui} to player
wait 1 tick
make player execute "trackmenu"
command /trackmenu:
trigger:
set {_gui} to chest inventory with 3 rows named "&5&lPlayer Tracker"
set {_slot} to 0
loop all players:
if loop-player is not player:
set {_head} to skull of loop-player
set {_item} to {_head} named "&a%loop-player%" with lore "&7Click to track!"
format gui slot {_slot} of {_gui} with {_item} to run:
set {_target} to loop-player
set {_bossbar} to bossbar with title "&5Tracking %{_target}% - %distance between player and {_target}%m" and progress 100%
show bossbar {_bossbar} to player
send "&aYou are now tracking %{_target}%!"
send "&cYou are now being tracked by Marine_Secret!" to {_target}
while player is online and {_target} is online:
set bossbar {_bossbar}'s title to "&5Tracking %{_target}% - %distance between player and {_target}%m"
wait 2 seconds
add 1 to {_slot}
open {_gui} to player