//statement blocks

Blockly.Blocks['return_statement'] = {
  init: function() {
    this.setColour(160);
    this.setPreviousStatement(true);
    this.setNextStatement(true);
    this.appendValueInput('VALUE')
      .appendField('return');
    this.setTooltip('Function returns the value of input.');
  }
};
@@ -23,24 +23,39 @@
 ockl
-y.Blocks%5B'return
+ify.JavaScript.Generator%5B'js_if
 _sta
@@ -68,18 +68,8 @@
 '%5D =
- %7B%0A  init:
  fun
@@ -78,235 +78,1037 @@
 ion(
+block
 ) %7B%0A  
-  this.setColour(160);%0A    this.setPreviousStatement(true);%0A    this.setNextStatement(true);%0A    this.appendValueInput('VALUE')%0A      .appendField('return');%0A    this.setTooltip('Function returns the value of input.');%0A  %7D
+var n = 0;%0A  var argument = Blocklify.JavaScript.Generator.valueToCode(block, 'IF' + n,%0A      Blocklify.JavaScript.Generator.ORDER_NONE) %7C%7C 'false';%0A  var branch = Blocklify.JavaScript.Generator.statementToCode(block, 'DO' + n);%0A  var code = 'if (' + argument + ') %7B%5Cn' + branch + '%7D';%0A  for (n = 1; n %3C= block.elseifCount_; n++) %7B%0A    argument = Blocklify.JavaScript.Generator.valueToCode(block, 'IF' + n,%0A        Blocklify.JavaScript.Generator.ORDER_NONE) %7C%7C 'false';%0A    branch = Blocklify.JavaScript.Generator.statementToCode(block, 'DO' + n);%0A    code += ' else if (' + argument + ') %7B%5Cn' + branch + '%7D';%0A  %7D%0A  if (block.elseCount_) %7B%0A    branch = Blocklify.JavaScript.Generator.statementToCode(block, 'ELSE');%0A    code += ' else %7B%5Cn' + branch + '%7D';%0A  %7D%0A  return code + '%5Cn';%0A%7D;%0A%0ABlocklify.JavaScript.Generator%5B'js_return_statement'%5D = function(block) %7B%0A  var code = 'return ' + Blocklify.JavaScript.Generator.valueToCode(block, 'VALUE',%0A    Blocklify.JavaScript.Generator.ORDER_NONE) + ';';%0A  return code + '%5Cn';
 %0A%7D;

Add JS if-statement and return-statement generators