Untitled
raw download clone
TEXT
views 16
,
size 1920 b
on join:
	if {JoinsCounted::*} does not contain player's uuid:
		add player's uuid to {JoinsCounted::*}
		set {JoinNumber::%uuid of player%} to ({JoinsCounted::all} +1)
		set {JoinsCounted::all} to ({JoinsCounted::all} +1)

#SIDEBAR CONFIG:

function sidebarUpdate(p: player):
	set {_u} to uuid of {_p}
	set {_JNu} to {JoinNumber::%{_u}%}
	set {_ln} to the last 1 characters of "%{_JNu}%"
	set {_2ln1} to the last 2 characters of "%{_JNu}%"
	set {_2ln} to the first 1 characters of "%{_2ln2}%" 
	set title of {_p}'s scoreboard to "&5Gen&b&lS&3&lB&r"
	set line 8 of {_p}'s scoreboard to "&3&l%{_p}'s displayname%"
	set line 7 of {_p}'s scoreboard to "&bBalance: &a%{_p}'s balance%"
	set line 6 of {_p}'s scoreboard to ""
	if {_ln} = "1":
		if {_2ln} = "1":
			set line 5 of {_p}'s scoreboard to "%{_JNu}%th joined player!"
		else:
			set line 5 of {_p}'s scoreboard to "%{_JNu}%st joined player!"
	else:
		if {_ln} = "2":
			if {_JNu} = "2":
				set line 5 of {_p}'s scoreboard to "2nd joined player!"
			else:
				if {_2ln} = "1":
					set line 5 of {_p}'s scoreboard to "%{_JNu}%th joined player!"
				else:
					set line 5 of {_p}'s scoreboard to "%{_JNu}%nd joined player!"
		else:
			if {_ln} = "3":
				if {_2ln} = "1":
					set line 5 of {_p}'s scoreboard to "%{_JNu}%rd joined player!"
				else:
					set line 5 of {_p}'s scoreboard to "%{_JNu}%th joined player!"
			else:
				set line 5 of {_p}'s scoreboard to "%{_JNu}%th joined player!"
	set line 4 of {_p}'s scoreboard to "You're ##%{_JNu}%/%{JoinsCounted::all}%"
	set line 3 of {_p}'s scoreboard to ""
	set line 2 of {_p}'s scoreboard to "&2%{_p}'s ping% &aPing"
	set line 1 of {_p}'s scoreboard to "gensb.minehut.gg"

#SIDEBAR SHOWING:

on join:
	sidebarUpdate(player)
on join:
	while player is online:
		wait 5 seconds
		sidebarUpdate(player)
command test:
	trigger:
		send "%player's ping%" to player
close fullscreen
Login or Register to edit or fork this paste. It's free.