Sorry I missed this one, haven't been around lately.
This is a pretty easy one:
osascript doesn't have a GUI to interact with, so you need to tell something with a GUI to display the dialog.
In this case, Finder would be the way to go.
Here is what you want:
osascript -e 'tell application "Finder" to display dialog "hi"'