Global variables have to be declared just like any other variable.
All you need to do in this case is call the script wherever needed (be it a config/controller object, etc).
Then it should be as simple as calling to variable like normal.
IE: `global.myGlobalVariable = "some unrelated value";`
The manual goes into a little more detail on specifics, so I'd recommend checking the "global variables" section:
https://docs2.yoyogames.com/