You can remove a collaborator from a shared script at any time.
- Hit "share" in the top bar
- Click the three horizontal dots next to the person you wish to remove, then hit "Remove invitation."
- If you invited someone via a link, you can click the three horizontal dots next to that link and select "Revoke."