options: costZombie: 25000 costIronGolem: 100000 costBlaze: 75000 costSkeleton: 50000 costSpider: 60000 costRabbit: 200000 costHorse: 60000 costVillager: 250000 command /spawner []: trigger: if targeted block is mob spawner: if arg 1 is not set: open chest with 1 rows named "Change Spawner" to player wait 2 tick set player's current inventory's slot 0 to zombie spawn egg named "&9Spawner &3&lZOMBIE" set player's current inventory's slot 1 to spawn egg named "&9Spawner &3&lIRON GOLEM" set player's current inventory's slot 2 to blaze spawn egg named "&9Spawner &3&lBLAZE" set player's current inventory's slot 3 to skeleton spawn egg named "&9Spawner &3&lSKELETON" set player's current inventory's slot 4 to spider spawn egg named "&9Spawner &3&lSPIDER" set player's current inventory's slot 5 to spawn egg:101 named "&9Spawner &3&lRABBIT" set player's current inventory's slot 6 to horse spawn egg named "&9Spawner &3&lHORSE" set player's current inventory's slot 7 to villager spawn egg named "&9Spawner &3&lVILLAGER" stop if arg 1 is "0": if player's balance is larger than or equal to {@costZombie}: remove {@costZombie} from player's balance run player command "espawner zombie" as op stop send "&6Nie masz wystarczajaco pieniedzy." stop if arg 1 is "1": if player's balance is larger than or equal to {@costIronGolem}: remove {@costIronGolem} from player's balance run player command "espawner irongolem" as op stop send "&6Nie masz wystarczajaco pieniedzy." stop if arg 1 is "2": if player's balance is larger than or equal to {@costBlaze}: remove {@costBlaze} from player's balance run player command "espawner blaze" as op stop send "&6Nie masz wystarczajaco pieniedzy." stop if arg 1 is "3": if player's balance is larger than or equal to {@costSkeleton}: remove {@costSkeleton} from player's balance run player command "espawner skeleton" as op stop send "&6Nie masz wystarczajaco pieniedzy." stop if arg 1 is "4": if player's balance is larger than or equal to {@costSpider}: remove {@costSpider} from player's balance run player command "espawner spider" as op stop send "&6Nie masz wystarczajaco pieniedzy." stop if arg 1 is "5": if player's balance is larger than or equal to {@costRabbit}: remove {@costRabbit} from player's balance run player command "espawner rabbit" as op stop send "&6Nie masz wystarczajaco pieniedzy." stop if arg 1 is "6": if player's balance is larger than or equal to {@costHorse}: remove {@costHorse} from player's balance run player command "espawner horse" as op stop send "&6Nie masz wystarczajaco pieniedzy." stop if arg 1 is "7": if player's balance is larger than or equal to {@costVillager}: remove {@costVillager} from player's balance run player command "espawner villager" as op stop send "&6Nie masz wystarczajaco pieniedzy." stop on inventory click: if "%inventory name of player's current inventory%" is "Change Spawner": if slot is smaller than 0: stop cancel event if slot is not 8: close player's inventory execute player command "spawner %slot%"