Hud Problem

So, I’m trying to make it so it says if your an admin and if you have 40 or below health you get a warning. So this is what I have now.
[LUA]
local ply = LocalPlayer()
if ply:Health() < 40 then
draw.SimpleText(“Warning Low Health!”, “ChatFont”, 12, 760, Color(255, 0, 0, 255), 0, 0)
else return
end

local ply = LocalPlayer()
if ply:IsAdmin() then
draw.SimpleText(“Admin”, “ChatFont”, 12, 800, Color(255, 255, 255, 255), 0, 0)
else
draw.SimpleText(“Guest”, “ScoreboardText”, 12, 800, Color(255, 255, 255, 255), 0, 0)
end
[/LUA]

I can get the text that tells you if your an admin to work if I don’t have the Health warning. I don’t get any errors its just not drawing the text that tells you if your admin when I have the health warning. Any help would be appreciated.

your returning end on the whole function if the health is greater that 40. Just take it out so it becomes:



local ply = LocalPlayer()
if ply:Health() < 40 then
draw.SimpleText("Warning Low Health!", "ChatFont", 12, 760, Color(255, 0, 0, 255), 0, 0)
end
 
local ply = LocalPlayer()
if ply:IsAdmin() then
    draw.SimpleText("Admin", "ChatFont", 12, 800, Color(255, 255, 255, 255), 0, 0)
    else
    draw.SimpleText("Guest", "ScoreboardText", 12, 800, Color(255, 255, 255, 255), 0, 0)
end


Oh, that fixed it. Thank you for the help.