command /menu <text>:
trigger:
if arg 1 is "hub":
wait 2 ticks
open chest with 4 rows named "&aHub" to player
format slot 0 of player with 1 bed named "&6Hub1" with lore "&7Popularité &f%{joueurs.hub.1}% &7(%{statut.hub.presence.1}%&7)" to run [make player execute command "/hub 1"]
format slot 1 of player with 1 bed named "&6Hub2" with lore "&7Popularité &f%{joueurs.hub.2}% &7(%{statut.hub.presence.2}%&7)" to run [make player execute command "/hub 2"]
format slot 2 of player with 1 bed named "&6Hub3" with lore "&7Popularité &f%{joueurs.hub.3}% &7(%{statut.hub.presence.3}%&7)" to run [make player execute command "/hub 3"]
format slot 35 of player with 1 bed named "&6Tu est sur le hub %{hub.%player%}%" to run [make player execute command "/menu hub"]