Skrypt Stop Java

public void onClick() {
    if(condition == true) {
        return;
    }
    string.setText("This string should not change if condition = true");
}
Realy Silly Shark