According to PitBull documentation, "LuaText" is simply fed into SetFormattedText and Angle returns three strings, which surrounds the input with "angle brackets" < >. If there's no input, in this case if the unit is not afk or dnd, it still returns three empty strings. Also, if you want to use the pipe character or the percent sign, you need to escape both.
Lua Code:
local s=Status(unit)
if s then return s end
local cur,max=HP(unit),MaxHP(unit)
local hr,hg,hb=HPColor(cur,max)
return "|cff%02x%02x%02x%s|r %s%s%s || |cff%02x%02x%02x%.0f|r %%",ClassColor(unit),Name(unit),Angle(AFK(unit) or DND(unit)),hr,hg,hb,100*cur/max
I left a space between the health and the percent sign.
Edit: I didn't refresh the page before posting, looks like you got it working anyways