In InDesign's Book panel, pick "Export Book to PDF" from the 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: no matter what you select the result is always a single PDF file.
The script, on the other hand, exports all selected documents in the active book to individual PDF files.
The script displays this dialog:

Select the files you want to export and the preset you want to use, then press OK to export the selected documents. The PDF files are stored in the same folder as the InDesign documents.
Questions, comments? Get in touch