I just switched from pgadmin3 to pgadmin4, just to check it out.
I was using the query tool and was not able to find execute as pgscript option at all, this was available in pgadmin3.
The documentation for pgadmin4 query tool does not mention anything about pgscript at all.
Is anyone else able to execute pgscripts in pgadmin4? Forgive me if I missed something, I spent over 3 hours searching for it and could not find it.