I was going to add a script to a cube and i wanted to add code to it so i press edit script and my unRar opened up and said unsupported file. What type of program should i use? I'm confused.

Please tell me a program like unRar that can open the script so I can add code . Also i’m a beginner on Unity so that’s also why.

Try using Visual Studio 2017.

her is a video how to set it up: