Accessing Variables Through Scripts

Hello, Does anyone one know how I can access variables through other scripts.
I tried doing something like this:

var killplayer : movePlayer = gameObject.GetComponent(movePlayer);
killplayer.Destroy = true;

But that doesn’t work…

Thanks in advance!

At which part does it not work?

Have you attached the MonoBehaviour component ‘movePlayer’ to the same game object on which you have the above script?