if: level of ability bah less than 5 then: - Increase level of ability bah for triggering unit - Display message: you have learned bla bla else: - Display message: your ability has reach max level.
Move the display message action like this picture, and don't forget to remove the wait action. Since you still use event response variable (buying unit), so wait action should not there.