code causes transistor to overheat

Thanks, I knew it was something stupid. I rewrote some of the code when the nano blew to facilitate a 168p which needs less code. Thank you for taking a look, I thought it was a floating pin issue but for some reason was blind to the issue asI went through the code more times then I'd like to admit.

Thanks again!