options: odlamek: prismarine shard #FUNKCJA GUI function tryUpgradePerk(p: player, slot: integer, perkName: text): set {_maxLevel} to 4 set {_cost} to 150 if {perk::%{_p}%::%{_perkName}%} is not set: set {perk::%{_p}%::%{_perkName}%} to 0 set {_lvl} to {perk::%{_p}%::%{_perkName}%} if {_lvl} >= {_maxLevel}: send "&cMasz już maksymalny poziom perku &b%{_perkName}%&c!" to {_p} stop set {_odlamki} to amount of {@odlamek} in inventory of {_p} if {_odlamki} < {_cost}: send "&cNie masz wystarczająco odłamków! &7[Masz: %{_odlamki}%, potrzebne: %{_cost}%]" to {_p} stop remove {_cost} of {@odlamek} from inventory of {_p} add 1 to {perk::%{_p}%::%{_perkName}%} send "&aUlepszono perk &b%{_perkName}% &ana poziom &f%{perk::%{_p}%::%{_perkName}%}%" to {_p} if {_perkName} is "szybkosc": updateSpeed({_p}) if {_perkName} is "serca": set {_health} to {perk::%{_p}%::serca} / 2 set max health of {_p} to 10 + {_health} close inventory for {_p} wait 2 ticks execute command "perki" by {_p} on inventory click: if name of event-inventory is "&7Perki": cancel event set {_slot} to clicked slot set {_player} to player if {_slot} is 19: tryUpgradePerk({_player}, {_slot}, "ochrona") else if {_slot} is 21: tryUpgradePerk({_player}, {_slot}, "serca") else if {_slot} is 23: tryUpgradePerk({_player}, {_slot}, "sila") else if {_slot} is 25: tryUpgradePerk({_player}, {_slot}, "szybkosc") else if {_slot} is 29: tryUpgradePerk({_player}, {_slot}, "wampiryzm") else if {_slot} is 33: tryUpgradePerk({_player}, {_slot}, "otrucie") else if {_slot} is 39: tryUpgradePerk({_player}, {_slot}, "afk") else if {_slot} is 41: tryUpgradePerk({_player}, {_slot}, "szczescie") function updateSpeed(p: player): if {perk::%{_p}%::szybkosc} is set: set {_lvl} to {perk::%{_p}%::szybkosc} set {_baseSpeed} to 0.2 set {_newSpeed} to {_baseSpeed} + ({_lvl} * 0.01 * 5) # czyli co poziom +5% set walk speed of {_p} to {_newSpeed} else: set walk speed of {_p} to 0.2 #komendy command /perki []: trigger: set {_perki} to chest inventory with 6 rows named "&7Perki" set slot 0, 8, 45, 53 of {_perki} to red stained glass pane named "&7" set slot 1, 7, 9, 17, 36, 44, 46, 52 of {_perki} to yellow stained glass pane named "&7" set slot 2, 6, 18, 26, 27, 35, 47, 51 of {_perki} to white stained glass pane named "&7" set slot 19 of {_perki} to netherite helmet named "&bᴏᴄʜʀᴏɴᴀ" with lore "" and "&8› &fTa umiejętność &bzwiększa%nl%&8› &fochrone przed &b&nobrażeniami" and "" and "&8∙ &cPoziom I &8-> &b-1❤" and "&8∙ &cPoziom II &8-> &b-2❤" and "&8∙ &cPoziom III &8-> &b-3❤" and "&8∙ &cPoziom IV &8-> &b-4❤" and "" and "&aKoszt: 150 czegoś" set slot 21 of {_perki} to red dye named "&csᴇʀᴄᴀ" with lore "" and "&8› &fTa umiejętność &czwiększa%nl%&8› &fliczbe twoich &c&nserc" and "" and "&8∙ &cPoziom I &8-> &c+0.5❤" and "&8∙ &cPoziom II &8-> &c+1❤" and "&8∙ &cPoziom III &8-> &c+1.5❤" and "&8∙ &cPoziom IV &8-> &c+2❤" and "" and "&aKoszt: 150 czegoś" set slot 23 of {_perki} to netherite sword named "&esɪʟᴀ" with lore "" and "&8› &fTa umiejętność &ezwiększa%nl%&8› &fmoc zadawanych &e&nobrażeń" and "" and "&8∙ &cPoziom I &8-> &e+1🗡" and "&8∙ &cPoziom II &8-> &e+2🗡" and "&8∙ &cPoziom III &8-> &e+3🗡" and "&8∙ &cPoziom IV &8-> &e+4🗡" and "" and "&aKoszt: 150 czegoś" set slot 25 of {_perki} to prismarine shard named "&bsᴢʏʙᴋᴏsᴄ" with lore "" and "&8› &fTa umiejętność &bzwiększa%nl%&8› &fszybkość chodzenia &b&npostaci" and "" and "&8∙ &cPoziom I &8-> &b+5%% 👟" and "&8∙ &cPoziom II &8-> &b+10%% 👟" and "&8∙ &cPoziom III &8-> &b+15%% 👟" and "&8∙ &cPoziom IV &8-> &b+20%% 👟" and "" and "&aKoszt: 150 czegoś" set slot 29 of {_perki} to spider eye named "&bᴡᴀᴍᴘɪʀʏᴢᴍ" with lore "" and "&8› &fTa umiejętność &bzwiększa%nl%&8› &fprocent oddawanego &b&nżycia" and "" and "&8∙ &cPoziom I &8-> &b+10%% 🦇" and "&8∙ &cPoziom II &8-> &b+20%% 🦇" and "&8∙ &cPoziom III &8-> &b+30%% 🦇" and "&8∙ &cPoziom IV &8-> &b+40%% 🦇" and "" and "&aKoszt: 150 czegoś" set slot 33 of {_perki} to poisonous potato named "&aOᴛʀᴜᴄɪᴇ" with lore "" and "&8› &fTa umiejętność &azwiększa%nl%&8› &fszanse na otrucie &a&nprzeciwnika" and "" and "&8∙ &cPoziom I &8-> &a+1%% 🧴" and "&8∙ &cPoziom II &8-> &a+2%% 🧴" and "&8∙ &cPoziom III &8-> &a+3%% 🧴" and "&8∙ &cPoziom IV &8-> &a+4%% 🧴" and "" and "&aKoszt: 150 czegoś" set slot 39 of {_perki} to clock named "&dᴀғᴋ" with lore "" and "&8› &fTa umiejętność &dzwiększa%nl%&8› &fdrop ze strefy &d&nAFK" and "" and "&8∙ &cPoziom I &8-> &d+5%% ⌚" and "&8∙ &cPoziom II &8-> &d+10%% ⌚" and "&8∙ &cPoziom III &8-> &d+15%% ⌚" and "&8∙ &cPoziom IV &8-> &d+20%% ⌚" and "" and "&aKoszt: 150 czegoś" set slot 41 of {_perki} to diamond pickaxe named "&asᴢᴄᴢᴇsᴄɪᴇ" with lore "" and "&8› &fTa umiejętność &azwiększa%nl%&8› &ffortunę przy kopaniu &a&nsurowców" and "" and "&8∙ &cPoziom I &8-> &ax1.5🍀" and "&8∙ &cPoziom II &8-> &ax2.0🍀" and "&8∙ &cPoziom III &8-> &ax2.5🍀" and "&8∙ &cPoziom IV &8-> &ax3.0🍀" and "" and "&aKoszt: 150 czegoś" open {_perki} to player command /test [] []: trigger: if arg 1 is "ochrona" or "serca" or "sila" or "szybkosc" or "wampiryzm" or "otrucie" or "afk" or "szczescie": add arg 2 to {perk::%player%::%arg 1%} #nadanie perków i boss bara on join: loop {perk::%player%::*}: if loop-index is set: set {_%loop-index%} to loop-value add "ochrona", "serca", "sila", "szybkosc", "wampiryzm", "otrucie", "afk", "szczescie" to {_perki::*} loop {_perki::*}: if {perk::%player%::%loop-value%} is not set: set {_%loop-value%} to 0 set {_title} to "&b🛡: %{_ochrona}% &c❤: %{_serca}% &e🗡: %{_sila}% &b👟: %{_szybkosc}% &5🦇: %{_wampiryzm}% &a🧴: %{_otrucie}% &d⌚: %{_afk}% &2🍀: %{_szczescie}%" set {_bar} to boss bar with id "perk_%player%" if {_bar} is not set: set {_bar} to new boss bar with id "perk_%player%" with title {_title} with progress 100 add player to {_bar} else: set bar progress of {_bar} to 100 set bar title of {_bar} to {_title} if {perk::%player%::serca} is set: set {_health} to {perk::%player%::serca} / 2 set max health of player to 10 + {_health} #funkcjonalność perków on damage: if attacker is player: # Sila if {perk::%attacker%::sila} is set: set {_bonus} to {perk::%attacker%::sila} add {_bonus} to damage # Wampiryzm if {perk::%attacker%::wampiryzm} is set: set {_life_steal_percent} to {perk::%attacker%::wampiryzm} * 10 set {_heal_amount} to damage * {_life_steal_percent} / 100 heal attacker by {_heal_amount} # Otrucie if {perk::%attacker%::otrucie} is set: set {_otrucie_chance} to {perk::%attacker%::otrucie} chance of {_otrucie_chance}%: apply poison 0 to victim for 10 seconds if victim is player: # Ochrona if {perk::%victim%::ochrona} is set: set {_reduct} to {perk::%victim%::ochrona} if damage > {_reduct}: subtract {_reduct} from damage else: set damage to 0 on respawn: wait 1 tick updateSpeed(player) if {perk::%player%::serca} is set: set {_health} to {perk::%player%::serca} / 2 set max health of player to 10 + {_health} set health of player to max health of player