Advertisement
Guest User

Untitled

a guest
Apr 21st, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.93 KB | None | 0 0
  1. variables:
  2.     {kills::%player%} = 0
  3.     {Deaths::%player%} 0
  4.  
  5. On death of a player:
  6.     if attacker is a player:
  7.         set the death message to "{@pr} &e%victim%&7 was slain by &e%attacker%&7"
  8.         wait 1 tick
  9.         make console execute command "/lagg clear"
  10.         if {Killtop::%attacker%} is not set:
  11.             set {kills::%attacker%} to 0   
  12.         Sidebar(attacker)
  13.         Sidebar(victim)
  14.         add 1 to {Kills::%attacker%}
  15.         add 1 to {Deaths::%victim%}
  16.         stop
  17.     else:
  18.         add 1 to {Deaths::%victim%}
  19.         broadcast "{@pr} &e%victim% &7died.."
  20.         Sidebar(victim)
  21.  
  22.  
  23. on join:
  24.     Sidebar(player)
  25. on join:
  26.     Sidebar(player)
  27.  
  28. command /leaderboard:
  29.     trigger:
  30.         loop {Killtop::*}:
  31.             add 1 to {_size}
  32.             if {_low.to.high.list::%loop-value%} is not set:
  33.                 set {_low.to.high.list::%loop-value%} to loop-index
  34.             else:
  35.                 set {_n} to 0
  36.                 loop {_size} times:
  37.                     set {_n} to {_n}+1
  38.                     {_low.to.high.list::%loop-value-1%.%{_n}%} is not set
  39.                     set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
  40.                     stop loop
  41.         wait 1 tick
  42.         set {_n} to size of {_low.to.high.list::*}
  43.         loop {_low.to.high.list::*}:
  44.             set {_high.to.low.list::%{_n}%} to loop-value
  45.             set {_n} to {_n}-1
  46.         wait 1 tick
  47.         send ""
  48.         message centered "&c&lTop Kills" to player
  49.         send ""
  50.         loop {_high.to.low.list::*}:
  51.             add 1 to {_result}
  52.             send "&8(&f##%{_result}%&8) &a%loop-value%&8: &e%{Kills::%loop-value%}% Kills" to player
  53.             send ""
  54.             if {_result} is 10:
  55.                 stop
  56.  
  57. function Sidebar(p: player):
  58.     wipe {_p}'s sidebar
  59.     set name of sidebar of {_p} to "&4&oYour Statistics"
  60.     set score "&7&m-------------------------" in sidebar of {_p} to 8
  61.     set score "&f&f" in sidebar of {_p} to 7
  62.     set score "&cKills: &f%{Kills::%{_p}%}%" in sidebar of {_p} to 6
  63.     set score "&cDeaths: &f%{Deaths::%{_p}%}%" in sidebar of {_p} to 5
  64.     set score "&f" in sidebar of {_p} to 4
  65.     set score "&7&oZoraPvP.minehut.gg" in sidebar of {_p} to 3
  66.     set score "&7&m-------------------------&r" in sidebar of {_p} to 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement