local startupFrame = CreateFrame("Frame")startupFrame:RegisterEvent("PLAYER_LOGIN")startupFrame:SetScript("OnEvent", function() -- Your code here.end)