Shorten if script with learned material from if/else