on load:
set {item} to stick named "Waypoint"
on right click holding {item}:
set {waypoint} to player's location # (if this doesnt work, you could replace location with coordinates)
wait 1 second
teleport player to {waypoint}
loop players within 5 meters of the player:
teleport loop-player to {waypoint}
I would suggest adding a cooldown to the feature, since it could be spammed like in milliseconds.
With cooldown:
on load:
set {item} to stick named "Waypoint"
set {cooldown.%player%} to false
on right click holding {item}:
if {cooldown.%player%} is true:
send "You are on cooldown!" to player
stop
if {cooldown.%player%} is false:
set {cooldown.%player%} to true
set {waypoint} to player's location # (if this doesnt work, you could replace location with coordinates)
wait 1 second
teleport player to {waypoint}
loop players within 5 meters of the player:
teleport loop-player to {waypoint}
set {cooldown.%player%} to false
stop
^ You could also add that on join the player's cooldown is reset, in the case they leave the server while on cooldown. (I think that affects it, but im noit sure)