how about this (a bit like
languages and bodyfonts)
\unprotect
\newconstant\c_scripts_injection
\c_scripts_injection\attributeunsetvalue
\newconstant\c_scripts_splitting
\c_scripts_splitting\attributeunsetvalue
\newconstant\c_scripts_status \c_scripts_status
\attributeunsetvalue
\unexpanded\def\setglobalscript[#1]%
{\edef\currentscript{#1}%
\scripts_basics_set
\c_scripts_injection\attribute\scriptinjectionattribute
\c_scripts_splitting\attribute\scriptsplittingattribute
\c_scripts_status \attribute\scriptstatusattribute}
\unexpanded\def\setlocalscript[#1]%
{\edef\currentscript{#1}%
\scripts_basics_set}
\let\setscript\setlocalscript
\appendtoks
\attribute\scriptinjectionattribute\c_scripts_injection
\attribute\scriptsplittingattribute\c_scripts_splitting
\attribute\scriptstatusattribute \c_scripts_status
\to \everypagebody
\protect