The author of the script is the current author of the page in which the script is located.
By checking/modifying the author of the page containing that script.
You indicated having the issue with “some pages”, is there a lot of those ? If there is only a few it suggest it does not have much to do with the user who installed the wiki (it would be broken a bit everywhere, like the whole administration UI for example) and that those pages where edited by a user after the install.