Flatten selected polygons to one plane with Script or Gumball

Sorry asked this before. Thanks @Jarek