and you dont need the var ShowHideFlag:
if (ShowHideFlag == 0)
replace with:
if(Badrizmo.flags & (INVISIBLE))

and with:
Badrizmo.flags ^= (INVISIBLE)
you can toggle between Visible and Invisible