I really don't understand the entire question, but
" If I am moving to a layout based on data in an "On Load Record" trigger "
as a rule of thumb: Create separate scripts - and in Your situation, separate layouts without triggers - for PSoS.
Besides of this: Try using the 'get functions', ie get (ApplicationVersion) or similar, I don't have an english version here
** Sorry for typing mistakes - but it's impossible to edit postings on iPad here
Application version, machine name, user name, IP address. Maybe a combo of those. I put in a get application version for my startup script that bypasses a bunch of stuff that is only needed for the actual clients like navigating to a certain layout or a startup sort. This works to speed up running scheduled scripts on the server a lot. I believe PSOS runs scripts as a scheduled script so that should work for you. Remember that every instance of a Server Side script will run your startup script if you have one. This includes PSOS.
To be specific I use this:
If [LeftWords ( Get (ApplicationVersion) ; 1 ) = "Server"]
Hope that will help you out. You can use it as a standard IF or and IF ELSE or whatever fits your script for what you need. If there are a number of places in one script you may want to evaluate only once and set a variable to use throughout the script.
While this is quite helpful to tell me if I am on a server or not, it does not tell me if I have a process that has been initiated by Perform Script on Server, which is different that say logging in and using the server as some aspects of the server environment such as otherwise predefined global variables are not accessible from PerformScriptOnServer.