On and after July first, one thousand nine hundred thirty-three, any and all moneys in the separate funds of any magisterial district or independent school district, other than interest and sinking funds, and all moneys which may thereafter be paid into such funds from the collection of delinquent taxes or otherwise, are hereby transferred to the board of education for control, distribution and expenditure; and any such funds so transferred shall be used by said board in payment of any existing legal indebtedness, bonded or otherwise, of any such district, and the residue, if any, for general school purposes without regard to the purpose for which the said moneys were originally collected, except that moneys collected for the purpose of replacement of or the erection of new buildings shall be expended in the magisterial or independent school district from which such moneys were collected.