GDScript does not support global variables or functions, but you can create singletons which let you define variables and functions that can be used anywhere. See Singletons (AutoLoad) in the documentation.
It is also possible to load entire scenes (and not just scripts) this way.