R = reset ?

how can i do that when i press R the game reloads ?

in a c# or in a java script?

You can do this in both c# or javascript.

Just reload your frist scene with SceneManager.LoadScene(0) and you should be good to go.
You will only need care about reset all static variables if you have any.