Best Practice for using scripts across scenes and layouts

Found the DOM (Yay)
kinda hidden at the bottom of the javascript editor. Now hopefully I can figure this out. Suggestions welcome.