# ____ _ ____ _ _ _____ _ # / ___| | | __ / ___| | |_ __ _ | |_ |_ _| _ __ __ _ | | __ # \___ \ | |/ / \___ \ | __| / _` | | __| | | | '__| / _` | | |/ / # ___) | | < ___) | | |_ | (_| | | |_ | | | | | (_| | | < # |____/ |_|\_\ |____/ \__| \__,_| \__| |_| |_| \__,_| |_|\_\ options: prefix : &8[&2StatTrak&8] &e» currentversion : 1.0 on load: set {_check_version} to text from url "https://pastebin.com/raw/VFfJS779" set {_check_version} to {_check_version} parsed as number if {_check_version} is bigger than {@currentversion}: send "&4&n*&6================== &9StatTrak &6=================&4&n*" to console send "" to console send "{@prefix} &7Wykryto nowa wersie &dSkStatTrak&7, aby zaktualizowac wpisz &d/stattrak update" to console send "" to console send "&4&n*&6================== &9StatTrak &6=================&4&n*" to console loop all players: if loop-player is op: send "&4&n*&6================== &9StatTrak &6=================&4&n*" to loop-player send "" to loop-player send "{@prefix} &7Wykryto nowa wersie &dSkStatTrak&7, aby zaktualizowac wpisz &d/stattrak update" to loop-player send "" to loop-player send "&4&n*&6================== &9StatTrak &6=================&4&n*" to loop-player else: send "{@prefix} &7Twoja wersja &dSkStatTrak&7 jest aktualna" to console loop all players: if loop-player is op: send "{@prefix} &7Twoja wersja &dSkStatTrak&7 jest aktualna" to loop-player command /stattrak [] []: permission: stats.admin permission message: {@prefix} &7Nie masz dostepu do tej komendy kolego &e>> &dstats.admin trigger: if arg 1 is set: if arg 1 is "give": if arg 2 is set: if arg 2 is online: add 1 chest named "&5✯&6StatTrak&5✯" to player send "{@prefix} &7Otrzymales skrzynie &5✯&6StatTrak&5✯" to arg 2 send "{@prefix} &7Gracz &d%arg 2% &7otrzymal skrzynie &5✯&6StatTrak&5✯" else: send "{@prefix} &7Gracz &d%arg 2% &7nie jest &aOnline&7." else: send "{@prefix} &7Poprawne uzycie tej komendy to &d/stattrack give gracz" if arg 1 is "update": set {_check_version} to text from url "https://pastebin.com/raw/VFfJS779" set {_check_version} to {_check_version} parsed as number if {_check_version} is bigger than {@currentversion}: send "{@prefix} &7Rozpoczynam pobieranie..." download from "https://pastebin.com/raw/ejjaZkdC" to "plugins/Skript/scripts/SkStatTrak.sk" send "{@prefix} &7Pobieranie zakonczone..." execute console command "sk reload SkStatTrak" else: send "{@prefix} &7Twoja werisja &dSkStatTrak &7jest aktualna." if arg 1 is "reload": send "{@prefix} &7Trwa przeladownie skryptu..." execute console command "sk reload SkStatTrak" send "{@prefix} &7Skrypt zostal przeladowane." else: send "{@prefix} &7Poprawne uzycie tej komendy to &d/stattrack [give,update] [gracz*] *Opjonalnie" on rightclick: if player's tool is chest named "&5✯&6StatTrak&5✯": cancel event open chest with 1 row named "&5✯&6StatTrak&5✯" to player loop 9 times: set player's current inventory's slot (loop-value -1) to black stained glass pane named " " set player's current inventory's slot 3 to skull of player named "&4☠ &f&lLicznik Graczy &4☠" with lore "&f» &6Licznik zabojstw graczy." set player's current inventory's slot 5 to skeleton head named "&2★ &f&lLicznik Mobow &2★" with lore "&f» &6Licznik zabojstw mobow." set player's current inventory's slot 0 to pickaxe named "&1❂ &f&lLicznik Blokow &1❂" with lore "&f» &6Licznik Wykopanych blkoc." set player's current inventory's slot 8 to barrier named "&4Wyjdz" on inventory click: if inventory name of player's current inventory is "&5✯&6StatTrak&5✯": cancel event if clicked slot is 3: open chest with 2 row named "&4☠ &f&lLicznik Graczy &4☠" to player wait 5 ticks loop all items in player's inventory: if loop-item is sword or bow: if lore of loop-value doesn't contain "&9✯&6StatTrak&9✯" or "&5✯&6StatTrak&5✯": wait 2 ticks add loop-item to current inventory of player if clicked slot is 5: open chest with 2 row named "&2★ &f&lLicznik Mobow &2★" to player loop all items in player's inventory: if loop-item is sword or bow: if lore of loop-value doesn't contain "&9✯&6StatTrak&9✯" or "&5✯&6StatTrak&5✯": wait 2 ticks add loop-item to current inventory of player if clicked slot is 0: open chest with 2 row named "&1❂ &f&lLicznik Blokow &1❂" to player loop all items in player's inventory: if loop-item is pickaxe or shovel or axe: if lore of loop-value doesn't contain "&1❂ &6StatTrak &1❂": wait 2 ticks add loop-item to current inventory of player if clicked slot is 8: close inventory of player else if inventory name of player's current inventory is "&4☠ &f&lLicznik Graczy &4☠": cancel event if clicked item is sword or bow: set {_item} to clicked item remove {_item} from player's inventory set 5th line of lore of {_item} to "&9✯&6StatTrak&9✯ &4Licznik Graczy: &20" add {_item} to player's inventory send "{@prefix} &aPrzedmiot &d%{_item}% &aotrzymal zestaw &9✯&6StatTrak&9✯" close player's inventory remove 1 chest named "&5✯&6StatTrak&5✯" from player's inventory else if inventory name of player's current inventory is "&2★ &f&lLicznik Mobow &2★": cancel event if clicked item is sword or bow: set {_item} to clicked item remove {_item} from player's inventory set 5th line of lore of {_item} to "&5✯&6StatTrak&5✯ &2Licznik Mobow: &40" add {_item} to player's inventory send "{@prefix} &aPrzedmiot &d%{_item}% &aotrzymal zestaw &5✯&6StatTrak&5✯" close player's inventory remove 1 chest named "&5✯&6StatTrak&5✯" from player's inventory else if inventory name of player's current inventory is "&1❂ &f&lLicznik Blokow &1❂": cancel event if clicked item is pickaxe or shovel or axe: set {_item} to clicked item remove {_item} from player's inventory set 5th line of lore of {_item} to "&1❂ &6StatTrak &1❂ &3Ilosc blokow: &c0" add {_item} to player's inventory send "{@prefix} &aPrzedmiot &d%{_item}% &aotrzymal zestaw &1❂ &6StatTrak &1❂" close player's inventory remove 1 chest named "&5✯&6StatTrak&5✯" from player's inventory on death: if attacker is a player: if victim is a player: set {_lore} to "%lore of attacker's tool%" if "%{_lore}%" contain "&9✯&6StatTrak&9✯": set {_stat} to 5th line of lore of attacker's tool replace all "&5✯&6StatTrak&5✯ &4Licznik Graczy: &2" with "" in {_stat} set {_stat} to {_stat} parsed as number add 1 to {_stat} set 5th line of lore of attacker's tool to "&5✯&6StatTrak&5✯ &4Licznik Graczy: &2%{_stat}%" stop else if victim is not a player: set {_lore} to "%lore of attacker's tool%" if "%{_lore}%" contain "&5✯&6StatTrak&5✯": set {_stat} to 5th line of lore of attacker's tool replace all "&5✯&6StatTrak&5✯ &2Licznik Mobow: &4" with "" in {_stat} set {_stat} to {_stat} parsed as number add 1 to {_stat} set 5th line of lore of attacker's tool to "&5✯&6StatTrak&5✯ &2Licznik Mobow: &4%{_stat}%" stop on break: set {_lore} to "%lore of player's tool%" if "%{_lore}%" contain "&1❂ &6StatTrak &1❂": set {_stat} to 5th line of lore of player's tool replace all "&1❂ &6StatTrak &1❂ &3Ilosc blokow: &c" with "" in {_stat} set {_stat} to {_stat} parsed as number add 1 to {_stat} set 5th line of lore of player's tool to "&1❂ &6StatTrak &1❂ &3Ilosc blokow: &c%{_stat}%" stop