The RABS valve is costly but you can check Ebay for one. I paid $24.00 for a new one for my truck. Also set the emergency brake. If the E peddle sets more than half way down the rear brakes are not adjusted up properly. When the E brakes are set try pushing on the brake peddle again. Did the peddle come up and did it slowly drop down? If no to both questions you need to adjust up the rears. This is a common problem. The master cylinder can't push enough fluid to fill the out of adjustment rears and most times you get a sinking brake peddle trying to fill the rear cylinders AFTER the fronts have done all the stopping. The fronts often will overheat and crack or warp the rotors. They don't last very long either. The rears auto adjusters really don't work like they are designed to.
I agree with checking the E brake. I had the same problem and after I thought I adjusted the rear brakes I had a soft pedal and the E barake wouldn't hold the truck while in drive. Made the adjustment and all is good.