variables: {tp.Liczba} = 1 command /teleport [] []: aliases: tp trigger: arg 1 is "ustaw": player has permission "teleport.admin": arg 2 is not set: set {tp.%{tp.Liczba}%} to location of player set yaml value "nazwa_%{tp.Liczba}%" from file "plugins/Skript/Teleporty.yml" to "Zmień moją treść w configu" set yaml value "lore_%{tp.Liczba}%" from file "plugins/Skript/Teleporty.yml" to "plugins/Skript/Teleporty.yml" send "Ustawiono teleport nr. %{tp.Liczba}%" add 1 to {tp.Liczba} arg 2 is set: arg 2 < {tp.Liczba}: arg 2 > 0: set {tp.%arg 2%} to location of player send "Zmieniono teleport nr. %arg 2%" else: send "Nie możesz użyc liczby mniejszej od zera!" else: send "Nie możesz zmieniać nieistniejących teleportów! Ustawiaj je komendą /tp ustaw" arg 1 is "usun": player has permission "teleport.admin": arg 2 is set: {tp.%arg 2%} is set: delete {tp.%arg 2%} send "Usunięto teleport nr. %arg 2%" else: send "Nie ma takiego teleportu!" else: send "Podaj numer teleportu do usunięcia" arg 1 is "uzyj": arg 2 is set: {tp.%arg 2%} is set: teleport player to {tp.%arg 2%} set {_} to yaml value "nazwa_%arg 2%" from file "plugins/Skript/Teleporty.yml" send "&7Przeniesiono na %{_}%" else: send "Nie ma takiego teleportu!" else: execute player command "/teleport" arg 1 is not set: open chest with 5 rows named "Teleporty" to player wait 2 ticks format slot 0 of player with 1 barrier named "Kliknij aby zamknąć menu." to close loop {tp.Liczba} times: {tp.%loop-number%} is set: set {_} to yaml value "nazwa_%loop-number%" from file "plugins/Skript/Teleporty.yml" set {_l} to yaml value "lore_%loop-number%" from file "plugins/Skript/Teleporty.yml" set player's current inventory's slot loop-number to paper named "%coloured {_}%" with lore "%coloured {_l}%" else: loop-number is not {tp.Liczba}: format slot loop-number of player with 1 redstone dust named "&cTeleport nr. &4%loop-number% &c[nieustawiony]" to be unstealable on inventory click: if inventory name of current inventory of player is "Teleporty": clicked slot < {tp.Liczba}: execute player command "teleport uzyj %clicked slot%" #Created by LuckyPotato