All variables are public in a Godot and can be considered global (or at least within the same scope/namespace). So it is no problem to do things like this:

var player = get_node("Some/Path/Player")
print(player.any_variable)

Signals can also work, you can pass parameters to and from signals.

Scripts have to be on objects (nodes) in order to do anything. While you can instance scripts purely in code, they are more limited in what they can do to the rest of the world. So you should probably just make a dummy/empty Node2D (or Spatial for 3D) and then attach the script on that node so you can access it.