When you log into the game, open the store and click on Z or R or Y. After that everything will work correctly.
These are versions of this script where the code was updated. Show all versions.