Creating Dialogue in Unity?

Hello guys! To let me get started, a friend and I are designing a simple game as kind of a learning experience/for fun. Its kind of going to be a FPS/RPG. I went through the FPS tutorial and found it great!! I have a little programming experience, but not much (HTML/CSS/PHP/MySQL), but i learn very quickly!. Now here is where i ran into trouble. I managed to make a box that when you approach the cube, it asks you "How are you today? What can i do for you?" after watching a tutorial on youtube, but now im confused as to how you would make a response to that? Here is my current code "Display GUI Script".

var target : Transform;

function Update () {
var other = gameObject.GetComponent("GUI Style Script");

if ( Vector3.Distance(target.position, transform.position ) < 25) {
other.enabled = true;
}
if ( Vector3.Distance(target.position, transform.position ) > 25) {
other.enabled = false;
}
}

and here is my GUI Style Scripting.

var Dialogue = 0;

function OnGUI () {
    // Make a background box
if ( Dialogue = 0 ) {
GUI.Box (Rect (10,10,300,90), "Why hello there! What can i do for you?");
}

if (GUI.Button (Rect (20,40,80,20), "Nothing")) {

    }
    }

Now this is probably the totally wrong approach, but i thought maybe I could have my "if" statement change the amount dialogue, to make a different response... xD (Yes, this code does generate an error)

Does anyone know of a tutorial that goes through this? or even just a beginners tutorial on GUI?

Thanks guys!! I'm hoping that someday I'll be able to give back the the community!!

Unity uses something called a immediate mode GUI. This means that your OnGUI code is called every frame. Because of this, you can write code like this:

var Dialogue = 0;
var text : String = "Why hello there! What can i do for you?";
function OnGUI () {
    // Make a background box
    if ( Dialogue == 0 ) {
       GUI.Box (Rect (10,10,300,90), text);
    }
    if (GUI.Button /* Placeholder */, "Something")) {
       text = "What?";
    }    
    if (GUI.Button (Rect (20,40,80,20), "Nothing")) {

    }
}

Something like that would probably work for you. I would recommend looking at the Unity docs, and also reading a book on basic JavaScript programming, or another language, like C#. I think they will make it much easier to code for Unity.