CharacterFrameInsetRight.speed = CharacterFrameInsetRight.text or CharacterFrameInsetRight:CreateFontString(nil, "ARTWORK");
CharacterFrameInsetRight.speed:SetPoint("BOTTOM", CharacterFrameInsetRight, "BOTTOM", 0, 20);
CharacterFrameInsetRight.speed:SetFontObject(NumberFontNormal);

function CharacterFrameInsetRight:OnUpdate(elapsed)
	local _, run, flight, swim = GetUnitSpeed("player");

	run = run / 7 * 100;
	flight = flight / 7 * 100;
	swim = swim / 7 * 100;

	local speed;
	if IsFlying("player") then
		speed = flight;
	elseif IsSwimming("player") then
		speed = swim;
	else
		speed = run;
	end

	CharacterFrameInsetRight.speed:SetText(string.format("Movement Speed: %d", speed));
end

CharacterFrameInsetRight:SetScript("OnUpdate", CharacterFrameInsetRight.OnUpdate);