xxxxxxxxxx
repeat wait() until _G.myFunction() --wait until script has loaded, otherwise errors i think
_G.myFunction() --calling the function
xxxxxxxxxx
_G.myFunction = function() --This means it's a global function.
print("Hello, myFunction!") --for testing
end