How can I have the worldborder coordinates into some scoreboard objectives? If it's not possible in vanilla it's not a problem to use a plugin.
The solution is quite similar to this answer I gave a while ago, but of course with some slight changes.
First things first, you need a 20Hz fill clock. How to make one isn't exactly within the scope of this question.
Next, you'll need a scoreboard objective to hold the current world border size:
/scoreboard objectives add BorderQuery dummy
You'll also need an empty player that will keep track of day time:
/scoreboard players set #BorderPlayer BorderQuery 0
The first command block to be triggered by the fill clock should query the border size from the game:
We need to redirect the result of command block to the scoreboard objective we set up earlier. Turn off the fill clock, stand directly on the command block, and enter this command:
/stats block ~ ~-1 ~ set QueryResult #BorderPlayer BorderQuery
#BorderPlayer now stores the world border size in his
BorderQuery objective. From there, you can test the objective, and with some more work, perform an operation on it.
If you need to do operations with the objective, it may be better to set the objective for
@a (instead of just
#BorderPlayer) in the
stats command. Additionally, everyone will need the objective active.