function BankGUI(p: player, t: text, i: item): close {_p}'s inventory set {_player-has-group} to yaml value "player-group" from file "zmienne/%{_p}'s uuid%.yml" if {_player-has-group} is set: wait 2 ticks if {_i} is empty map: set {_bank-integer} to "monet" if {_i} is cobblestone: set {_bank-integer} to "bruku" open chest with 3 rows named "&9» &0Bank (&3%{_bank-integer}%&0)" to {_p} wait 3 ticks if "%inventory name of {_p}'s current inventory%" contains "&9» &0Bank (&3%{_bank-integer}%&0)": set {_bank} to yaml value "%{_player-has-group}%.%{_t}%" from file "groups/groups-bank.yml" set {_bank-cobble-max} to yaml value "%{_player-has-group}%.max-cobble" from file "groups/groups-bank.yml" set {_bank-cobble-max} to "&9» &7Wymagana ilość do punktu umiejętności:|| &3%{_bank-cobble-max}%" set {_bank-points} to yaml value "%{_player-has-group}%.points" from file "groups/groups-bank.yml" loop 3*9 times: format slot loop-number - 1 of {_p} with 1 of gray stained glass pane to be unstealable if {_i} is cobblestone: format slot 10 of {_p} with 1 of paper named "&3» &ePunkty umiejętności: &b%{_bank-points}%" with lore "||&9» &7Kliknij na daną umiejętność, aby ją zakupić!" to be unstealable format slot 13 of {_p} with 1 of diamond named "&3» &eUmiejetnosc: &7Powiekszenie dropu" with lore "||&9» &7Ta funkcja powiększa Twój aktualny drop||&7" to be unstealable if {_i} is empty map: set {_bank-cobble-max} to "" set {_owner} to yaml value "%{_player-has-group}%.owner" from file "groups/groups-list.yml" set {_owner} to {_owner} parsed as player if {_owner} is player: format slot 15 of {_p} with 1 of glowing empty map named "&3» &7Wypłać gotówkę dla użytkowników" to close then run [BankSelect({_p})] format slot 11 of {_p} with 1 of {_i} named "&3» &7Bank %{_bank-integer}%" with lore "&9» &7W banku znajduje sie &e%{_bank}% &7%{_bank-integer}%||%{_bank-cobble-max}%||&2» &aKliknij, aby wplacic do banku przedmiot" to run [BankConfirm({_p}, {_t}, {_i})] format slot 18 of {_p} with 1 of arrow named "&3» &ePowrót" to close then run [make {_p} execute command "executed grupa bank"] function BankConfirm(p: player, t: text, i: item): close {_p}'s inventory set {_player-has-group} to yaml value "player-group" from file "zmienne/%{_p}'s uuid%.yml" if {_player-has-group} is set: wait 2 ticks open chest with 6 rows named "&9» &0Wplata - %{_t}%" to {_p} wait 3 ticks if "%inventory name of {_p}'s current inventory%" contains "&9» &0Wplata - %{_t}%": loop 6*9 times: set slot loop-number - 1 of {_p}'s current inventory to 1 of gray stained glass pane set slot 4 of {_p}'s current inventory to 1 of {_i} named "&9» &7Wplata: &e%{_t}%" with lore "||&3» &7Ilosc do wplacenia: 1" set yaml value "group-bank-pay" from file "zmienne/%{_p}'s uuid%.yml" to "1" set slot 10 of {_p}'s current inventory to 1 of red dye named "&c-1" set slot 19 of {_p}'s current inventory to 1 of red dye named "&c-10" set slot 28 of {_p}'s current inventory to 1 of red dye named "&c-100" set slot 16 of {_p}'s current inventory to 1 of green dye named "&a+1" set slot 25 of {_p}'s current inventory to 1 of green dye named "&a+10" set slot 34 of {_p}'s current inventory to 1 of green dye named "&a+100" set slot 37 of {_p}'s current inventory to 1 of red dye named "&c-1000" set slot 43 of {_p}'s current inventory to 1 of green dye named "&a+1000" set slot 46 of {_p}'s current inventory to 1 of red dye named "&c-10000" set slot 52 of {_p}'s current inventory to 1 of green dye named "&a+10000" function BankPay(p: player, t: text, i: item, n: number): close {_p}'s inventory set {_n} to {_n} parsed as number set {_player-has-group} to yaml value "player-group" from file "zmienne/%{_p}'s uuid%.yml" if {_player-has-group} is set: set {_wplacona-ilosc} to yaml value "%{_player-has-group}%.%{_t}%" from file "groups/groups-bank.yml" set {_maksymalna-ilosc} to yaml value "%{_player-has-group}%.max-cobble" from file "groups/groups-bank.yml" set {_maksymalna-ilosc} to {_maksymalna-ilosc} parsed as number set {_wplacona-ilosc} to {_wplacona-ilosc} parsed as number set {_dodaj} to {_wplacona-ilosc} + {_n} if {_t} is "cobble": set {_number} to number of cobblestone in {_p}'s inventory if {_n} is smaller than or equal to {_number}: send "&5&lCave&f&lBlock &9» &7Wplaciles &e%{_n}%&7 bruku do banku grupy!" to {_p} remove {_n} of cobblestone from {_p}'s inventory set yaml value "%{_player-has-group}%.%{_t}%" from file "groups/groups-bank.yml" to "%{_dodaj}%" if {_dodaj} is bigger than {_maksymalna-ilosc}: set {_maksymalna-ilosc} to {_maksymalna-ilosc} * 2.5 set yaml value "%{_player-has-group}%.max-cobble" from file "groups/groups-bank.yml" to "%{_maksymalna-ilosc}%" set {_group-members::*} to yaml list "%{_player-has-group}%.members" from file "groups/groups-list.yml" loop {_group-members::*}: set {_%loop-value%} to loop-value parsed as player send "&5&lCave&f&lBlock &9» &7Gracz &3%{_p}% &7wpłacił ostateczną stawkę! &7Ustawiono nową stawkę: &e%{_maksymalna-ilosc}%&7. Powodzenia!" to {_%loop-value%} set {_owner} to yaml value "%{_player-has-group}%.owner" from file "groups/groups-list.yml" set {_points} to yaml value "%{_player-has-group}%.points" from file "groups/groups-list.yml" set {_points} to {_points} parsed as number set yaml value "%{_player-has-group}%.points" from file "groups/groups-list.yml" to "%{_points} + 1%" set {_owner} to {_owner} parsed as player send "&5&lCave&f&lBlock &9» &7Gracz &3%{_p}% &7wpłacił ostateczną stawkę! &7Ustawiono nową stawkę: &e%{_maksymalna-ilosc}%&7. Powodzenia!" to {_owner} stop send "&4&lBLAD: &7Nie posiadasz: &6%{_n}%x %{_i}%" to {_p} stop if {_t} is "money": if {_p}'s balance is greater than {_n}: send "&5&lCave&f&lBlock &9» &7Wplaciles &a%{_n}%&2$&7 do banku grupy!" to {_p} remove {_n} from {_p}'s balance set yaml value "%{_player-has-group}%.%{_t}%" from file "groups/groups-bank.yml" to "%{_dodaj}%" function BankSelect(p: player): set {_chat} to yaml value "chat-write-bank" from file "zmienne/%{_p}'s uuid%.yml" if {_chat} is not set: set yaml value "chat-write-bank" from file "zmienne/%{_p}'s uuid%.yml" to "true" send "&6» &7Wpisz na czacie nazwę gracza, któremu chcesz wypłacić gotówkę! Wpisz &6''anuluj''&7, aby anulować" to {_p} wait 15 second set {_chatt} to yaml value "chat-write-bank" from file "zmienne/%{_p}'s uuid%.yml" if {_chatt} is set: send "&6» &7Anulowano..." to {_p} delete yaml value "chat-write-bank" from file "zmienne/%{_p}'s uuid%.yml" stop send "&4&lBLAD: &7Wybierz gracza!" to {_p} on inventory click: if "%inventory name of player's current inventory%" contains "&9» &0Wplata": cancel event set {_pay} to yaml value "group-bank-pay" from file "zmienne/%player's uuid%.yml" set {_pay} to {_pay} parsed as number set {_metadata-item} to slot 4 of player's current inventory set {_text} to "cobble" if {_metadata-item} is empty map: set {_text} to "money" if clicked item is red dye or green dye: set {_unname} to uncoloured name of clicked item if {_unname} contains "-": replace all "-" with "" in {_unname} set {_unname} to {_unname} parsed as number set yaml value "group-bank-pay" from file "zmienne/%player's uuid%.yml" to "1" if {_pay} - {_unname} is greater than or equal to 1: set yaml value "group-bank-pay" from file "zmienne/%player's uuid%.yml" to "%{_pay} - {_unname}%" if {_unname} contains "+": replace all "+" with "" in {_unname} set {_unname} to {_unname} parsed as number if {_metadata-item} is cobblestone: if {_pay} + {_unname} is smaller than or equal to number of cobblestone in player's inventory: set yaml value "group-bank-pay" from file "zmienne/%player's uuid%.yml" to "%{_pay} + {_unname}%" else: set yaml value "group-bank-pay" from file "zmienne/%player's uuid%.yml" to "%number of cobblestone in player's inventory%" else if {_metadata-item} is empty map: if {_pay} + {_unname} is smaller than or equal to player's balance: set yaml value "group-bank-pay" from file "zmienne/%player's uuid%.yml" to "%{_pay} + {_unname}%" else: set yaml value "group-bank-pay" from file "zmienne/%player's uuid%.yml" to "%player's balance%" set {_pays} to yaml value "group-bank-pay" from file "zmienne/%player's uuid%.yml" set slot 4 of player's current inventory to 1 of {_metadata-item} named "&9» &7Wplata: &e%{_text}%" with lore "&3» &7Ilosc do wplacenia: &3%{_pays}%" if clicked slot is 4: set {_metadata-value} to yaml value "group-bank-pay" from file "zmienne/%player's uuid%.yml" set {_metadata-value} to {_metadata-value} parsed as number BankPay(player, {_text}, {_metadata-item}, {_metadata-value}) on inventory close: if "%inventory name of player's current inventory%" contains "&9» &0Wplata": delete yaml value "group-bank-pay" from file "zmienne/%player's uuid%.yml" on command: if command is "homu:groups" or "grupy" or "group" or "groups" or "grupa" or "ugrupowania" or "ugrupowanie" or "firmy" or "partys" or "gildia" or "klan" or "klany" or "gildie" or "plemie" or "party" or "team" or "teams" or "gildia": if arguments contains "bank" or "banks" or "cobble" or "money" or "monety" or "bruk" or "cobblestone": set {_player-has-group} to yaml value "player-group" from file "zmienne/%player's uuid%.yml" if {_player-has-group} is set: open chest with 3 rows named "&9» &0Bank (&3%{_player-has-group}%&0)" to player wait 2 ticks if "%inventory name of player's current inventory%" contains "&9» &0Bank (&3%{_player-has-group}%&0)": loop 3*9 times: format slot loop-number - 1 of player with 1 of gray stained glass pane to be unstealable format slot 11 of player with 1 of cobblestone named "&3» &7Bank Cobblestone" with lore "&9» &7Kliknij, aby wejść do banku||&7 grupy." to run [BankGUI(player, "cobble", Cobblestone)] format slot 15 of player with 1 of empty map named "&3» &aBank Monet" with lore "&9» &7Kliknij, aby wejść do banku||&7 grupy.||||&4&lUWAGA: &7Funkcja w trakcie aktualizacji" to run [BankGUI(player, "money", empty map)]