How can get an applescript to add itself to the open at login menu automatically
Add it to the login items (like you mentioned.) Note that (to accomplish this easily) you have to save it as an application bundle.

Using this guide, you can automate the process.

tell application "System Events"
    -- Adding a login item for the current user
    make new login item at end of login items with properties {path:"/Applications/**{YOUR APP HERE}**", hidden:false}
end tell`