OK lets step back a step.
I assume you have a debug node attached to the output?
is false written in blue? Then its a boolean and you would need msg.payload!==false
or "false"? Then it is a string and you would need msg.payload!=="false"
Its worth understanding javascript variable types as they are fundamental in Node-RED
[{"id":"1b8567c6.f72d9","type":"inject","z":"8cb64888.462c2","name":"Boolean false","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":150,"y":160,"wires":[["6946248b.0b7ee4","dcf0068a.ed8c58"]]},{"id":"6946248b.0b7ee4","type":"function","z":"8cb64888.462c2","name":"","func":"if(msg.payload!==\"false\"){\n msg.payload=\"Online\"\n}\nelse\n{\n msg.payload=\"Offline\"\n}\nreturn msg;","outputs":1,"noerr":0,"x":380,"y":160,"wires":[["698291d5.35be58"]]},{"id":"7686a59c.1258f4","type":"inject","z":"8cb64888.462c2","name":"String false","topic":"","payload":"false","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":220,"wires":[["6946248b.0b7ee4","dcf0068a.ed8c58"]]},{"id":"698291d5.35be58","type":"debug","z":"8cb64888.462c2","name":"OUTPUT","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":570,"y":160,"wires":[]},{"id":"dcf0068a.ed8c58","type":"debug","z":"8cb64888.462c2","name":"INPUT","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":350,"y":80,"wires":[]}]