New UI Text through script?

i have tried accessing the new UI Text through script using other examples from answers and the one in the Unity tutorial but it did not work.

what i have tried:

using UnityEngine;
using System.Collections;

public class NewBehaviourScript : MonoBehaviour {
Text text;

	// Use this for initialization
	void Start () {
	text = GetComponent<Text>();
	// Update is called once per frame
	void Update () {


using UnityEngine.UI;