SHARE
TWEET

lb

a guest Apr 25th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3.  
  4. #This is currently linked to a custom economy system I made so you just need to change where it says coins to whatever your var is
  5.  
  6.  
  7. command /cointest:
  8.     trigger:
  9.         loop {coins::*}:
  10.             add 1 to {_size}
  11.             if {_low.to.high.list::%loop-value%} is not set:
  12.                 set {_low.to.high.list::%loop-value%} to loop-index
  13.             else:
  14.                 set {_n} to 0
  15.                 loop {_size} times:
  16.                     set {_n} to {_n}+1
  17.                     {_low.to.high.list::%loop-value-1%.%{_n}%} is not set
  18.                     set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
  19.                     stop loop
  20.         wait 1 tick
  21.         set {_n} to size of {_low.to.high.list::*}
  22.         loop {_low.to.high.list::*}:
  23.             set {_high.to.low.list::%{_n}%} to loop-value
  24.             set {_n} to {_n}-1
  25.         wait 1 tick
  26.         set {_i} to 0
  27. #THIS IS THE MESSAGE WITH TOP KILLS
  28.         open virtual chest inventory with size 6 named "&6&lLeaderboards" to player
  29.         loop {_high.to.low.list::*}:
  30.             add 1 to {_topnumber}
  31.             set {_player} to "%loop-value%" parsed as offlineplayer
  32.             replace all "000" in {coins::%loop-value%} with "K"
  33.             if {_topnumber} is 1:
  34.                 format gui slot 13 of player with skull of ("%{_player}%" parsed as offline player) named "&6&l%{_topnumber}% &b%{_player}%" with lore "&f%regex({coins::%loop-value%})% &eCoins"
  35.             if {_topnumber} is 2:
  36.                 format gui slot 21 of player with skull of ("%{_player}%" parsed as offline player) named "&6&l%{_topnumber}% &b%{_player}%" with lore "&f%regex({coins::%loop-value%})% &eCoins"
  37.             if {_topnumber} is 3:
  38.                 format gui slot 23 of player with skull of ("%{_player}%" parsed as offline player) named "&6&l%{_topnumber}% &b%{_player}%" with lore "&f%regex({coins::%loop-value%})% &eCoins"
  39.             if {_topnumber} is 4:
  40.                 format gui slot 29 of player with skull of ("%{_player}%" parsed as offline player) named "&6&l%{_topnumber}% &b%{_player}%" with lore "&f%regex({coins::%loop-value%})% &eCoins"
  41.             if {_topnumber} is 5:
  42.                 format gui slot 31 of player with skull of ("%{_player}%" parsed as offline player) named "&6&l%{_topnumber}% &b%{_player}%" with lore "&f%regex({coins::%loop-value%})% &eCoins"
  43.             if {_topnumber} is 6:
  44.                 format gui slot 33 of player with skull of ("%{_player}%" parsed as offline player) named "&6&l%{_topnumber}% &b%{_player}%" with lore "&f%regex({coins::%loop-value%})% &eCoins"
  45.             if {_topnumber} is 7:
  46.                 format gui slot 37 of player with skull of ("%{_player}%" parsed as offline player) named "&6&l%{_topnumber}% &b%{_player}%" with lore "&f%regex({coins::%loop-value%})% &eCoins"
  47.             if {_topnumber} is 8:
  48.                 format gui slot 39 of player with skull of ("%{_player}%" parsed as offline player) named "&6&l%{_topnumber}% &b%{_player}%" with lore "&f%regex({coins::%loop-value%})% &eCoins"
  49.             if {_topnumber} is 9:
  50.                 format gui slot 41 of player with skull of ("%{_player}%" parsed as offline player) named "&6&l%{_topnumber}% &b%{_player}%" with lore "&f%regex({coins::%loop-value%})% &eCoins"
  51.             if {_topnumber} is 10:
  52.                 format gui slot 43 of player with skull of ("%{_player}%" parsed as offline player) named "&6&l%{_topnumber}% &b%{_player}%" with lore "&f%regex({coins::%loop-value%})% &eCoins"
  53.             add 1 to {_i}
  54.             if {_topnumber} > 9: #this is top 10 you can change it
  55.                 stop
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62. function regex(n: object) :: text:
  63.     if "%{_n}%" contains ".":
  64.         set {_s::*} to split "%{_n}%" at "."
  65.         set {_n} to "%a({_s::1})%.%last 2 characters of {_s::2}%"
  66.         return "%{_n}%"
  67.     else:
  68.         set {_n} to a("%{_n}%")
  69.         return "%{_n} ? 0%"
  70. function a(b: text) :: text:
  71.     if length of {_b} > 3:
  72.         return "%a(first length of {_b} - 3 characters of {_b})%,%last 3 characters of {_b}%"
  73.     return {_b}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top