TigwerSparkz Node referencing is done with node path literals prefixed by the $ character. You're trying to do it via a string which won't work.
var moneyText = $main/MoneyText
...or alternatively you can access a node directly through the path, without creating a reference variable.
$main/MoneyText.text = str(totalMoney)
However you can still do it using a string but in that case you need to call get_node() method:
var moneyText = get_node("main/MoneyText")
Note that paths can be absolute of relative (to node whose script they're referred from). An absolute path must start with the / character
$/root/main/MoneyText
get_node("/root/main/MoneyText")