Need help scripting!!

I need help trying to move an object randomly across my screen and then when the object moves out of the scope of my camera it respawns back to the initial/random position.

There is a function if not drawn or something.

Unity - Scripting API: Renderer.OnBecameInvisible() might help.

thank you