'Global' and 'local' refer to something called 'scope'.
In TS, scope isn't nearly as important as in, say, C++, but it's still useful to know about.
Global scope will be accessible anywhere. Defining a global variable means that no matter what, so long as it exists, you can use it where you need it. The dollar sign ($) precedes variables with global scope in TS.
Local scope is within single scripts or functions and deleted afterward. For instance,
if this is your server.cs
%clams = true;
exec("./plants.cs");
you can't do something like this with successful results in plants.cs
echo(%clams); //clams doesn't exist in this scope because it's a different script, would echo a blank line
However, if you instead did this:
server.cs
$clams = true;
exec("./plants.cs");
plants.cs
echo($clams); //would echo 1 because clams is now in global scope and can be used anywhere