Ok, so since this has been answered in the comments and I don’t have the privileges to convert comments to answers, I will post my own.
The problem you had, was that you were using the wrong syntax for and if statement.
Like in many other languages, javascript and therefore unityscript uses {} curlybrackets for code wrapping, including an if-else statement.
Also present in many other languages is the usage of a ; semicolen for EOL (end of line), this is used for every line of code that is executed individually.
Therefore your code should look like this:
function Update() {
if (/*Your expression for the if statement*/) {
//code here
}
else {
//code here
}
}
You can also stack an if on top of an else:
if (/*your expression here*/) {
//Your code
}
else if (/*Your second expression here) {
//Your code
}
else {
//Your code
}
To use an or expression, in javascript and unityscript, you use ||
So if I want my code to happen when either a or b are true:
true || true //evaluates as true
true || false //evaluates as true
false || false //evaluates as false
false || (true || false) //evaluates as true
And is done similarly with &&
true && true //evaluates as true
true && false //evaluates as false
false && false //evaluates as false
true && (true || false) //evaluates as true
You can also allways use not, which inverts the evaluation and is done using a !
!true //evaluates as false
!false //evaluates as true
!(true && true) //evaluates as false
!(true && false) //evaluates as true
!(false && false) //evaluates as true
I suggest learning these basics before starting anything big 
Hope this helps,
Benproductions1