You have a couple of options: A) you sell and take a free ride and you cannot purchase with unsettled funds for 90 days; B) You deposit enough funds to cover your purchase on Friday; or C) you sell enough of a security to cover the purchase on Friday. Both B and C result in a Good Faith Violation, where you get a violation, but no action will be taken unless you rack up two more.
Someone correct me if I am wrong, because I have never actually Sold unsettled funds.