/Updated version - Provides the data pack/
After execution of complex command chain through function(s) the scoreboard hides from the sidebar and stops to respond to commands like "scoreboard players get @s <Objective>" when there is an assigned value and when there isn't responds in the chat that there is no assigned value to this player/entity. After restart of the world everything is working again and the changes are saved.
Example:
1) Load datapack.
2) Use function "server:init".
3) Set score "Money" to 100+.
4) Set score "ShopInteract" to -8.
Please update your existing ticket instead of creating a new one.