on leftclick on chest: if block under is cobblestone: if player is holding 1 tripwire hook: cancel event set {otwieranie::%player%} to true remove 1 tripwire hook from player set action bar of player to coloured "&eLosujesz wygrana!" play raw sound "random.pop" at player with pitch 2 volume 1 set block to lapis block wait 6 tick set block to sponge play raw sound "random.pop" at player with pitch 2 volume 1 wait 6 tick set block to redstone block play raw sound "random.pop" at player with pitch 2 volume 1 wait 6 tick set block to diamond block play raw sound "random.pop" at player with pitch 2 volume 1 wait 6 tick set block to tnt play raw sound "random.pop" at player with pitch 2 volume 1 wait 6 tick set block to cobblestone play raw sound "random.pop" at player with pitch 2 volume 1 wait 6 tick set block to chest play raw sound "random.explode" at player with pitch 1 volume 2 send player title "&c&l:(" with subtitle "&4Niestety nic :(" for 2 seconds chance of 20%: send player title "&6&lWylosowales:" with subtitle "&a&l500 coins" for 2 seconds execute console command "/addcoins %player% 500" send "&eWylosowano: &a500 coins" stop chance of 20%: send player title "&6&lWylosowales:" with subtitle "&a&l1000 coins" for 2 seconds execute console command "/addcoins %player% 1000" send "&eWylosowano: &a1000 coins" stop chance of 20%: send player title "&6&lWylosowales:" with subtitle "&a&l2000 coins" for 2 seconds execute console command "/addcoins %player% 2000" send "&eWylosowano: &a2000 coins" stop chance of 20%: send player title "&6&lWylosowales:" with subtitle "&a&l3000 coins" for 2 seconds execute console command "/addcoins %player% 4000" send "&eWylosowano: &a4000 coins" stop chance of 20%: send player title "&6&lWylosowales:" with subtitle "&a&l100 coins" for 2 seconds execute console command "/addcoins %player% 100" send "&eWylosowano: &a100 coins" stop chance of 20%: send player title "&6&lWylosowales:" with subtitle "&a&l50 coins" for 2 seconds execute console command "/addcoins %player% 50" send "&eWylosowano: &a50 coins" stop chance of 5%: send player title "&6&lWylosowales:" with subtitle "&a&lRanga VIP" for 2 seconds execute console command "/group %player% vip" execute console command "/pex user %player% group set vip" broadcast "&a&l[CASE] &eGracz &2%player% &ewylosowal: &aRanga VIP" stop stop else: cancel event send "&aJesli chcesz otworzyc Casa musisz posiadac klucz! &eMozna kupic na stronie: &7www.mc-white.pl/klucze" stop command /key [] []: trigger: if player has permission "key.give": if arg 2 is set: if arg 1 is "normal": if arg 2 is "1": broadcast "" broadcast "" broadcast "" broadcast "&6&lAdministrator &e&l%player% &6&lrozdal klucz do skrzyni &7&lNORMAL &8(&e1&8)" broadcast "" broadcast "" broadcast "" loop all players: give loop-player 131 named "&e&lKlucz" if arg 2 is "2": broadcast "" broadcast "" broadcast "" broadcast "&6&lAdministrator &e&l%player% &6&lrozdal klucz do skrzyni &7&lNORMAL &8(&e2&8)" broadcast "" broadcast "" broadcast "" loop all players: loop 2 times: give loop-player 131 named "&e&lKlucz" if arg 2 is "3": broadcast "" broadcast "" broadcast "" broadcast "&6&lAdministrator &e&l%player% &6&lrozdal klucz do skrzyni &7&lNORMAL &8(&e3&8)" broadcast "" broadcast "" broadcast "" loop all players: loop 3 times: give loop-player 131 named "&e&lKlucz" if arg 1 is "vip": if arg 2 is "1": broadcast "" broadcast "" broadcast "" broadcast "&6&lAdministrator &e&l%player% &6&lrozdal klucz do skrzyni &6&lVIP &8(&e1&8)" broadcast "" broadcast "" broadcast "" loop all players: give loop-player lever named "&e&lVIP Klucz" if arg 2 is "2": broadcast "" broadcast "" broadcast "" broadcast "&6&lAdministrator &e&l%player% &6&lrozdal klucz do skrzyni &7&lVIP &8(&e2&8)" broadcast "" broadcast "" broadcast "" loop all players: loop 2 times: give loop-player lever named "&e&lVIP Klucz" if arg 2 is "3": broadcast "" broadcast "" broadcast "" broadcast "&6&lAdministrator &e&l%player% &6&lrozdal klucz do skrzyni &7&lVIP &8(&e3&8)" broadcast "" broadcast "" broadcast "" loop all players: loop 3 times: give loop-player lever named "&e&lVIP Klucz" command /odbierz []: trigger: if player has permission "chest.vip": if {odbierz.%player%} is not set: give player lever named "&e&lVIP Klucz" set {odbierz.%player%} to false send "&aOtrzymano &e&lVIP Klucz" wait 24 hours clear {odbierz.%player%} else: send "&cDarmowy Klucz mozesz odebrac za 24 godziny!" command /aodbierz []: trigger: if player has permission "cs": if arg 1 is set: clear {odbierz.%arg 1%} else: clear {odbierz.%player%} on rightclick on chest: cancel event send "&cAby otworzyc skrzynke klikaj LPM!" on leftclick on chest: if block under is gold block: if player is holding 1 lever: cancel event set {otwieranie::%player%} to true remove 1 lever from player set action bar of player to coloured "&eLosujesz wygrana!" play raw sound "random.pop" at player with pitch 2 volume 1 set block to lapis block wait 6 tick set block to sponge play raw sound "random.pop" at player with pitch 2 volume 1 wait 6 tick set block to redstone block play raw sound "random.pop" at player with pitch 2 volume 1 wait 6 tick set block to diamond block play raw sound "random.pop" at player with pitch 2 volume 1 wait 6 tick set block to tnt play raw sound "random.pop" at player with pitch 2 volume 1 wait 6 tick set block to cobblestone play raw sound "random.pop" at player with pitch 2 volume 1 wait 6 tick set block to chest play raw sound "random.explode" at player with pitch 1 volume 2 send player title "&c&l:(" with subtitle "&4Niestety nic :(" for 2 seconds chance of 20%: send player title "&6&lWylosowales:" with subtitle "&a&l1000 coins" for 2 seconds execute console command "/addcoins %player% 1000" send "&eWylosowano: &a1000 coins" stop chance of 20%: send player title "&6&lWylosowales:" with subtitle "&a&l2000 coins" for 2 seconds execute console command "/addcoins %player% 2000" send "&eWylosowano: &a2000 coins" stop chance of 20%: send player title "&6&lWylosowales:" with subtitle "&a&l3000 coins" for 2 seconds execute console command "/addcoins %player% 3000" send "&eWylosowano: &a3000 coins" stop chance of 20%: send player title "&6&lWylosowales:" with subtitle "&a&l3500 coins" for 2 seconds execute console command "/addcoins %player% 3500" send "&eWylosowano: &a3500 coins" stop chance of 20%: send player title "&6&lWylosowales:" with subtitle "&a&l4000 coins" for 2 seconds execute console command "/addcoins %player% 4000" send "&eWylosowano: &a4000 coins" stop chance of 20%: send player title "&6&lWylosowales:" with subtitle "&a&lKLUCZ NORMAL " for 2 seconds give player 131 named "&e&lKlucz" send "&eWylosowano: &aKLUCZ NORMAL" stop stop else: cancel event send "&aJesli chcesz otworzyc Casa musisz posiadac range vip! &7mc-white.pl/vip" stop every 2 minute: broadcast "&7Rangi &6&lVIP &7moga odebrac darmowy klucz! &a/odbierz"