I found this script that realized FORMULATEXT's excel function in google.
function FORMULATEXT(A1Notation) {
return SpreadsheetApp.getActive().getRange(A1Notation).getFormula();
}
But problem is for use it you need use quotations for reference like this
=formulatext("A1")
And link in formula didn't change when you move it in other cell. How can i upgrade this script to fix it?