Script seems to run both if and else statements

Hi, Daniel, and welcome to the forum.

Please see Wiki - how to post code on this forum. Post the screengrab too, if you think that context will help.