Clicking on game objects from different script (JS)

Hi, I would like to be able to click on a game object in my scene and have something happen. I do not want to have a script on the object because I will have many objects to click on. Is there a way to do this from a controller script?

Any help is much appreciated.

Apply tags to your objects and cast a ray on click.

Note that your objects need collider.
Ref: