tiens mais franchement j'ai galèrer à le faire mais c'est cadeau.
on break of spawner:
player's tool is any pickaxe of silk touch
set {_s} to nbt of targeted block
set {_s::*} to {_s} split at """"
drop spawner with nbt "{BlockEntityTag:{SpawnData:{id:""%{_s::2}%""},id:""minecraft:mob_spawner"",SpawnPotentials:[0:{Entity:{id:""%{_s::2}%""},Weight:1}]},display:{Name:""&6Spawner %{_s::2}%""}}"
function BuySpawner(p: player, mob: text, price: integer):
if {_p}'s balance >= {_price}:
make console execute command "eco take %{_p}% %{_price}%"
message "&aVous avez reçu un &6spawner %{_mob}%" to {_p}
give spawner with nbt "{BlockEntityTag:{SpawnData:{id:""%{_mob}%""},id:""minecraft:mob_spawner"",SpawnPotentials:[0:{Entity:{id:""%{_mob}%""},Weight:1}]},display:{Name:""&6Spawner %{_mob}%""}}" to {_p}
else:
message "&cVous n'avez pas assez d'argent." to {_p}
command /spawner:
trigger:
open virtual chest inventory with size 3 named "[Spawner]" to player
set {_i} to shiny spawner named "&6&lSpawner Blaze"
set line 2 of lore of {_i} to "&a600 000$"
make a gui slot 0 of player with {_i} to run function BuySpawner(player, "Blaze",600000)
set {_i} to shiny spawner named "&6&lSpawner Spider"
set line 2 of lore of {_i} to "&a600 000$"
make a gui slot 1 of player with {_i} to run function BuySpawner(player, "Spider",600000)
set {_i} to shiny spawner named "&6&lSpawner Iron Golem"
set line 2 of lore of {_i} to "&a600 000$"
make a gui slot 2 of player with {_i} to run function BuySpawner(player, "VillagerGolem",600000)
set {_i} to shiny spawner named "&6&lSpawner PigZombie"
set line 2 of lore of {_i} to "&a600 000$"
make a gui slot 3 of player with {_i} to run function BuySpawner(player, "PigZombie",600000)
set {_i} to shiny spawner named "&6&lSpawner Skeleton"
set line 2 of lore of {_i} to "&a600 000$"
make a gui slot 4 of player with {_i} to run function BuySpawner(player, "Skeleton",600000)
set {_i} to shiny spawner named "&6&lSpawner Zombie"
set line 2 of lore of {_i} to "&a600 000$"
make a gui slot 4 of player with {_i} to run function BuySpawner(player, "Zombie",600000)