You are trying to read input using the unityengine.input class - YouTube
using UnityEngine.UI; 'Not necessary' although I need to use 'Text' and '.text'. Also unable to drag-and-drop the Text from my canvas into the 'text' slot. - Unity Answers
unity3d - Why unityengine.ui is not recognized? - Stack Overflow