Something like this should work for you then. Let me know if something doesn't work/not quite what you wanted still.
Resource:
Code:
function(unit, cache, textframe)
power=tonumber(UnitPower("Player"))
if power>=1000000 then
return tostring(floor(power/1000000)) .. "M"
elseif power>=1000 then
return tostring(floor(power/1000)) .. "K"
else
return power
end
end
Health:
Code:
function(unit, cache, textframe)
health=tonumber(UnitHealth("Player"))
if health>=1000000 then
return tostring(floor(health/1000000)) .. "M"
elseif health>=1000 then
return tostring(floor(health/1000)) .. "K"
else
return health
end
end