Toggle between scripts with a script?

Hello there.
My camera for a third person shooter has two scripts: when you are aiming and when you are not.
My question is, is it possible to make a script that toggles between these two scripts with a press of a button? I use c# as scripting language.
Thanks in advance.

Yes, it is possible.

use the GetComponent() function, it can look for scripts as well.

So for example

public TestScript scriptReference;

scriptReference = GetComponent<TestScript>();