Advertisement
Guest User

Untitled

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