Everything About Scoreboard Manipulations

This is what a scoreboard looks like:
SalwyrrLauncher 21-08-2022 09.33.37

Numbers like 12, 11, 10 mean score.
Text like Developer Hub: are string.
GAME EDITOR is called a scoreboard display name.

Here are some basic notes:
■ A scoreboard can only have up to 15 strings. If it got surpassed then the new string gonna overwrite the old string.
■ The score can be expressed as the value following the within range 32-bit integer limit or -2,147,483,648 to 2,147,483,647.
■ When everyone left the game and someone joined then every score and string the scoreboard stored before will get replaced with the new string and score instead. To fix this simply use the leaderboard hologram format which can be seen here.
■ If the newly created string is identical to a different string then it won’t be added to the scoreboard.
■ If you want to have a string that consisted of space only then simply put color codes.

String orders
Strings on the scoreboard are enumerated in ascending order. Meaning if you put a string “deefer” with the score “11” then you put a different string “sprinkler” with the score “12”. It gonna show like this:
png 7
No matter how much you try, it will always show in ascending order.

Scoreboard determination
Every scoreboard to be shown to player(s) needs to have a name. This is used to specify which scoreboard you wanted to show to the player(s). Note that the scoreboard determination name is not as same as the displaying name. The displaying name is just the name that is shown on top of the scoreboard like “TEST” to show the content and topic of that scoreboard.

There are also some notes to this. Like if you only put the name of the scoreboard and not display name then the scoreboard name will also be the name to be displayed on top of it.

The name of the scoreboard also supports API tags to specify targets to be shown to:

%player% - display the scoreboard to the player that is involved in the event.
%default% - same as %player%.
%selected% - display the scoreboard to the selected subject(s) of select objects.
%selection% - same as %selected%.
%victim% - display the scoreboard to the victim.
%damager% - display the scoreboard to the player who damages an entity or player.
%shooter% - display the scoreboard to the shooter.
%killer% - display the scoreboard to the killer.
%random% - display the scoreboard to a random player.

There is also %entity% but since this is displaying a scoreboard so it is unnecessary. Scoreboard names also comply with the dynamic variable name’s criteria.

Add/Delete string and score
As shown in the previous screenshot. The string “Helper deefer” is shown on the 11th score and the “sprinkler” string is shown on the 12th string. Now if I wanted to move the 'Helper deefer" string to the 12th position and “sprinkler” down to 11th. I would need to first delete the old “Helper deefer” and “sprinkler” strings to prevent 2 identical strings exist at the same time. After that, we will then re-add the “Helper deefer” string with the score of 12 and “sprinkler” with the score of “11”.
SalwyrrLauncher 21-08-2022 10.52.42
The score is put inside the delete string chest will delete every correspondent score value on the scoreboard.

Delete/Show scoreboard
if you deleted the scoreboard then it gonna delete everything including strings and scores. If you want to show it back then you would need to re-add every string again and show it to player(s).