Code not woking correctly and i dont know why it wont run the last if statement

i know its way late but you were correct that was the problem