It can definitely be improved a lot, but it is enough for the basic function. Thanks to everyone for the help.
daemon.g
G4 S1
if heat.heaters[1].current > 55 && heat.heaters[1].current < 1000 ; hotend temp more than 55c ?
; hotend temp more than 55c ?, termostacic fan set to 45c (fan have time to start spin)
if fans[1].rpm < 500.0 ; hotend fan spining faster than 500rpm?
M150 R128 ; Neopixel red!
M104 S0 ; set hotend temp to 0c
M291 P"Hotend fan error!!!" S1
M98 P"pause.g" ; run pause.g
else
;M150 U128 ; Neopixel green
else
;M150 U128 ; Neopixel green
G4 S1