void NameFormLoad(object sender, EventArgs e)
        {
            if (!File.Exists(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\" + GlobalVars.Config))
            {
                SecurityFuncs.GeneratePlayerID();
                SecurityFuncs.WriteConfigValues();
                SecurityFuncs.ReadConfigValues();
            }
            else
            {
                SecurityFuncs.ReadConfigValues();
            }
            textBox1.Text = GlobalVars.Name;

            string hatdir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\content\\hats";

            if (Directory.Exists(hatdir))
            {
                DirectoryInfo dinfo = new DirectoryInfo(hatdir);
                FileInfo[]    Files = dinfo.GetFiles("*.rbxm");
                foreach (FileInfo file in Files)
                {
                    if (file.Name.Equals(String.Empty))
                    {
                        continue;
                    }

                    listBox1.Items.Add(file.Name);
                }
                listBox1.SelectedItem = GlobalVars.HatName;
                Image icon1 = Image.FromFile(hatdir + @"\\" + GlobalVars.HatName.Replace(".rbxm", "") + ".png");
                pictureBox1.Image = icon1;
            }

            string mapdir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\maps";

            if (Directory.Exists(mapdir))
            {
                DirectoryInfo dinfo = new DirectoryInfo(mapdir);
                FileInfo[]    Files = dinfo.GetFiles("*.rbxl");
                foreach (FileInfo file in Files)
                {
                    listBox2.Items.Add(file.Name);
                }
                listBox2.SelectedItem = "Baseplate.rbxl";
            }

            PartSelectionLabel2.Text = SelectedPart;
            HeadButton1.BackColor    = ConvertStringtoColor(GlobalVars.ColorMenu_HeadColor);
            TorsoButton2.BackColor   = ConvertStringtoColor(GlobalVars.ColorMenu_TorsoColor);
            RArmButton3.BackColor    = ConvertStringtoColor(GlobalVars.ColorMenu_RightArmColor);
            LArmButton4.BackColor    = ConvertStringtoColor(GlobalVars.ColorMenu_LeftArmColor);
            RLegButton5.BackColor    = ConvertStringtoColor(GlobalVars.ColorMenu_RightLegColor);
            LLegButton6.BackColor    = ConvertStringtoColor(GlobalVars.ColorMenu_LeftLegColor);
        }
        void Button1Click(object sender, EventArgs e)
        {
            SecurityFuncs.WriteConfigValues();
            ScriptType type = ScriptType.Solo;

            ScriptGenerator.GenerateScriptForClient(type);
            bool IsValid = SecurityFuncs.checkClientMD5();

            if (IsValid == true)
            {
                //temp domain
                string exefile = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\Origins07_Client.exe";
                string quote   = "\"";
                string args    = "-script " + quote + Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + ScriptGenerator.GetScriptNameForType(type) + quote + " " + quote + Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\maps\\" + listBox2.SelectedItem.ToString() + quote;
                Process.Start(exefile, args);
                this.Close();
            }
            else
            {
                MessageBox.Show("The client has been detected as modified.", "Cannot Launch Game.", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
 protected override void OnFormClosing(FormClosingEventArgs e)
 {
     base.OnFormClosing(e);
     SecurityFuncs.WriteConfigValues();
 }
 protected override void OnFormClosing(FormClosingEventArgs e)
 {
     base.OnFormClosing(e);
     SecurityFuncs.WriteConfigValues();
     GlobalVars.ReadyToLaunch = true;
 }