GameObject is a key component of the Unity3D engine.
Using the following code I am able to get the Script from "SMG" and apply it to the weaponObject: weaponObject = …