osascript -e command for displaying a text in status bar?
There is not a way to use AppleScript to put something in the menu bar, as far as I can tell, and I looked for a long time.

There are two apps that will put stuff into the menu bar, based on scripts of various kinds:


BitBar
TextBar


BitBar made a big splash a few years ago, but it's pretty much dead now.

TextBar is less well-known, but it's a much better app, in my opinion, and the developer is very responsive. You can find examples on GitHub of the types of things you can do with it.