Bathtub replacement can be tough. I like to self-level the floor if it’s wonky and fasten the tub to studs with special clamps.

source