Pick "Export Book to PDF" in the Book panel's flyout and InDesign creates a single PDF file, either of the documents selected in the panel or of all documents when no documents are selected.
The script exports all documents in a book to individual PDF files. It's not possible to export selected documents to separate files; for that you need Dirk Becker's "Script extras" plugin.
The script displays this simple dialog:

Any PDF presets are displayed in the dropdown. Pick the one you need and press OK.
Like the script? A donation will be appreciated.
Questions, comments? Get in touch