if select(2, UnitClass("player")) ~= "PALADIN" then return end

local f = CreateFrame("Frame", nil, UIParent)

local text = UIParent:CreateFontString(nil, "OVERLAY")
text:SetPoint("CENTER", -108, -333)
text:SetFont("Interface\\AddOns\\HolyPowerCount\\media\\font.ttf", 33, "OUTLINEMONOCHROME")
text:SetTextColor(0, 1, .65)

local function SPELL_POWER_HOLY_POWER()
	Power = UnitPower("player", 9)

	if Power == 0 then
		text:SetText("")
	else
		text:SetText(Power)
	end
end

f:SetScript("OnEvent", SPELL_POWER_HOLY_POWER)
f:RegisterEvent("UNIT_POWER")
f:RegisterEvent("PLAYER_ENTERING_WORLD")
