Spongy brake pedal is almost always air in the system so replacing the hydraulic fluid in master cylinder and bleeding the brakes lines, abs module and calipers will resolve the spongy feel. Keep the master cylinder reservoir topped up during the bleeding process.
A spongy brake pedal can also be caused by a old flexible rubber brake lines, especially when they are bulging and about to burst so replacing them will fix the soft spongy pedal.
A soft pedal that slowly sinks to the floor as it’s being pressed is usually caused by a leak somewhere in the hydraulic system. Repairing the leak will stop the pedal from slowly hitting the floor.
Good to hear it’s been sorted but out of curiosity what was wrong with the master cylinder that it needed replacing? Leaking?