function updateBoard(p: player, prefix: player's prefix):
set {_uuid} to {_p}'s uuid
set line 4 of player's scoreboard to "&4Rank: &f %{_prefix}% "
set line 3 of {_p}'s scoreboard to "&4Name: &f%{_p}%"
set line 2 of {_p}'s scoreboard to "&6Kills: &f%{kills::%{_uuid}%} ? 0%"
set line 1 of {_p}'s scoreboard to "&6Deaths: &f%{deaths::%{_uuid}%} ? 0%"
on join:
set title of player's scoreboard to "&3Skray"
updateBoard(player, player's prefix)
on death of player:
add 1 to {deaths::%victim's uuid%}
if attacker is a player:
add 1 to {kills::%attacker's uuid%}
updateBoard(victim)
updateBoard(attacker)
on disconnect:
clear scoreboard of player
Try that. Not tested so that may not work