options: prefix: &a&l[&e&lLuckyBlocks&a&l] &6» error-prefix: &a&l[&cError&a&l] &6» Name-Gui: &9&lLUCKYBLOCK GUI Gui-Glass: black stained glass pane block-name: &e&klll&r &e&lLuckyBlock &klll drop: iron ingot, gold ingot, emerald, obsidian, diamond chestplate, diamond block, obsidian, water bucket and cobblestone droprate: 4 #Im Większa Liczba tym Mniej Itemow kod-cooldown: 15 #Czas W minutach wielkosc-kodu: 1000000 and 99999999 function LuckyBlockGui() :: inventory: set {_LuckyBlockGui} to chest inventory named "{@Name-Gui}" set slot (integers between 0 and 26) of {_LuckyBlockGui} to {@Gui-Glass} set slot 26 of {_LuckyBlockGui} to paper named "&a&lLISTA KOMEND" with lore "&e/lb ", and "&e/lb " set slot 4 of {_LuckyBlockGui} to player head named "&a&lSkript LuckyBlock Author - !Pation" with lore "&e&lReloaded By Pimpek" set slot 22 of {_LuckyBlockGui} to sponge of looting 10 named "&a&lLuckyBlocki Dla Calego Serwera!" return {_LuckyBlockGui} function CheckNewVersion(p: player) :: text: if text from "https://pastebin.com/raw/5xD7FB6u" is not "1.0": wait 10 ticks play sound "block.anvil.place" to {_p} if {_p} have permission "luckyblock.access" or "luckyblock.*": send "&f==============================================" to {_p} send "&a&lLuckyBlock Have New Version! Download From: https://pastebin.com/raw/7rcLmF6p" to {_p} send "&f==============================================" to {_p} command /luckyblock [] [] []: permission: luckyblock.access permission message: &cSorry but you don't have permission &4luckyblock.access aliases: lb trigger: if arg-1 is "give": if arg-2 is set: send subtitle "&a&lOtrzymales &2&l%arg-3% &a&lLuckyBlockow Od &e&l%player%" to arg-2 for 1 seconds play sound "entity.player.levelup" to arg-2 if player doesn't have enough space for 1 of sponge of unbreaking 10 named "{@block-name}": loop arg-3 times: drop sponge of unbreaking 10 named "{@block-name}" at arg-2 stop give arg-2 arg-3 of sponge of unbreaking 10 named "{@block-name}" else: send "{@error-prefix} /luckyblock " stop if arg-1 is "remove": if arg-2 is set: remove arg-3 of sponge of unbreaking 10 named "{@block-name}" from arg-2 play sound "item.bottle.fill_dragonbreath" to arg-2 send subtitle "&a&l%player% &c&lOdebral ci &c&l%arg-3% &e&lLuckyBlockow" to arg-2 for 1 seconds else: send "{@error-prefix} /luckyblock " stop open LuckyBlockGui() to player on script load: set {LuckyBlock.Drop::*} to {@drop} on inventory click: current inventory is not player's inventory if name of event-inventory is "{@Name-Gui}": cancel event if clicked slot is 22: close player's inventory set {LuckyBlock::Chat::%player%} to true send "{@prefix} Podaj Ilosc LuckyBlockow Na Czacie!" on chat: if {LuckyBlock::Chat::%player%} is set: cancel event clear {LuckyBlock::Chat::%player%} set {_i} to message parsed as integer loop all players: play sound "entity.player.levelup" to loop-player send subtitle "&a&lOtrzymales &2&l%{_i}% &a&lLuckyBlockow Od &e&l%player%" to loop-player for 2 seconds if loop-player doesn't have enough space for 1 of sponge of unbreaking 10 named "{@block-name}": loop {_i} times: drop sponge of unbreaking 10 named "{@block-name}" at loop-player stop give loop-player {_i} of sponge of unbreaking 10 named "{@block-name}" on join: CheckNewVersion(player) on place: if event-block is sponge of unbreaking 10 named "{@block-name}": set {_i} to size of {LuckyBlock.Drop::*}/{@droprate} set event-block to air loop {_i} times: set {_LDrop::*} to random element of {LuckyBlock.Drop::*} drop {_LDrop::*} every {@kod-cooldown} minutes: delete {LuckyBlock::code} set {LuckyBlock::code} to random integer between {@wielkosc-kodu} send "{@prefix} &a&lPrzepisz Kod: &9&l&n%{LuckyBlock::code}% &a&lAby Otrzymac Jednego LuckyBlocka!" to all players on chat: if message contains "%{LuckyBlock::code}%": cancel event delete {LuckyBlock::code} wait 2 ticks send "{@prefix} &e&l%player% &6&lWygral LuckyBlocka!" to all players if player doesn't have enough space for 1 of sponge of unbreaking 10 named "{@block-name}": drop sponge of unbreaking 10 named "{@block-name}" at player stop give sponge of unbreaking 10 named "{@block-name}" to player