on load: if folder "plugins/Tokeny" doesn't exists: create folder "plugins/Tokeny" create file "plugins/Tokeny/gracze.yml" variables: {tokeny.stan.%player%} = 0 command /sklepik: trigger: open chest with 1 row named "&a&l&oSklepik" to player wait 5 ticks format slot 0 of player with 1 of book named "&a&oKolorki" to close then run [execute player command "sklepik:bg kolorki"] format slot 1 of player with 1 of banner named "&a&oFly" to close then run [execute console command "sklepik:bg fly"] format slot 2 of player with 1 of diamond_pickaxe named "&4&oEpicki &a&oKilof" to close then run [execute player command "sklepik:bg ek"] format slot 3 of player with 1 of book named "&6&oSmoczy &a&lKilof" to close then run [execute player command "sklepik:bg sk"] format slot 4 of player with 1 of diamond_chestplate named "&6&oSmocze &a&lEq" to close then run [execute player command "sklepik:bg smset"] format slot 8 of player with 1 of red_wool named "&eAnuluj" to close command /sklepik:bg []: trigger: if arg 1 is not set: send "&9&l==========&e&lSklepik&9&l==========" send "&2/sklepik fly &akupujesz fly'a za &b1500 tokenow" send "&2/sklepik ek &akupujesz epicki kilof za &b800 tokenow" send "&2/sklepik sk &akupujesz smoczy kilof za &b400 tokenow" send "&2/sklepik kolorki &akupujesz kolorowe pisanie na chacie za &b1200 tokenow" send "&9&l==========&e&lSklepik&9&l==========" if arg 1 is "fly": if {tokeny.stan.%player%} is grather than or equal to 2000: send "&9&l==========&e&lSklepik&9&l==========" send "&a&lZakupiles Fly'a! Gratulacje!" send "&9&l==========&e&lSklepik&9&l==========" execute console command "pex user %player% add essentials.fly" remove 2000 from {tokeny.stan.%player%} stop if arg 1 is "fly": if {tokeny.stan.%player%} is less than or equal to 1999: send "&9&l==========&e&lSklepik&9&l==========" send "&c&lTwoje konto nie posiada &b&l2000 tokenow&c&l!" send "&9&l==========&e&lSklepik&9&l==========" if arg 1 is "kolorki": if {tokeny.stan.%player%} is grather than or equal to 1200: send "&9&l==========&e&lSklepik&9&l==========" send "&a&lZakupiles Kolorki! Gratulacje!" send "&9&l==========&e&lSklepik&9&l==========" execute console command "pex user %player% add essentials.chat.color" remove 1200 from {tokeny.stan.%player%} stop if arg 1 is "kolorki": f {tokeny.stan.%player%} is less than or equal to 1199: send "&9&l==========&e&lSklepik&9&l==========" send "&c&lTwoje konto nie posiada &b&l1200 tokenow&c&l!" send "&9&l==========&e&lSklepik&9&l==========" if arg 1 is "ek": if {tokeny.stan.%player%} is grather than or equal to 800: send "&9&l==========&e&lSklepik&9&l==========" send "&a&lZakupiles Epicki Kilof! Gratulacje!" send "&9&l==========&e&lSklepik&9&l==========" execute console command "/give %player% diamond_pickaxe 1 0 [enchants: efficiency:15 , unbreaking:1000 , silk_touch:2 , fortune:4 name:&4&l&oEpicki_&a&l&oKilof" remove 800 from {tokeny.stan.%player%} stop if arg 1 is "ek": if {tokeny.stan.%player%} is less than or equal to 799: send "&9&l==========&e&lSklepik&9&l==========" send "&c&lTwoje konto nie posiada &b&l800 tokenow&c&l!" send "&9&l==========&e&lSklepik&9&l==========" if arg 1 is "ek": if {tokeny.stan.%player%} is grather than or equal to 500: send "&9&l==========&e&lSklepik&9&l==========" send "&a&lZakupiles Smoczy Kilof! Gratulacje!" send "&9&l==========&e&lSklepik&9&l==========" execute console command "/give %player% diamond_pickaxe 1 0 [enchants: efficiency:7 , unbreaking:1000 , silk_touch:2 , fortune:4 name:&6&l&oSmoczy_&a&l&oKilof" remove 500 from {tokeny.stan.%player%} stop if arg 1 is "sk": if {tokeny.stan.%player%} is less than or equal to 499: send "&9&l==========&e&lSklepik&9&l==========" send "&c&lTwoje konto nie posiada &b&l500 tokenow&c&l!" send "&9&l==========&e&lSklepik&9&l==========" if arg 1 is "smset": if {tokeny.stan.%player%} is grather than or equal to 1300: send "&9&l==========&e&lSklepik&9&l==========" send "&a&lZakupiles Smoczy set! Gratulacje!" send "&9&l==========&e&lSklepik&9&l==========" execute console command "/give %player% diamond_boots 1 0 [enchants: protection:6 , unbreaking:100 , thorns:4 name:&6&l&oSmocze_&a&l&oNajki" execute console command "/give %player% diamond_leggings 1 0 [enchants: protection:6 , unbreaking:100 , thorns:4 name:&6&l&oSmocze_&a&l&oDresy" execute console command "/give %player% diamond_chestplate 1 0 [enchants: protection:6 , unbreaking:100 , thorns:4 name:&6&l&oSmocza_&a&l&oBluza" execute console command "/give %player% diamond_lel 1 0 [enchants: protection:6 , unbreaking:100 , thorns:4 name:&6&l&oSmocza_&a&l&oNA" remove 1300 from {tokeny.stan.%player%} stop if arg 1 is "sk": if {tokeny.stan.%player%} is less than or equal to 1299: send "&9&l==========&e&lSklepik&9&l==========" send "&c&lTwoje konto nie posiada &b&l1300 tokenow&c&l!" send "&9&l==========&e&lSklepik&9&l==========" command /atokeny [] [] []: permission: tokeny.admin trigger: if arg 1 is not set: send "&9&l==========&1&lTOKENY&4&lAdmin&9&l==========" send "&2/tokeny dodaj nick ilosc &adodaje tokeny graczu" send "&2/tokeny zabierz nick ilosc &azabiera tokeny graczu" send "&9&l==========&1&lTOKENY&4&lAdmin&9&l==========" stop if arg 1 is "re": command "skript reload tokeny" wait 1 second send "&7&l[&1&lTokeny&7&l] &2&lPomyslnie przeladowales plugin!" stop if arg 1 is "dodaj": if player is set: if arg 3 is set: if arg 3 is amount: add %arg 3% to {tokeny.stan.%player%} wait 1 second send to %player% "&7&l[&1&lTokeny&7&l] &a&lAdministrator dodal ci do konta &b&l%arg 3% tokenow&a&l!" send "&7&l[&1&lTokeny&7&l] &2&lCzynnosc wykonana" if arg 2 is not set: send "&9&l==========&1&lTOKENY&4&lAdmin&9&l==========" send "&c&lPodaj nick gracza!" send "&9&l==========&1&lTOKENY&4&lAdmin&9&l==========" stop if arg 3 is not set: send "&9&l==========&1&lTOKENY&4&lAdmin&9&l==========" send "&c&lPodaj ilosc tokenow!" send "&9&l==========&1&lTOKENY&4&lAdmin&9&l==========" stop if arg 1 is "ustaw": if arg 2 is set: if arg 3 is amount: set {tokeny.stan.%player%} to %arg 3% command /tokeny [] [] []: trigger: if arg 1 is not set: send "&9&l==========&1&lTOKENY&9&l==========" send "&2/tokeny stan &apokazuje ilosc tokenow" send "&2/tokeny oddaj nick ilosc &aoddaje tokeny graczu" send "&2/tokeny stan gracz &apokazuje ile tokenow ma gracz" send "&2/sklepik &atutaj mozesz wydac tokeny" send "&9&l==========&1&lTOKENY&9&l==========" stop if arg 1 is "stan": send "&9&l==========&1&lTOKENY&9&l==========" send "&a&lTwoja aktualna liczba tokenow wynosi &6&l%{tokeny.stan.%player%}%" send "&9&l==========&1&lTOKENY&9&l==========" stop if arg 1 is "oddaj": if arg 2 is set: if arg 3 is set: if {tokeny.stan.%player%} is %arg 3%: remove %arg 3% from {tokeny.stan.%player%} send "&9&l==========&1&lTOKENY&9&l==========" send "&a&lOddales &6&l%arg 3% tokenow &a&lgraczowi &6&l%arg 2%" send "&a&lTeraz twoj stan tokenow wynosi &6&l%{tokeny.stan.%player%}" send "&9&l==========&1&lTOKENY&9&l==========" stop else: send "&9&l==========&1&lTOKENY&9&l==========" send "&c&lNie masz tyle tokenow: &6&l%arg 3%" send "&9&l==========&1&lTOKENY&9&l==========" stop if arg 1 is "oddaj": if arg 2 is not set: send "&9&l==========&1&lTOKENY&9&l==========" send "&c&lPodaj nick gracza!" send "&9&l==========&1&lTOKENY&9&l==========" stop if arg 1 is "oddaj": if arg 2 is set: if arg 3 is not set: send "&9&l==========&1&lTOKENY&9&l==========" send "&c&lPodaj liczbe tokenow ktore chcesz oddac graczowi &6&l%arg 2%" send "&9&l==========&1&lTOKENY&9&l=========="