Please note that I've made a mistake in the code, it should be MsgPlus.DisplayToast("","Hello world!");
Indeed, all these event things are just functions
"if" checks whether something is true or not, you'll see more on
MSDN (a scripter's best friend):
if...else statement @ MSDN