You include an ‘on run’ handler which acts when the script is double-clicked or when it is invoked from another.
‘on run’ handlers are usually implicit - i.e. when you run the script everything that is not a handler itself runs. To do what you want to do, you need to make it explicit - actually put the stuff you want to happen on a start that is not a drop inside ‘on run’, ‘end run’. The ‘on open’ runs for a drop, the ‘on run’ for any other start. If it makes sense, the rest of the script can be a handler started from either of those, but more normally, the ‘on run’ portion has to get materials to work with, while the ‘on open’ is “handed” it.
choose file with prompt "Whatever:" with multiple selections allowed without invisibles
on open theseItems
-- Add some stuff here if you need to
repeat with thisItem in theseItems
-- handle thisItem