There are already two Death Knight FightClasses you can try out:
http://wrobot.eu/files/file/642-335a-blood-dk-lvling/
http://wrobot.eu/files/file/610-335a-frost-dk-dps/
But here's some explanation of the code
for i=1, 6 do
This for loop goes through every rune slot number, starting from 1.
if GetRuneType(i) == 1 and select(1,GetRuneCooldown(i)) + select(2,GetRuneCooldown(i)) - GetTime() < 1
Calls the GetRuneType (http://wowprogramming.com/docs/api/GetRuneType) method, with a value of 1-6 (this is the rune slot ID), and checks if the function returns 1 (which is a blood rune).
select(1,GetRuneCooldown(i)) - (http://wowprogramming.com/docs/api/GetRuneCooldown) selects the start time of the cooldown
select(2,GetRuneCooldown(i)) - selects the duration of the cooldown.
if select(2,RuneCheck()) > 1 then return true end
checks the second parameter returned by RuneCheck() which is Unholy runes, while the first would be blood, 3rd would be frost, 4th would be Death runes.
Greater than one means that there has to be 2 unholy runes. It's the same as == 2.