on place: if player's tool is dragon egg named "&6Magiczny Pierozek": set block to air clear {_cs} loop 2 times: create a fake explosion set {_cs} to 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 10 or 11 chance of 1%: set {_cs} to 0 if {_cs} is 1: drop 1 diamond leggings of protection 4, unbreaking 3 broadcast "&6MAGICZNY PIEROZEK &8» &8%player% &7otworzyl pierozka i otrzymal diamentowe spodnie &84/3&7!" remove 1 dragon egg named "&6Magiczny Pierozek" from player if {_cs} is 2: drop 1 diamond chestplate of protection 4, unbreaking 3 broadcast "&6MAGICZNY PIEROZEK &8» &8%player% &7otworzyl pierozka i otrzymal diamentowa klate &84/3&7!" remove 1 dragon egg named "&6Magiczny Pierozek" from player if {_cs} is 3: drop 1 diamond boots of protection 4, unbreaking 3 broadcast "&6MAGICZNY PIEROZEK &8» &8%player% &7otworzyl pierozka i otrzymal diamentowe buty &84/3&7!" remove 1 dragon egg named "&6Magiczny Pierozek" from player if {_cs} is 4: drop 1 diamond helmet of protection 4, unbreaking 3 broadcast "&6MAGICZNY PIEROZEK &8» &8%player% &7otworzyl pierozka i otrzymal diamentowy helm &84/3&7!" remove 1 dragon egg named "&6Magiczny Pierozek" from player if {_cs} is 5: drop 1 diamond sword of sharpness 5, fire aspect 2 broadcast "&6MAGICZNY PIEROZEK &8» &8%player% &7otworzyl pierozka i otrzymal diamentowy miecz &85/2&7!" remove 1 dragon egg named "&6Magiczny Pierozek" from player if {_cs} is 6: drop 1 diamond sword of knockback, unbreaking 3 broadcast "&6MAGICZNY PIEROZEK &8» &8%player% &7otworzyl pierozka i otrzymal diamentowy miecz &8KNOCK&7!" remove 1 dragon egg named "&6Magiczny Pierozek" from player if {_cs} is 7: drop 5 enchanted golden apple broadcast "&6MAGICZNY PIEROZEK &8» &8%player% &7otworzyl pierozka i otrzymal &8KOXY!" remove 1 dragon egg named "&6Magiczny Pierozek" from player if {_cs} is 8: drop 10 golden apple broadcast "&6MAGICZNY PIEROZEK &8» &8%player% &7otworzyl pierozka i otrzymal &8ZLOTE JABLUSZKA&7!" remove 1 dragon egg named "&6Magiczny Pierozek" from player if {_cs} is 9: spawn 1 zombie at the player equip the last spawned entity with all diamond armour of protection 4 set the last spawned entity's max health to 200 set name of spawned entity to "&c&lZOMBIACZEK POSIADA 200HP" broadcast "&6MAGICZNY PIEROZEK &8» &8%player% &7otworzyl pierozka i odwiedzily go zombiaczki!" remove 1 dragon egg named "&6Magiczny Pierozek" from player if {_cs} is 10: spawn 3 creeper at the player set the last spawned entity's max health to 100 set name of spawned entity to "&c&lCreeper" broadcast "&6MAGICZNY PIEROZEK &8» &8%player% &7otworzyl pierozka i odwiedzily go creeperki!" remove 1 dragon egg named "&6Magiczny Pierozek" from player if {_cs} is 11: drop 2 dragon egg named "&6Magiczny Pierozek" broadcast "&6MAGICZNY PIEROZEK &8» &8%player% otworzyl pierozka i otrzymal 2 pierozki!" remove 1 dragon egg named "&6Magiczny Pierozek" from player stop on rightclick on dragon egg: cancel event set block to air command /pierozek []: permission: matiqu.pierozek trigger: if arg 1 is "daj": give player Dragon Egg named "&6Magiczny Pierozek" send "&6Otrzymales pierozka!" stop if arg 1 is "all": broadcast "&8» &7Za &830 &7sekund kazdy otrzyma magicznego pierozka!" wait 600 ticks set {pierozekall} to false loop all players: loop 2 times: give loop-player Dragon Egg named "&6Magiczny Pierozek" stop