I sometimes cheat and put a gateway tag change event in that calls the script, assign it to a temporary boolean memory tag then just toggle the tag to run it.
The 'Gateway Scripting Project' setting is totally orthogonal to the question of which scripts are 'visible' when you're in the script console.
If you open child 1 in the designer, you'll be able to use the project library of child 1, which will include any project library scripts defined in parent and grandparent, because project inheritance delivers you a "flattened" representation of parent project's resources as if they existed in your own project. You will not be able to use aunt's resources, because they are invisible to you.
The gateway scripting project could be any of those projects. All the gateway scripting project setting affects is which project's scripts you are able to use in gateway contexts that are not associated with a project. In other words - in the runScript function in expression tags. Lots of other ways to author expressions run on the gateway (Perspective, Reporting, Alarm Pipelines, SFCs, etc) - but all of those are associated with a project, and therefore naturally participate in project inheritance and pay no attention to the gateway scripting project.
Restated again - if the gateway scripting project is child 3, you're able to use scripts from child 3, aunt, and grandparent in your expression tags' runScript expressions.
Ultimately, I’m trying to get this script to run in a notification pipeline on the 2nd project. Does that script not execute in gateway scope? In my logs it says that the library is undefined.
Alarm pipelines are defined in project configuration. Whatever is attached to a project will not care what project you've set as your GSP. The same applies for example to gw script events like timers and scheduled events which are both attached to a project, despite all running in the gateway.
Tags on the other hand are not attached to projects and therefore need to know what project to use for a script library, as script libraries are project resources