Once you are on any version of UBBT 7.x, you can run the upgrader contained within the UBBT 7.7.4 archive with PHP 7, and it will upgrade your database and files to version 7.7.4.
This thread suggests that you make the leap from UBBT 6.5.x (php4/5) -> 7.2.0 (php5) -> 7.7.4 (php5/7)
My memory is a bit fuzzy with the MySQL supported versions of UBBT 6. I want to say its only supported to MySQL 5.1 and earlier, but we're talking about 15 year old software that really should not still be running. Mozilla was still on FF 2.6, IE was on version 4.0.1, and people were excited about Windows Vista :/