Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /top [<text>]:
- trigger:
- open chest with 3 rows named "&8Select a category" for player
- 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:
- Blocks(player)
- 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:
- Balance(player)
- 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:
- Coins(player)
- function Blocks(p: player):
- loop {Blocks::*}:
- add 1 to {_size}
- if {_low.to.high.list::%loop-value%} is not set:
- set {_low.to.high.list::%loop-value%} to loop-index
- else:
- set {_n} to 0
- loop {_size} times:
- set {_n} to {_n}+1
- {_low.to.high.list::%loop-value-1%.%{_n}%} is not set
- set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
- stop loop
- wait 1 tick
- set {_n} to size of {_low.to.high.list::*}
- loop {_low.to.high.list::*}:
- set {_high.to.low.list::%{_n}%} to loop-value
- set {_n} to {_n}-1
- wait 1 tick
- set {_i} to 0
- create a gui with virtual chest with 5 rows named "&8Viewing Top Balance":
- make gui slot 36, 37, 38, 39, 41, 42, 43, 44 and 45 with black stained glass pane named ""
- make gui slot 40 with book named "&eMain Page" lored "||&7&oLeft-Click to go back to||&7&othe main selection page||&7":
- make player execute "top"
- loop {_high.to.low.list::*}:
- add 1 to {_topnumber}
- set {_player} to "%loop-value%" parsed as offline player
- make next gui with skull of {_player} named "&e&l##%{_topnumber}% &6%{_player}%" lored "||&7Blocks Mined: &f%{Blocks::%loop-value%}%||&r"
- add 1 to {_i}
- if {_topnumber} > 15: #this is top 10 you can change it
- stop
- open last gui to {_p}
- function Balance(p: player):
- loop all players:
- set {Balance::%loop-player%} to balance of loop-player
- loop {Balance::*}:
- add 1 to {_size}
- if {_low.to.high.list::%loop-value%} is not set:
- set {_low.to.high.list::%loop-value%} to loop-index
- else:
- set {_n} to 0
- loop {_size} times:
- set {_n} to {_n}+1
- {_low.to.high.list::%loop-value-1%.%{_n}%} is not set
- set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
- stop loop
- wait 1 tick
- set {_n} to size of {_low.to.high.list::*}
- loop {_low.to.high.list::*}:
- set {_high.to.low.list::%{_n}%} to loop-value
- set {_n} to {_n}-1
- wait 1 tick
- set {_i} to 0
- create a gui with virtual chest with 5 rows named "&8Viewing Top Blocks":
- make gui slot 36, 37, 38, 39, 41, 42, 43, 44 and 45 with black stained glass pane named ""
- make gui slot 40 with book named "&eMain Page" lored "||&7&oLeft-Click to go back to||&7&othe main selection page||&7":
- make player execute "top"
- loop {_high.to.low.list::*}:
- add 18 to {_topnumber2}
- add 1 to {_topnumber}
- set {_player} to "%loop-value%" parsed as offline player
- make next gui with skull of {_player} named "&e&l##%{_topnumber}% &6%{_player}%" lored "||&7Balance: &a%{Balance::%loop-value%}%||&r"
- add 1 to {_i}
- if {_topnumber} > 15:
- stop
- open last gui to {_p}
- function Coins(p: player):
- loop {Coins::*}:
- add 1 to {_size}
- if {_low.to.high.list::%loop-value%} is not set:
- set {_low.to.high.list::%loop-value%} to loop-index
- else:
- set {_n} to 0
- loop {_size} times:
- set {_n} to {_n}+1
- {_low.to.high.list::%loop-value-1%.%{_n}%} is not set
- set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
- stop loop
- wait 1 tick
- set {_n} to size of {_low.to.high.list::*}
- loop {_low.to.high.list::*}:
- set {_high.to.low.list::%{_n}%} to loop-value
- set {_n} to {_n}-1
- wait 1 tick
- set {_i} to 0
- create a gui with virtual chest with 5 rows named "&8Viewing Top Coins":
- make gui slot 36, 37, 38, 39, 41, 42, 43, 44 and 45 with black stained glass pane named ""
- make gui slot 40 with book named "&eMain Page" lored "||&7&oLeft-Click to go back to||&7&othe main selection page||&7":
- make player execute "top"
- loop {_high.to.low.list::*}:
- add 18 to {_topnumber2}
- add 1 to {_topnumber}
- set {_player} to "%loop-value%" parsed as offline player
- make next gui with skull of {_player} named "&e&l##%{_topnumber}% &6%{_player}%" lored "||&7Coins: &f&o%{Coins::%loop-value%}%||&r"
- add 1 to {_i}
- if {_topnumber} > 15:
- stop
- open last gui to {_p}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement