You don't need to set the OnLoad script, that's only applicable when your frame is defined in XML
Lua Code:
print("HELLOOOOOOOO") -- This prints
local OnEvent = function(self, event, ...)
print(event)
end
local AddonParent = CreateFrame("Frame")
AddonParent:SetScript("OnEvent", OnEvent)
AddonParent:RegisterEvent("PLAYER_LOGIN")
AddonParent:RegisterEvent("PLAYER_ENTERING_WORLD")
AddonParent:RegisterEvent("ARENA_OPPONENT_UPDATE")