Donc voilà un petit bout de code.
Edit: Code corrigé.
command /particules:
trigger:
open chest with 1 rows named "Particules" to player
wait 1 tick
if {nom du skript.%player%.hearts} is set:
format slot 0 of player with 166 named "&c&l&oSuspendre" with lore "||&f&oRetire les particules hearts." to be unstealable
else:
format slot 0 of player with apple named "&a&l&oHearts particule" with lore "||&f&oActive les particules hearts." to be unstealable
unformat slot 0 of player
on inventory click:
if inventory name of player's current inventory is "Particules":
cancel event
if "%type of clicked item%" is "barrier":
if name of clicked item is "&c&l&oSuspendre":
delete {nom du skript.%player%.hearts}
close inventory of player
if "%type of clicked item%" is "apple":
if name of clicked item is "&a&l&oHearts particule":
set {nom du skript.%player%.hearts} to "true"
close inventory of player
wait 1 tick
while {nom du skript.%player%.hearts} is "true":
show 10 "HEART" particles at location of player for player offset by 1, 1, 1
wait 1 seconds
on join:
while {nom du skript.%player%.hearts} is "true":
show 10 "HEART" particles at location of player for player offset by 1, 1, 1
wait 1 seconds