From Quickstart: Macros, Menus, and Custom Functions I know how to add my script to my spreadsheet:
Tools > Script editor, Blank Project, delete any code in the script editor and paste in the code.
it called bounded script (Scripts Bound to Google Sheets, Docs, or Forms).
but what if I need to pass (already written) script to another user, so that user would be able to apply this script to his own spreadsheets?