Can't add script

I can’t apply script on object.
“Can’t add script
can’t add component ‘globalVar’ because it doesn’t exist”
The same thing with standart scripts too.
My friend has the same unity. Everything works fine on his computer, so I think there is no errors in script.
Can anyone help me?

\My friend can apply this script on object without problems.
\There are 4 scripts for making inventory.
\Global var is one of them.
\ Third line :" Stores global variables"
\ Fourth line: " Apply on any unchangeable object
I have downloaded it from one lesson on youtube. Firstly, the guy just dragged the script on a cube as an example.

have you changed the name of the script.because you have mentioned the name ‘globalVar’ whereas the name of the class inside the script is ‘GlobalVar’.your class name and name of the script must be the same.