on right click on button: if clicked block is not {@all-tp-przycisk}: stop if block behind clicked block is {@grupowe-tp-block}: if size of (players in radius {@grupowe-tp-zasieg} around block behind clicked block) is less than 2: stop set {_loc} to getRandomTPLocation(player) loop players in radius {@grupowe-tp-zasieg} around block behind clicked block: teleport loop-player to {_loc} apply potion of speed of tier 2 to the player for 30 seconds send "{@grupowe-tp-wiadomosc}" to loop-player else if block behind clicked block is {@random-tp-block}: teleport player to getRandomTPLocation(player) apply potion of speed of tier 2 to the player for 30 seconds send "{@random-tp-wiadomosc}" to player