every 10 second:
set {top:kills::*} to createTop("kills", 10, {players::*}, "&6[PLAYER] &8» &e[VALUE]")
set {top:deaths::*} to createTop("deaths", 10, {players::*}, "&6[PLAYER] &8» &e[VALUE]")
function setKills(p: player):
wipe {_p}'s sidebar
set name of sidebar of {_p} to " &8» &6Topka Killi &8« "
loop {top:kills::*}:
set score loop-value in sidebar of {_p} to (loop-index parsed as integer) * -1
function setDeaths(p: player):
wipe {_p}'s sidebar
set name of sidebar of {_p} to " &8» &6Topka Dedow &8« "
loop {top:deaths::*}:
set score loop-value in sidebar of {_p} to (loop-index parsed as integer) * -1
on join:
remove player from {players::*}
add player to {players::*}
while {sb::%player%} is not false:
if player is not online:
stop
setKills(player)
wait 10 second
setDeaths(player)
wait 10 second
command /sb [<text>]:
trigger:
if {sb::%player%} is not false:
set {sb::%player%} to false
wipe player's sidebar
send "&cWylaczono!"
else:
set {sb::%player%} to true
send "&aWlaczono!"
while {sb::%player%} is not false:
if player is not online:
stop
setKills(player)
wait 10 second
setDeaths(player)
wait 10 second
on quit:
wipe player's sidebar
on death of player:
add 1 to {deaths::%victim%}
if attacker is player:
add 1 to {kills::%attacker%}
wymagane https://skript.pl/temat/36238-pyratop-reborn-skrypt-na-tworzenie-topki-wydanie-trzecie/