You can modify the code to store the frame in a global and check for the global before trying to create the frame. something like the following.
Lua Code:
/run local f=CRF or CreateFrame("Frame","CRF")f:SetScript("OnEvent",function(s,e,i,r)ConfirmLootRoll(i,r)s:UnregisterEvent(e)s:SetScript("OnEvent",nil)end)f:RegisterEvent"CONFIRM_LOOT_ROLL"RollOnLoot(1,2)