# © SkryptExpert 2025 # Zezwalam na modyfikowanie skryptu **tylko do użytku własnego**. # Zakazuję dalszego udostępniania, publikowania lub sprzedaży zmodyfikowanej wersji bez mojej zgody. local function daily(p: player): set {_daily} to chest inventory with 3 rows named "&2Daily" loop 27 times: if {daily_%{_p}%::%loop-value%} is set: set slot (loop-value - 1) of {_daily} to enchanted book named "&2Dzień %loop-value%" with lore "&aJuż odebrałeś tą nagrodę!" else: set {_item} to {daily::%loop-value%} set {_name} to name of {_item} set {_amount} to amount of {_item} if {_name} is not set: set {_name} to type of {_item} set slot (loop-value - 1) of {_daily} to book named "&2Dzień %loop-value%" with lore "&aNagroda: &6%{_amount}% &8x %{_name}%" open {_daily} to {_p} command /daily []: trigger: if arg 1 is not set: daily(player) if arg 1 is set: if arg 1 is not "debug": if player has permission "admin.perm": set {_arg1} to arg 1 parsed as integer if {_arg1} > 0: if {_arg1} < 28: set {_item} to player's tool set amount of {_item} to amount of player's tool set {daily::%{_arg1}%} to {_item} send "Ustawiłeś daily %{_arg1}% na %player's tool%" send "&7Jeśli item ma &człą nazwę&7 w &2/daily &7użyj &c/rename [nazwa] &7i ponownie wstaw item" else: send "&cMax dni daily: 27" else: send "&cMinimum dni daily: 1" else: if player has permission "admin.perm": delete {daily_%player%::*} delete {cooldowndaily::%player%} on inventory click: if event-inventory is not player's inventory: if name of event-inventory contains "Daily": cancel event if clicked slot is book or enchanted book: set {_d} to index of event-slot + 1 if {daily_%player%::%{_d}%} is not set: if {_d} is not 1: send {_d} to player if {daily_%player%::%{_d} - 1%} is set: if difference between now and {cooldowndaily::%player%} >= 24 hours: give player {daily::%{_d}%} set {daily_%player%::%{_d}%} to true send "&a%player% odebrał nagrodę za dzień %{_d}%!" close player's inventory set {cooldowndaily::%player%} to now stop else: set {_cooldown} to "%24 hours - difference between now and {cooldowndaily::%player%}%" set {_format} to lowercase {_cooldown} replace all "hours" and "hour" in {_format} with "h " replace all "minutes" and "minute" in {_format} with "m " replace all "seconds" and "second" in {_format} with "s " replace all " " in {_format} with "" replace all "and" in {_format} with " " send "&7Odczekaj %{_format}%" else: send "&cNie odebrałeś nagrody za dzień poprzedni" stop else: give player {daily::%{_d}%} set {daily_%player%::%{_d}%} to true send "&a%player% odebrał nagrodę za dzień %{_d}%!" close player's inventory set {cooldowndaily::%player%} to now stop else: send "&cJuż odebrałeś nagrodę za ten dzień!" stop every 1 hour: loop {cooldowndaily::*}: if difference between now and {cooldowndaily::%loop-index%} >= 48 hours: delete {daily_%loop-index%::*} stop