Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #every 5 seconds:
- #loop all players:
- #set tab header to "&6&l*&e&l*&6&l* &6&l&nMERCHANT&6&l *&e&l*&6&l*" and footer to "&7merchant.minehut.gg (%number of online players%/%max players%)" for loop-player
- function Scoreboard(player: player):
- set title of {_p}'s scoreboard to "&6&l*&e&l*&6&l* &6&l&nMERCHANT&6&l *&e&l*&6&l*"
- set line 15 of {_p}'s scoreboard to "&0"# in sidebar of {_p} to 15
- set line 14 of {_p}'s scoreboard to "&6&l&nPLAYER"# in sidebar of {_p} to 14
- set line 13 of {_p}'s scoreboard to "&6&lx &eName &f%{_p}%"# in sidebar of {_p} to 13
- set line 12 of {_p}'s scoreboard to "&6&lx &eBalance &f$%format({_p}'s balance)%"# in sidebar of {_p} to 12
- set line 11 of {_p}'s scoreboard to "&6&lx &eMobcoins &f%format({mobcoins::%{_p}%})%"# in sidebar of {_p} to 11
- set line 10 of {_p}'s scoreboard to "&1"# in sidebar of {_p} to 10
- set line 9 of {_p}'s scoreboard to "&6&l&nISLAND"# in sidebar of {_p} to 9
- if {island.owner::%{_p}%} is not set:
- set line 8 of {_p}'s scoreboard to "&6&lx &eOwner &f/is create"# in sidebar of {_p} to 8
- else:
- set line 8 of {_p}'s scoreboard to "&6&lx &eOwner &f%{island.owner::%{_p}%}%"# in sidebar of {_p} to 8
- if {island.level::%{island.owner::%{_p}%}%} is not set:
- set line 7 of {_p}'s scoreboard to "&6&lx &eLevel &f0"# in sidebar of {_p} to 7
- else:
- set line 7 of {_p}'s scoreboard to "&6&lx &eLevel &f%format({island.level::%{island.owner::%{_p}%}%})%"# in sidebar of {_p} to 7
- if {island.members.%{island.owner::%{_p}%}%} is not set:
- set line 6 of {_p}'s scoreboard to "&6&lx &eMembers &f0"# in sidebar of {_p} to 6
- else:
- set line 6 of {_p}'s scoreboard to "&6&lx &eMembers &f%amount of {island.members.%{island.owner::%{_p}%}%::*}%"# in sidebar of {_p} to 6
- set line 5 of {_p}'s scoreboard to "&2"# in sidebar of {_p} to 5
- set line 4 of {_p}'s scoreboard to "&6&l&nSERVER"# in sidebar of {_p} to 4
- set line 3 of {_p}'s scoreboard to "&6&lx &eOnline &f%number of online players%/%max players%"# in sidebar of {_p} to 3
- set line 2 of {_p}'s scoreboard to "&6&lx &eTotal Joins &f%{joins}%"# in sidebar of {_p} to 2
- set line 1 of {_p}'s scoreboard to "&6&lx &eTPS &f%{server_tps}%"# in sidebar of {_p} to 1
- function format(n: number) :: text:
- set {_data} to "QT,18|Q,15|T,12|B,9|M,6|k,3"
- loop split {_data} at "|":
- set {_s::*} to split loop-value at ","
- {_n} >= 10 ^ {_s::2} parsed as number
- return "%{_n} / 10 ^ {_s::2} parsed as number%%{_s::1}%"
- return "%{_n}%"
- command /toggle [<text>]:
- trigger:
- if {show_info::%player%} is not set:
- set {show_info::%player%} to true
- toggle player's scoreboard to on
- send "&7Enabled your scoreboard." to player
- else:
- delete {show_info::%player%}
- toggle player's scoreboard to off
- send "&7Disabled your scoreboard." to player
- on join:
- clear player's scoreboard
- while player is online:
- Scoreboard(player)
- wait 10 ticks
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement