Scripting buttons are created using input.buttonsAsync(). You still have to code what you want to happen when a button is chosen.
Scripting doesn’t allow for much interaction. When I want a preview of data for multiple records, I usually build an array of the data and show it using output.table()