Advertisement
Guest User

Untitled

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