Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 5.34 KB | None | 0 0
  1. command /top [<text>]:
  2.     trigger:
  3.         open chest with 3 rows named "&8Select a category" for player
  4.         format a gui slot 12 of player with skull of ("Dirt" parsed as offlineplayer) named " &6&lTop Blocks" lored "||&7Click to view the top players||&7that mined the most blocks on||&7the server.||&7" to run:
  5.             Blocks(player)
  6.         format a gui slot 13 of player with skull of ("MHF_Tnt" parsed as offlineplayer) named " &6&lTop Balance" lored "||&7Click to view the top players||&7that have the most money on||&7the server.||&7" to run:
  7.             Balance(player)
  8.         format a gui slot 14 of player with skull of ("MHF_Chest" parsed as offlineplayer) named " &6&lTop Coins" lored "||&7Click to view the top players||&7that have the most coins on||&7the server.||&7" to run:
  9.             Coins(player)
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16. function Blocks(p: player):
  17.     loop {Blocks::*}:
  18.         add 1 to {_size}
  19.         if {_low.to.high.list::%loop-value%} is not set:
  20.             set {_low.to.high.list::%loop-value%} to loop-index
  21.         else:
  22.             set {_n} to 0
  23.             loop {_size} times:
  24.                 set {_n} to {_n}+1
  25.                 {_low.to.high.list::%loop-value-1%.%{_n}%} is not set
  26.                 set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
  27.                 stop loop
  28.     wait 1 tick
  29.     set {_n} to size of {_low.to.high.list::*}
  30.     loop {_low.to.high.list::*}:
  31.         set {_high.to.low.list::%{_n}%} to loop-value
  32.         set {_n} to {_n}-1
  33.     wait 1 tick
  34.     set {_i} to 0
  35.        
  36.     create a gui with virtual chest with 5 rows named "&8Viewing Top Balance":
  37.         make gui slot 36, 37, 38, 39, 41, 42, 43, 44 and 45 with black stained glass pane named ""
  38.         make gui slot 40 with book named "&eMain Page" lored "||&7&oLeft-Click to go back to||&7&othe main selection page||&7":
  39.             make player execute "top"
  40.         loop {_high.to.low.list::*}:
  41.             add 1 to {_topnumber}
  42.             set {_player} to "%loop-value%" parsed as offline player
  43.          
  44.             make next gui with skull of {_player} named "&e&l##%{_topnumber}% &6%{_player}%" lored "||&7Blocks Mined: &f%{Blocks::%loop-value%}%||&r"
  45.            
  46.             add 1 to {_i}
  47.             if {_topnumber} > 15: #this is top 10 you can change it
  48.                 stop
  49.                
  50.         open last gui to {_p}
  51.  
  52.  
  53.  
  54.  
  55. function Balance(p: player):
  56.     loop all players:
  57.         set {Balance::%loop-player%} to balance of loop-player
  58.     loop {Balance::*}:
  59.         add 1 to {_size}
  60.         if {_low.to.high.list::%loop-value%} is not set:
  61.             set {_low.to.high.list::%loop-value%} to loop-index
  62.         else:
  63.             set {_n} to 0
  64.             loop {_size} times:
  65.                 set {_n} to {_n}+1
  66.                 {_low.to.high.list::%loop-value-1%.%{_n}%} is not set
  67.                 set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
  68.                 stop loop
  69.     wait 1 tick
  70.     set {_n} to size of {_low.to.high.list::*}
  71.     loop {_low.to.high.list::*}:
  72.         set {_high.to.low.list::%{_n}%} to loop-value
  73.         set {_n} to {_n}-1
  74.     wait 1 tick
  75.     set {_i} to 0
  76.     create a gui with virtual chest with 5 rows named "&8Viewing Top Blocks":
  77.         make gui slot 36, 37, 38, 39, 41, 42, 43, 44 and 45 with black stained glass pane named ""
  78.         make gui slot 40 with book named "&eMain Page" lored "||&7&oLeft-Click to go back to||&7&othe main selection page||&7":
  79.             make player execute "top"
  80.         loop {_high.to.low.list::*}:
  81.             add 18 to {_topnumber2}
  82.             add 1 to {_topnumber}
  83.             set {_player} to "%loop-value%" parsed as offline player
  84.             make next gui with skull of {_player} named "&e&l##%{_topnumber}% &6%{_player}%" lored "||&7Balance: &a%{Balance::%loop-value%}%||&r"
  85.             add 1 to {_i}
  86.             if {_topnumber} > 15:
  87.                 stop
  88.                
  89.         open last gui to {_p}
  90.  
  91.  
  92.  
  93. function Coins(p: player):
  94.     loop {Coins::*}:
  95.         add 1 to {_size}
  96.         if {_low.to.high.list::%loop-value%} is not set:
  97.             set {_low.to.high.list::%loop-value%} to loop-index
  98.         else:
  99.             set {_n} to 0
  100.             loop {_size} times:
  101.                 set {_n} to {_n}+1
  102.                 {_low.to.high.list::%loop-value-1%.%{_n}%} is not set
  103.                 set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
  104.                 stop loop
  105.     wait 1 tick
  106.     set {_n} to size of {_low.to.high.list::*}
  107.     loop {_low.to.high.list::*}:
  108.         set {_high.to.low.list::%{_n}%} to loop-value
  109.         set {_n} to {_n}-1
  110.     wait 1 tick
  111.     set {_i} to 0
  112.     create a gui with virtual chest with 5 rows named "&8Viewing Top Coins":
  113.         make gui slot 36, 37, 38, 39, 41, 42, 43, 44 and 45 with black stained glass pane named ""
  114.         make gui slot 40 with book named "&eMain Page" lored "||&7&oLeft-Click to go back to||&7&othe main selection page||&7":
  115.             make player execute "top"
  116.         loop {_high.to.low.list::*}:
  117.             add 18 to {_topnumber2}
  118.             add 1 to {_topnumber}
  119.             set {_player} to "%loop-value%" parsed as offline player
  120.             make next gui with skull of {_player} named "&e&l##%{_topnumber}% &6%{_player}%" lored "||&7Coins: &f&o%{Coins::%loop-value%}%||&r"
  121.             add 1 to {_i}
  122.             if {_topnumber} > 15:
  123.                 stop
  124.                
  125.         open last gui to {_p}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement