This commit is contained in:
Bitl 2018-12-03 14:18:00 -07:00
parent 7dd56f400d
commit cca5e66149
26 changed files with 1292 additions and 1111 deletions

View File

@ -152,7 +152,7 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
for i=1,3,1 do for i=1,3,1 do
local newHat = Instance.new("StringValue",newCharApp) local newHat = Instance.new("StringValue",newCharApp)
if (i == 1) then if (i == 1) then
if (RightLegColorID ~= nil) then if (Hat1ID ~= nil) then
newHat.Value = Hat1ID newHat.Value = Hat1ID
newHat.Name = Hat1ID newHat.Name = Hat1ID
else else
@ -160,7 +160,7 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
newHat.Name = "NoHat.rbxm" newHat.Name = "NoHat.rbxm"
end end
elseif (i == 2) then elseif (i == 2) then
if (RightLegColorID ~= nil) then if (Hat2ID ~= nil) then
newHat.Value = Hat2ID newHat.Value = Hat2ID
newHat.Name = Hat2ID newHat.Name = Hat2ID
else else
@ -168,7 +168,7 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
newHat.Name = "NoHat.rbxm" newHat.Name = "NoHat.rbxm"
end end
elseif (i == 3) then elseif (i == 3) then
if (RightLegColorID ~= nil) then if (Hat3ID ~= nil) then
newHat.Value = Hat3ID newHat.Value = Hat3ID
newHat.Name = Hat3ID newHat.Name = Hat3ID
else else

View File

@ -121,6 +121,9 @@ namespace NovetusLauncher
this.pictureBox7 = new System.Windows.Forms.PictureBox(); this.pictureBox7 = new System.Windows.Forms.PictureBox();
this.listBox7 = new System.Windows.Forms.ListBox(); this.listBox7 = new System.Windows.Forms.ListBox();
this.tabPage7 = new System.Windows.Forms.TabPage(); this.tabPage7 = new System.Windows.Forms.TabPage();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.button55 = new System.Windows.Forms.Button(); this.button55 = new System.Windows.Forms.Button();
this.label5 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
@ -1069,6 +1072,9 @@ namespace NovetusLauncher
// //
// tabPage7 // tabPage7
// //
this.tabPage7.Controls.Add(this.textBox1);
this.tabPage7.Controls.Add(this.label7);
this.tabPage7.Controls.Add(this.label6);
this.tabPage7.Controls.Add(this.button55); this.tabPage7.Controls.Add(this.button55);
this.tabPage7.Controls.Add(this.label5); this.tabPage7.Controls.Add(this.label5);
this.tabPage7.Controls.Add(this.label4); this.tabPage7.Controls.Add(this.label4);
@ -1080,14 +1086,41 @@ namespace NovetusLauncher
this.tabPage7.Name = "tabPage7"; this.tabPage7.Name = "tabPage7";
this.tabPage7.Size = new System.Drawing.Size(467, 241); this.tabPage7.Size = new System.Drawing.Size(467, 241);
this.tabPage7.TabIndex = 6; this.tabPage7.TabIndex = 6;
this.tabPage7.Text = "ICON"; this.tabPage7.Text = "OTHER";
this.tabPage7.UseVisualStyleBackColor = true; this.tabPage7.UseVisualStyleBackColor = true;
// //
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(113, 213);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(241, 20);
this.textBox1.TabIndex = 9;
this.textBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.textBox1.TextChanged += new System.EventHandler(this.TextBox1TextChanged);
//
// label7
//
this.label7.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label7.Location = new System.Drawing.Point(3, 185);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(461, 2);
this.label7.TabIndex = 8;
this.label7.Text = "label7";
//
// label6
//
this.label6.Location = new System.Drawing.Point(105, 191);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(257, 19);
this.label6.TabIndex = 7;
this.label6.Text = "Character Appearance URL (for clients that require it)";
this.label6.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// button55 // button55
// //
this.button55.Location = new System.Drawing.Point(48, 149); this.button55.Location = new System.Drawing.Point(113, 122);
this.button55.Name = "button55"; this.button55.Name = "button55";
this.button55.Size = new System.Drawing.Size(357, 23); this.button55.Size = new System.Drawing.Size(241, 23);
this.button55.TabIndex = 6; this.button55.TabIndex = 6;
this.button55.Text = "Disable Icon"; this.button55.Text = "Disable Icon";
this.button55.UseVisualStyleBackColor = true; this.button55.UseVisualStyleBackColor = true;
@ -1096,7 +1129,7 @@ namespace NovetusLauncher
// label5 // label5
// //
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label5.Location = new System.Drawing.Point(256, 14); this.label5.Location = new System.Drawing.Point(278, 9);
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(67, 28); this.label5.Size = new System.Drawing.Size(67, 28);
this.label5.TabIndex = 5; this.label5.TabIndex = 5;
@ -1104,11 +1137,11 @@ namespace NovetusLauncher
// //
// label4 // label4
// //
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label4.ForeColor = System.Drawing.Color.Red; this.label4.ForeColor = System.Drawing.Color.Red;
this.label4.Location = new System.Drawing.Point(48, 175); this.label4.Location = new System.Drawing.Point(66, 148);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(357, 52); this.label4.Size = new System.Drawing.Size(328, 33);
this.label4.TabIndex = 4; this.label4.TabIndex = 4;
this.label4.Text = "NOTE: The icon will only function in a client with a custom scoreboard (I.E Early" + this.label4.Text = "NOTE: The icon will only function in a client with a custom scoreboard (I.E Early" +
" 2011)"; " 2011)";
@ -1117,7 +1150,7 @@ namespace NovetusLauncher
// label3 // label3
// //
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.Location = new System.Drawing.Point(96, 14); this.label3.Location = new System.Drawing.Point(118, 9);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(163, 28); this.label3.Size = new System.Drawing.Size(163, 28);
this.label3.TabIndex = 3; this.label3.TabIndex = 3;
@ -1127,9 +1160,9 @@ namespace NovetusLauncher
// //
this.button54.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("button54.BackgroundImage"))); this.button54.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("button54.BackgroundImage")));
this.button54.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.button54.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.button54.Location = new System.Drawing.Point(302, 45); this.button54.Location = new System.Drawing.Point(278, 40);
this.button54.Name = "button54"; this.button54.Name = "button54";
this.button54.Size = new System.Drawing.Size(103, 98); this.button54.Size = new System.Drawing.Size(76, 76);
this.button54.TabIndex = 2; this.button54.TabIndex = 2;
this.button54.Text = "OBC"; this.button54.Text = "OBC";
this.button54.TextAlign = System.Drawing.ContentAlignment.BottomCenter; this.button54.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
@ -1140,9 +1173,9 @@ namespace NovetusLauncher
// //
this.button53.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("button53.BackgroundImage"))); this.button53.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("button53.BackgroundImage")));
this.button53.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.button53.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.button53.Location = new System.Drawing.Point(173, 45); this.button53.Location = new System.Drawing.Point(195, 40);
this.button53.Name = "button53"; this.button53.Name = "button53";
this.button53.Size = new System.Drawing.Size(103, 98); this.button53.Size = new System.Drawing.Size(76, 76);
this.button53.TabIndex = 1; this.button53.TabIndex = 1;
this.button53.Text = "TBC"; this.button53.Text = "TBC";
this.button53.TextAlign = System.Drawing.ContentAlignment.BottomCenter; this.button53.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
@ -1153,9 +1186,9 @@ namespace NovetusLauncher
// //
this.button52.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("button52.BackgroundImage"))); this.button52.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("button52.BackgroundImage")));
this.button52.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.button52.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.button52.Location = new System.Drawing.Point(48, 45); this.button52.Location = new System.Drawing.Point(113, 40);
this.button52.Name = "button52"; this.button52.Name = "button52";
this.button52.Size = new System.Drawing.Size(103, 98); this.button52.Size = new System.Drawing.Size(76, 76);
this.button52.TabIndex = 0; this.button52.TabIndex = 0;
this.button52.Text = "BC"; this.button52.Text = "BC";
this.button52.TextAlign = System.Drawing.ContentAlignment.BottomCenter; this.button52.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
@ -1164,9 +1197,9 @@ namespace NovetusLauncher
// //
// button43 // button43
// //
this.button43.Location = new System.Drawing.Point(406, 10); this.button43.Location = new System.Drawing.Point(415, 12);
this.button43.Name = "button43"; this.button43.Name = "button43";
this.button43.Size = new System.Drawing.Size(75, 19); this.button43.Size = new System.Drawing.Size(70, 19);
this.button43.TabIndex = 1; this.button43.TabIndex = 1;
this.button43.Text = "3D Preview"; this.button43.Text = "3D Preview";
this.button43.UseVisualStyleBackColor = true; this.button43.UseVisualStyleBackColor = true;
@ -1206,8 +1239,12 @@ namespace NovetusLauncher
this.tabPage6.ResumeLayout(false); this.tabPage6.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
this.tabPage7.ResumeLayout(false); this.tabPage7.ResumeLayout(false);
this.tabPage7.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
} }
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.ListBox listBox8; private System.Windows.Forms.ListBox listBox8;
private System.Windows.Forms.PictureBox pictureBox8; private System.Windows.Forms.PictureBox pictureBox8;
private System.Windows.Forms.Button button57; private System.Windows.Forms.Button button57;

View File

@ -96,6 +96,9 @@ namespace NovetusLauncher
//icon //icon
label5.Text = GlobalVars.Custom_Icon_Offline; label5.Text = GlobalVars.Custom_Icon_Offline;
//charid
textBox1.Text = GlobalVars.CharacterID;
//discord //discord
if (StartedVIAURI == false) if (StartedVIAURI == false)
@ -957,6 +960,7 @@ namespace NovetusLauncher
GlobalVars.RightArmColorID = 24; GlobalVars.RightArmColorID = 24;
GlobalVars.LeftLegColorID = 119; GlobalVars.LeftLegColorID = 119;
GlobalVars.RightLegColorID = 119; GlobalVars.RightLegColorID = 119;
GlobalVars.CharacterID = "";
GlobalVars.ColorMenu_HeadColor = "Color [A=255, R=245, G=205, B=47]"; GlobalVars.ColorMenu_HeadColor = "Color [A=255, R=245, G=205, B=47]";
GlobalVars.ColorMenu_TorsoColor = "Color [A=255, R=13, G=105, B=172]"; GlobalVars.ColorMenu_TorsoColor = "Color [A=255, R=13, G=105, B=172]";
GlobalVars.ColorMenu_LeftArmColor = "Color [A=255, R=245, G=205, B=47]"; GlobalVars.ColorMenu_LeftArmColor = "Color [A=255, R=245, G=205, B=47]";
@ -981,23 +985,7 @@ namespace NovetusLauncher
string mapfile = GlobalVars.BasePath + "\\charcustom\\preview\\content\\fonts\\3DView.rbxl"; string mapfile = GlobalVars.BasePath + "\\charcustom\\preview\\content\\fonts\\3DView.rbxl";
string rbxexe = GlobalVars.BasePath + "\\charcustom\\preview\\3DView.exe"; string rbxexe = GlobalVars.BasePath + "\\charcustom\\preview\\3DView.exe";
string quote = "\""; string quote = "\"";
string args = ""; string args = quote + mapfile + "\" -script \"dofile('" + luafile + "'); _G.CS3DView(0,'Player','" + GlobalVars.loadtext + ");" + quote;
if (GlobalVars.UsesPlayerName == true && GlobalVars.UsesID == true)
{
args = quote + mapfile + "\" -script \"dofile('" + luafile + "'); _G.CS3DView(" + GlobalVars.UserID + ",'" + GlobalVars.PlayerName + "','" + GlobalVars.loadtext + ");" + quote;
}
else if (GlobalVars.UsesPlayerName == false && GlobalVars.UsesID == true)
{
args = quote + mapfile + "\" -script \"dofile('" + luafile + "'); _G.CS3DView(" + GlobalVars.UserID + ",'Player','" + GlobalVars.loadtext + ");" + quote;
}
else if (GlobalVars.UsesPlayerName == true && GlobalVars.UsesID == false)
{
args = quote + mapfile + "\" -script \"dofile('" + luafile + "'); _G.CS3DView(0,'" + GlobalVars.PlayerName + "','" + GlobalVars.loadtext + ");" + quote;
}
else if (GlobalVars.UsesPlayerName == false && GlobalVars.UsesID == false )
{
args = quote + mapfile + "\" -script \"dofile('" + luafile + "'); _G.CS3DView(0,'Player','" + GlobalVars.loadtext + ");" + quote;
}
try try
{ {
Process client = new Process(); Process client = new Process();
@ -1035,5 +1023,10 @@ namespace NovetusLauncher
GlobalVars.Custom_Icon_Offline = "NBC"; GlobalVars.Custom_Icon_Offline = "NBC";
label5.Text = GlobalVars.Custom_Icon_Offline; label5.Text = GlobalVars.Custom_Icon_Offline;
} }
void TextBox1TextChanged(object sender, EventArgs e)
{
GlobalVars.CharacterID = textBox1.Text;
}
} }
} }

View File

@ -42,10 +42,6 @@ namespace NovetusLauncher
this.textBox1 = new System.Windows.Forms.TextBox(); this.textBox1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.checkBox5 = new System.Windows.Forms.CheckBox();
this.button3 = new System.Windows.Forms.Button();
this.checkBox3 = new System.Windows.Forms.CheckBox(); this.checkBox3 = new System.Windows.Forms.CheckBox();
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox(); this.textBox2 = new System.Windows.Forms.TextBox();
@ -55,13 +51,25 @@ namespace NovetusLauncher
this.checkBox4 = new System.Windows.Forms.CheckBox(); this.checkBox4 = new System.Windows.Forms.CheckBox();
this.checkBox6 = new System.Windows.Forms.CheckBox(); this.checkBox6 = new System.Windows.Forms.CheckBox();
this.checkBox7 = new System.Windows.Forms.CheckBox(); this.checkBox7 = new System.Windows.Forms.CheckBox();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.loadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.textBox4 = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.textBox5 = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.menuStrip1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// checkBox1 // checkBox1
// //
this.checkBox1.Location = new System.Drawing.Point(9, 34); this.checkBox1.Location = new System.Drawing.Point(12, 64);
this.checkBox1.Name = "checkBox1"; this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(307, 24); this.checkBox1.Size = new System.Drawing.Size(210, 24);
this.checkBox1.TabIndex = 0; this.checkBox1.TabIndex = 0;
this.checkBox1.Text = "Allows players to set custom names"; this.checkBox1.Text = "Allows players to set custom names";
this.checkBox1.UseVisualStyleBackColor = true; this.checkBox1.UseVisualStyleBackColor = true;
@ -69,9 +77,9 @@ namespace NovetusLauncher
// //
// checkBox2 // checkBox2
// //
this.checkBox2.Location = new System.Drawing.Point(9, 53); this.checkBox2.Location = new System.Drawing.Point(12, 84);
this.checkBox2.Name = "checkBox2"; this.checkBox2.Name = "checkBox2";
this.checkBox2.Size = new System.Drawing.Size(307, 20); this.checkBox2.Size = new System.Drawing.Size(210, 20);
this.checkBox2.TabIndex = 1; this.checkBox2.TabIndex = 1;
this.checkBox2.Text = "Allows the launcher to set custom IDs"; this.checkBox2.Text = "Allows the launcher to set custom IDs";
this.checkBox2.UseVisualStyleBackColor = true; this.checkBox2.UseVisualStyleBackColor = true;
@ -79,16 +87,17 @@ namespace NovetusLauncher
// //
// textBox1 // textBox1
// //
this.textBox1.Location = new System.Drawing.Point(9, 280); this.textBox1.Location = new System.Drawing.Point(10, 181);
this.textBox1.Multiline = true; this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1"; this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(310, 128); this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBox1.Size = new System.Drawing.Size(279, 60);
this.textBox1.TabIndex = 4; this.textBox1.TabIndex = 4;
this.textBox1.TextChanged += new System.EventHandler(this.TextBox1TextChanged); this.textBox1.TextChanged += new System.EventHandler(this.TextBox1TextChanged);
// //
// label1 // label1
// //
this.label1.Location = new System.Drawing.Point(8, 261); this.label1.Location = new System.Drawing.Point(10, 162);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(92, 16); this.label1.Size = new System.Drawing.Size(92, 16);
this.label1.TabIndex = 5; this.label1.TabIndex = 5;
@ -96,57 +105,17 @@ namespace NovetusLauncher
// //
// label2 // label2
// //
this.label2.Location = new System.Drawing.Point(8, 9); this.label2.Location = new System.Drawing.Point(10, 50);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(307, 30); this.label2.Size = new System.Drawing.Size(80, 17);
this.label2.TabIndex = 6; this.label2.TabIndex = 6;
this.label2.Text = "Check the checkboxes corresponding to what your client supports."; this.label2.Text = "Client Options:";
//
// button1
//
this.button1.Location = new System.Drawing.Point(167, 443);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(154, 30);
this.button1.TabIndex = 7;
this.button1.Text = "Save";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.Button1Click);
//
// button2
//
this.button2.Location = new System.Drawing.Point(8, 443);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(150, 30);
this.button2.TabIndex = 10;
this.button2.Text = "Load";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.Button2Click);
//
// checkBox5
//
this.checkBox5.Location = new System.Drawing.Point(9, 71);
this.checkBox5.Name = "checkBox5";
this.checkBox5.Size = new System.Drawing.Size(310, 20);
this.checkBox5.TabIndex = 11;
this.checkBox5.Text = "Loads assets from servers online";
this.checkBox5.UseVisualStyleBackColor = true;
this.checkBox5.CheckedChanged += new System.EventHandler(this.CheckBox5CheckedChanged);
//
// button3
//
this.button3.Location = new System.Drawing.Point(9, 414);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(312, 23);
this.button3.TabIndex = 12;
this.button3.Text = "New clientinfo.txt";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.Button3Click);
// //
// checkBox3 // checkBox3
// //
this.checkBox3.Location = new System.Drawing.Point(9, 89); this.checkBox3.Location = new System.Drawing.Point(12, 102);
this.checkBox3.Name = "checkBox3"; this.checkBox3.Name = "checkBox3";
this.checkBox3.Size = new System.Drawing.Size(306, 20); this.checkBox3.Size = new System.Drawing.Size(211, 20);
this.checkBox3.TabIndex = 13; this.checkBox3.TabIndex = 13;
this.checkBox3.Text = "Client uses a single EXE to run"; this.checkBox3.Text = "Client uses a single EXE to run";
this.checkBox3.UseVisualStyleBackColor = true; this.checkBox3.UseVisualStyleBackColor = true;
@ -154,7 +123,7 @@ namespace NovetusLauncher
// //
// label3 // label3
// //
this.label3.Location = new System.Drawing.Point(8, 155); this.label3.Location = new System.Drawing.Point(309, 52);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(92, 13); this.label3.Size = new System.Drawing.Size(92, 13);
this.label3.TabIndex = 14; this.label3.TabIndex = 14;
@ -162,7 +131,7 @@ namespace NovetusLauncher
// //
// textBox2 // textBox2
// //
this.textBox2.Location = new System.Drawing.Point(10, 171); this.textBox2.Location = new System.Drawing.Point(309, 68);
this.textBox2.Name = "textBox2"; this.textBox2.Name = "textBox2";
this.textBox2.ReadOnly = true; this.textBox2.ReadOnly = true;
this.textBox2.Size = new System.Drawing.Size(311, 20); this.textBox2.Size = new System.Drawing.Size(311, 20);
@ -171,7 +140,7 @@ namespace NovetusLauncher
// //
// textBox3 // textBox3
// //
this.textBox3.Location = new System.Drawing.Point(8, 210); this.textBox3.Location = new System.Drawing.Point(309, 107);
this.textBox3.Name = "textBox3"; this.textBox3.Name = "textBox3";
this.textBox3.ReadOnly = true; this.textBox3.ReadOnly = true;
this.textBox3.Size = new System.Drawing.Size(312, 20); this.textBox3.Size = new System.Drawing.Size(312, 20);
@ -180,7 +149,7 @@ namespace NovetusLauncher
// //
// label4 // label4
// //
this.label4.Location = new System.Drawing.Point(8, 194); this.label4.Location = new System.Drawing.Point(309, 91);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(92, 13); this.label4.Size = new System.Drawing.Size(92, 13);
this.label4.TabIndex = 17; this.label4.TabIndex = 17;
@ -188,9 +157,9 @@ namespace NovetusLauncher
// //
// button4 // button4
// //
this.button4.Location = new System.Drawing.Point(8, 236); this.button4.Location = new System.Drawing.Point(309, 140);
this.button4.Name = "button4"; this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(312, 22); this.button4.Size = new System.Drawing.Size(312, 29);
this.button4.TabIndex = 18; this.button4.TabIndex = 18;
this.button4.Text = "Get MD5s from client directory"; this.button4.Text = "Get MD5s from client directory";
this.button4.UseVisualStyleBackColor = true; this.button4.UseVisualStyleBackColor = true;
@ -198,7 +167,7 @@ namespace NovetusLauncher
// //
// checkBox4 // checkBox4
// //
this.checkBox4.Location = new System.Drawing.Point(271, 34); this.checkBox4.Location = new System.Drawing.Point(239, 64);
this.checkBox4.Name = "checkBox4"; this.checkBox4.Name = "checkBox4";
this.checkBox4.Size = new System.Drawing.Size(50, 24); this.checkBox4.Size = new System.Drawing.Size(50, 24);
this.checkBox4.TabIndex = 19; this.checkBox4.TabIndex = 19;
@ -209,9 +178,9 @@ namespace NovetusLauncher
// //
// checkBox6 // checkBox6
// //
this.checkBox6.Location = new System.Drawing.Point(9, 105); this.checkBox6.Location = new System.Drawing.Point(12, 120);
this.checkBox6.Name = "checkBox6"; this.checkBox6.Name = "checkBox6";
this.checkBox6.Size = new System.Drawing.Size(307, 26); this.checkBox6.Size = new System.Drawing.Size(262, 21);
this.checkBox6.TabIndex = 20; this.checkBox6.TabIndex = 20;
this.checkBox6.Text = "Fix Scripts and Map Loading for 2007-Early 2008"; this.checkBox6.Text = "Fix Scripts and Map Loading for 2007-Early 2008";
this.checkBox6.UseVisualStyleBackColor = true; this.checkBox6.UseVisualStyleBackColor = true;
@ -219,20 +188,123 @@ namespace NovetusLauncher
// //
// checkBox7 // checkBox7
// //
this.checkBox7.Location = new System.Drawing.Point(9, 125); this.checkBox7.Location = new System.Drawing.Point(12, 137);
this.checkBox7.Name = "checkBox7"; this.checkBox7.Name = "checkBox7";
this.checkBox7.Size = new System.Drawing.Size(307, 24); this.checkBox7.Size = new System.Drawing.Size(262, 22);
this.checkBox7.TabIndex = 21; this.checkBox7.TabIndex = 21;
this.checkBox7.Text = "Already has security options"; this.checkBox7.Text = "Already has security options";
this.checkBox7.UseVisualStyleBackColor = true; this.checkBox7.UseVisualStyleBackColor = true;
this.checkBox7.CheckedChanged += new System.EventHandler(this.CheckBox7CheckedChanged); this.checkBox7.CheckedChanged += new System.EventHandler(this.CheckBox7CheckedChanged);
// //
// menuStrip1
//
this.menuStrip1.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(632, 24);
this.menuStrip1.TabIndex = 22;
this.menuStrip1.Text = "menuStrip1";
//
// fileToolStripMenuItem
//
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.newToolStripMenuItem,
this.loadToolStripMenuItem,
this.saveToolStripMenuItem});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
this.fileToolStripMenuItem.Text = "File";
//
// newToolStripMenuItem
//
this.newToolStripMenuItem.Name = "newToolStripMenuItem";
this.newToolStripMenuItem.Size = new System.Drawing.Size(100, 22);
this.newToolStripMenuItem.Text = "New";
this.newToolStripMenuItem.Click += new System.EventHandler(this.NewToolStripMenuItemClick);
//
// loadToolStripMenuItem
//
this.loadToolStripMenuItem.Name = "loadToolStripMenuItem";
this.loadToolStripMenuItem.Size = new System.Drawing.Size(100, 22);
this.loadToolStripMenuItem.Text = "Load";
this.loadToolStripMenuItem.Click += new System.EventHandler(this.LoadToolStripMenuItemClick);
//
// saveToolStripMenuItem
//
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
this.saveToolStripMenuItem.Size = new System.Drawing.Size(100, 22);
this.saveToolStripMenuItem.Text = "Save";
this.saveToolStripMenuItem.Click += new System.EventHandler(this.SaveToolStripMenuItemClick);
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(309, 204);
this.textBox4.Multiline = true;
this.textBox4.Name = "textBox4";
this.textBox4.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBox4.Size = new System.Drawing.Size(311, 101);
this.textBox4.TabIndex = 23;
this.textBox4.TextChanged += new System.EventHandler(this.TextBox4TextChanged);
//
// label5
//
this.label5.Location = new System.Drawing.Point(308, 185);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(143, 16);
this.label5.TabIndex = 24;
this.label5.Text = "Client Command Arguments";
//
// label6
//
this.label6.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.label6.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label6.Location = new System.Drawing.Point(0, 28);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(632, 2);
this.label6.TabIndex = 25;
//
// button1
//
this.button1.Location = new System.Drawing.Point(309, 311);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(311, 21);
this.button1.TabIndex = 26;
this.button1.Text = "Documentation";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.Button1Click);
//
// textBox5
//
this.textBox5.Location = new System.Drawing.Point(10, 263);
this.textBox5.Multiline = true;
this.textBox5.Name = "textBox5";
this.textBox5.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBox5.Size = new System.Drawing.Size(279, 60);
this.textBox5.TabIndex = 27;
this.textBox5.TextChanged += new System.EventHandler(this.TextBox5TextChanged);
//
// label7
//
this.label7.Location = new System.Drawing.Point(10, 244);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(100, 16);
this.label7.TabIndex = 28;
this.label7.Text = "Warning (if needed)";
//
// ClientinfoEditor // ClientinfoEditor
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.ControlLightLight; this.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.ClientSize = new System.Drawing.Size(332, 485); this.ClientSize = new System.Drawing.Size(632, 341);
this.Controls.Add(this.label7);
this.Controls.Add(this.textBox5);
this.Controls.Add(this.button1);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.textBox4);
this.Controls.Add(this.checkBox7); this.Controls.Add(this.checkBox7);
this.Controls.Add(this.checkBox6); this.Controls.Add(this.checkBox6);
this.Controls.Add(this.checkBox4); this.Controls.Add(this.checkBox4);
@ -242,24 +314,35 @@ namespace NovetusLauncher
this.Controls.Add(this.textBox2); this.Controls.Add(this.textBox2);
this.Controls.Add(this.label3); this.Controls.Add(this.label3);
this.Controls.Add(this.checkBox3); this.Controls.Add(this.checkBox3);
this.Controls.Add(this.button3);
this.Controls.Add(this.checkBox5);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.label2); this.Controls.Add(this.label2);
this.Controls.Add(this.label1); this.Controls.Add(this.label1);
this.Controls.Add(this.textBox1); this.Controls.Add(this.textBox1);
this.Controls.Add(this.checkBox2); this.Controls.Add(this.checkBox2);
this.Controls.Add(this.checkBox1); this.Controls.Add(this.checkBox1);
this.Controls.Add(this.menuStrip1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
this.MaximizeBox = false; this.MaximizeBox = false;
this.Name = "ClientinfoEditor"; this.Name = "ClientinfoEditor";
this.Text = "Novetus Client SDK"; this.Text = "Novetus Client SDK";
this.Load += new System.EventHandler(this.ClientinfoCreatorLoad); this.Load += new System.EventHandler(this.ClientinfoCreatorLoad);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
} }
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem loadToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.CheckBox checkBox7; private System.Windows.Forms.CheckBox checkBox7;
private System.Windows.Forms.CheckBox checkBox6; private System.Windows.Forms.CheckBox checkBox6;
private System.Windows.Forms.CheckBox checkBox4; private System.Windows.Forms.CheckBox checkBox4;
@ -269,10 +352,6 @@ namespace NovetusLauncher
private System.Windows.Forms.TextBox textBox2; private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label3;
private System.Windows.Forms.CheckBox checkBox3; private System.Windows.Forms.CheckBox checkBox3;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.CheckBox checkBox5;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.TextBox textBox1;

View File

@ -23,7 +23,7 @@ namespace NovetusLauncher
//clientinfocreator //clientinfocreator
private bool UsesPlayerName = false; private bool UsesPlayerName = false;
private bool UsesID = false; private bool UsesID = false;
private bool LoadsAssetsOnline = false; private string Warning = "";
private string SelectedClientDesc = ""; private string SelectedClientDesc = "";
private bool LegacyMode = false; private bool LegacyMode = false;
private string SelectedClientMD5 = ""; private string SelectedClientMD5 = "";
@ -32,6 +32,7 @@ namespace NovetusLauncher
private bool Locked = false; private bool Locked = false;
private bool FixScriptMapMode = false; private bool FixScriptMapMode = false;
private bool AlreadyHasSecurity = false; private bool AlreadyHasSecurity = false;
private string CustomArgs = "";
public ClientinfoEditor() public ClientinfoEditor()
{ {
@ -74,127 +75,6 @@ namespace NovetusLauncher
SelectedClientDesc = textBox1.Text; SelectedClientDesc = textBox1.Text;
} }
void Button2Click(object sender, EventArgs e)
{
using (var ofd = new OpenFileDialog())
{
ofd.Filter = "Text files (*.txt)|*.txt";
ofd.FilterIndex = 2;
ofd.FileName = "clientinfo.txt";
ofd.Title = "Load clientinfo.txt";
if (ofd.ShowDialog() == DialogResult.OK)
{
string line1;
string Decryptline1, Decryptline2, Decryptline3, Decryptline4, Decryptline5, Decryptline6, Decryptline7, Decryptline8, Decryptline9, Decryptline10;
using(StreamReader reader = new StreamReader(ofd.FileName))
{
SelectedClientInfoPath = Path.GetDirectoryName(ofd.FileName);
line1 = reader.ReadLine();
}
if (!SecurityFuncs.IsBase64String(line1))
return;
string ConvertedLine = SecurityFuncs.Base64Decode(line1);
string[] result = ConvertedLine.Split('|');
Decryptline1 = SecurityFuncs.Base64Decode(result[0]);
Decryptline2 = SecurityFuncs.Base64Decode(result[1]);
Decryptline3 = SecurityFuncs.Base64Decode(result[2]);
Decryptline4 = SecurityFuncs.Base64Decode(result[3]);
Decryptline5 = SecurityFuncs.Base64Decode(result[4]);
Decryptline6 = SecurityFuncs.Base64Decode(result[5]);
Decryptline7 = SecurityFuncs.Base64Decode(result[6]);
Decryptline8 = SecurityFuncs.Base64Decode(result[7]);
Decryptline9 = SecurityFuncs.Base64Decode(result[8]);
Decryptline10 = SecurityFuncs.Base64Decode(result[9]);
if (GlobalVars.AdminMode != true)
{
Boolean bline8 = Convert.ToBoolean(Decryptline8);
if (bline8 == true)
{
MessageBox.Show("This client is locked and therefore it cannot be loaded.","Novetus Launcher - Error when loading client", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
else
{
Locked = bline8;
checkBox4.Checked = false;
}
}
else
{
Boolean bline8 = Convert.ToBoolean(Decryptline8);
Locked = bline8;
checkBox4.Checked = false;
}
Boolean bline1 = Convert.ToBoolean(Decryptline1);
UsesPlayerName = bline1;
Boolean bline2 = Convert.ToBoolean(Decryptline2);
UsesID = bline2;
Boolean bline3 = Convert.ToBoolean(Decryptline3);
LoadsAssetsOnline = bline3;
Boolean bline4 = Convert.ToBoolean(Decryptline4);
LegacyMode = bline4;
SelectedClientMD5 = Decryptline5;
SelectedClientScriptMD5 = Decryptline6;
SelectedClientDesc = Decryptline7;
bool bline9 = Convert.ToBoolean(Decryptline9);
FixScriptMapMode = bline9;
bool bline10 = Convert.ToBoolean(Decryptline10);
AlreadyHasSecurity = bline10;
checkBox1.Checked = UsesPlayerName;
checkBox2.Checked = UsesID;
checkBox5.Checked = LoadsAssetsOnline;
checkBox3.Checked = LegacyMode;
checkBox6.Checked = FixScriptMapMode;
checkBox7.Checked = AlreadyHasSecurity;
textBox3.Text = SelectedClientScriptMD5.ToUpper();
textBox2.Text = SelectedClientMD5.ToUpper();
textBox1.Text = SelectedClientDesc;
}
}
}
void Button1Click(object sender, EventArgs e)
{
using (var sfd = new SaveFileDialog())
{
sfd.Filter = "Text files (*.txt)|*.txt";
sfd.FilterIndex = 2;
sfd.FileName = "clientinfo.txt";
sfd.Title = "Save clientinfo.txt";
if (sfd.ShowDialog() == DialogResult.OK)
{
string[] lines = {
SecurityFuncs.Base64Encode(UsesPlayerName.ToString()),
SecurityFuncs.Base64Encode(UsesID.ToString()),
SecurityFuncs.Base64Encode(LoadsAssetsOnline.ToString()),
SecurityFuncs.Base64Encode(LegacyMode.ToString()),
SecurityFuncs.Base64Encode(SelectedClientMD5.ToString()),
SecurityFuncs.Base64Encode(SelectedClientScriptMD5.ToString()),
SecurityFuncs.Base64Encode(SelectedClientDesc.ToString()),
SecurityFuncs.Base64Encode(Locked.ToString()),
SecurityFuncs.Base64Encode(FixScriptMapMode.ToString()),
SecurityFuncs.Base64Encode(AlreadyHasSecurity.ToString())
};
File.WriteAllText(sfd.FileName, SecurityFuncs.Base64Encode(string.Join("|",lines)));
}
}
}
void ClientinfoCreatorLoad(object sender, EventArgs e) void ClientinfoCreatorLoad(object sender, EventArgs e)
{ {
if (GlobalVars.AdminMode == true) if (GlobalVars.AdminMode == true)
@ -207,40 +87,6 @@ namespace NovetusLauncher
} }
} }
void CheckBox5CheckedChanged(object sender, EventArgs e)
{
if (checkBox5.Checked == true)
{
LoadsAssetsOnline = true;
}
else if (checkBox5.Checked == false)
{
LoadsAssetsOnline = false;
}
}
void Button3Click(object sender, EventArgs e)
{
UsesPlayerName = false;
UsesID = false;
LoadsAssetsOnline = false;
LegacyMode = false;
FixScriptMapMode = false;
AlreadyHasSecurity = false;
SelectedClientDesc = "";
SelectedClientMD5 = "";
SelectedClientScriptMD5 = "";
checkBox1.Checked = UsesPlayerName;
checkBox2.Checked = UsesID;
checkBox5.Checked = LoadsAssetsOnline;
checkBox3.Checked = LegacyMode;
checkBox6.Checked = FixScriptMapMode;
checkBox7.Checked = AlreadyHasSecurity;
textBox3.Text = SelectedClientScriptMD5.ToUpper();
textBox2.Text = SelectedClientMD5.ToUpper();
textBox1.Text = SelectedClientDesc;
}
void CheckBox3CheckedChanged(object sender, EventArgs e) void CheckBox3CheckedChanged(object sender, EventArgs e)
{ {
if (checkBox3.Checked == true) if (checkBox3.Checked == true)
@ -267,6 +113,15 @@ namespace NovetusLauncher
void Button4Click(object sender, EventArgs e) void Button4Click(object sender, EventArgs e)
{ {
if (string.IsNullOrWhiteSpace(SelectedClientInfoPath))
{
FolderBrowserDialog folderBrowserDialog1 = new FolderBrowserDialog();
if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
{
SelectedClientInfoPath = folderBrowserDialog1.SelectedPath;
}
}
string ClientName = ""; string ClientName = "";
if (!LegacyMode) if (!LegacyMode)
@ -340,5 +195,171 @@ namespace NovetusLauncher
AlreadyHasSecurity = false; AlreadyHasSecurity = false;
} }
} }
void NewToolStripMenuItemClick(object sender, EventArgs e)
{
UsesPlayerName = false;
UsesID = false;
Warning = "";
LegacyMode = false;
FixScriptMapMode = false;
AlreadyHasSecurity = false;
SelectedClientDesc = "";
SelectedClientMD5 = "";
SelectedClientScriptMD5 = "";
SelectedClientInfoPath = "";
CustomArgs = "";
checkBox1.Checked = UsesPlayerName;
checkBox2.Checked = UsesID;
checkBox3.Checked = LegacyMode;
checkBox6.Checked = FixScriptMapMode;
checkBox7.Checked = AlreadyHasSecurity;
textBox3.Text = SelectedClientScriptMD5.ToUpper();
textBox2.Text = SelectedClientMD5.ToUpper();
textBox1.Text = SelectedClientDesc;
textBox4.Text = CustomArgs;
textBox5.Text = Warning;
}
void LoadToolStripMenuItemClick(object sender, EventArgs e)
{
using (var ofd = new OpenFileDialog())
{
ofd.Filter = "Text files (*.txt)|*.txt";
ofd.FilterIndex = 2;
ofd.FileName = "clientinfo.txt";
ofd.Title = "Load clientinfo.txt";
if (ofd.ShowDialog() == DialogResult.OK)
{
string line1;
string Decryptline1, Decryptline2, Decryptline3, Decryptline4, Decryptline5, Decryptline6, Decryptline7, Decryptline8, Decryptline9, Decryptline10, Decryptline11;
using(StreamReader reader = new StreamReader(ofd.FileName))
{
SelectedClientInfoPath = Path.GetDirectoryName(ofd.FileName);
line1 = reader.ReadLine();
}
if (!SecurityFuncs.IsBase64String(line1))
return;
string ConvertedLine = SecurityFuncs.Base64Decode(line1);
string[] result = ConvertedLine.Split('|');
Decryptline1 = SecurityFuncs.Base64Decode(result[0]);
Decryptline2 = SecurityFuncs.Base64Decode(result[1]);
Decryptline3 = SecurityFuncs.Base64Decode(result[2]);
Decryptline4 = SecurityFuncs.Base64Decode(result[3]);
Decryptline5 = SecurityFuncs.Base64Decode(result[4]);
Decryptline6 = SecurityFuncs.Base64Decode(result[5]);
Decryptline7 = SecurityFuncs.Base64Decode(result[6]);
Decryptline8 = SecurityFuncs.Base64Decode(result[7]);
Decryptline9 = SecurityFuncs.Base64Decode(result[8]);
Decryptline10 = SecurityFuncs.Base64Decode(result[9]);
Decryptline11 = SecurityFuncs.Base64Decode(result[10]);
if (GlobalVars.AdminMode != true)
{
Boolean bline8 = Convert.ToBoolean(Decryptline8);
if (bline8 == true)
{
MessageBox.Show("This client is locked and therefore it cannot be loaded.","Novetus Launcher - Error when loading client", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
else
{
Locked = bline8;
checkBox4.Checked = Locked;
}
}
else
{
Boolean bline8 = Convert.ToBoolean(Decryptline8);
Locked = bline8;
checkBox4.Checked = Locked;
}
Boolean bline1 = Convert.ToBoolean(Decryptline1);
UsesPlayerName = bline1;
Boolean bline2 = Convert.ToBoolean(Decryptline2);
UsesID = bline2;
Warning = Decryptline3;
Boolean bline4 = Convert.ToBoolean(Decryptline4);
LegacyMode = bline4;
SelectedClientMD5 = Decryptline5;
SelectedClientScriptMD5 = Decryptline6;
SelectedClientDesc = Decryptline7;
bool bline9 = Convert.ToBoolean(Decryptline9);
FixScriptMapMode = bline9;
bool bline10 = Convert.ToBoolean(Decryptline10);
AlreadyHasSecurity = bline10;
CustomArgs = Decryptline11;
checkBox1.Checked = UsesPlayerName;
checkBox2.Checked = UsesID;
checkBox3.Checked = LegacyMode;
checkBox6.Checked = FixScriptMapMode;
checkBox7.Checked = AlreadyHasSecurity;
textBox3.Text = SelectedClientScriptMD5.ToUpper();
textBox2.Text = SelectedClientMD5.ToUpper();
textBox1.Text = SelectedClientDesc;
textBox4.Text = CustomArgs;
textBox5.Text = Warning;
}
}
}
void SaveToolStripMenuItemClick(object sender, EventArgs e)
{
using (var sfd = new SaveFileDialog())
{
sfd.Filter = "Text files (*.txt)|*.txt";
sfd.FilterIndex = 2;
sfd.FileName = "clientinfo.txt";
sfd.Title = "Save clientinfo.txt";
if (sfd.ShowDialog() == DialogResult.OK)
{
string[] lines = {
SecurityFuncs.Base64Encode(UsesPlayerName.ToString()),
SecurityFuncs.Base64Encode(UsesID.ToString()),
SecurityFuncs.Base64Encode(Warning.ToString()),
SecurityFuncs.Base64Encode(LegacyMode.ToString()),
SecurityFuncs.Base64Encode(SelectedClientMD5.ToString()),
SecurityFuncs.Base64Encode(SelectedClientScriptMD5.ToString()),
SecurityFuncs.Base64Encode(SelectedClientDesc.ToString()),
SecurityFuncs.Base64Encode(Locked.ToString()),
SecurityFuncs.Base64Encode(FixScriptMapMode.ToString()),
SecurityFuncs.Base64Encode(AlreadyHasSecurity.ToString()),
SecurityFuncs.Base64Encode(CustomArgs.ToString())
};
File.WriteAllText(sfd.FileName, SecurityFuncs.Base64Encode(string.Join("|",lines)));
SelectedClientInfoPath = Path.GetDirectoryName(sfd.FileName);
}
}
}
void TextBox4TextChanged(object sender, EventArgs e)
{
CustomArgs = textBox4.Text;
}
void Button1Click(object sender, EventArgs e)
{
MessageBox.Show(File.ReadAllText("documentation.txt"), "Novetus Client SDK | Documentation", MessageBoxButtons.OK);
}
void TextBox5TextChanged(object sender, EventArgs e)
{
Warning = textBox5.Text;
}
} }
} }

View File

@ -117,6 +117,9 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>

View File

@ -20,6 +20,8 @@ using System.Text.RegularExpressions;
using Microsoft.Win32; using Microsoft.Win32;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Security.Principal; using System.Security.Principal;
using System.Linq;
using System.ComponentModel;
namespace NovetusLauncher namespace NovetusLauncher
{ {
@ -112,7 +114,7 @@ namespace NovetusLauncher
public static void ReadCustomizationValues(string cfgpath) public static void ReadCustomizationValues(string cfgpath)
{ {
string line1; string line1;
string Decryptline1, Decryptline2, Decryptline3, Decryptline4, Decryptline5, Decryptline6, Decryptline7, Decryptline8, Decryptline9, Decryptline10, Decryptline11, Decryptline12, Decryptline13, Decryptline14, Decryptline15, Decryptline16, Decryptline17, Decryptline18, Decryptline19, Decryptline20, Decryptline21; string Decryptline1, Decryptline2, Decryptline3, Decryptline4, Decryptline5, Decryptline6, Decryptline7, Decryptline8, Decryptline9, Decryptline10, Decryptline11, Decryptline12, Decryptline13, Decryptline14, Decryptline15, Decryptline16, Decryptline17, Decryptline18, Decryptline19, Decryptline20, Decryptline21, Decryptline22;
using(StreamReader reader = new StreamReader(cfgpath)) using(StreamReader reader = new StreamReader(cfgpath))
{ {
@ -145,6 +147,7 @@ namespace NovetusLauncher
Decryptline19 = SecurityFuncs.Base64Decode(result[18]); Decryptline19 = SecurityFuncs.Base64Decode(result[18]);
Decryptline20 = SecurityFuncs.Base64Decode(result[19]); Decryptline20 = SecurityFuncs.Base64Decode(result[19]);
Decryptline21 = SecurityFuncs.Base64Decode(result[20]); Decryptline21 = SecurityFuncs.Base64Decode(result[20]);
Decryptline22 = SecurityFuncs.Base64Decode(result[21]);
GlobalVars.Custom_Hat1ID_Offline = Decryptline1; GlobalVars.Custom_Hat1ID_Offline = Decryptline1;
GlobalVars.Custom_Hat2ID_Offline = Decryptline2; GlobalVars.Custom_Hat2ID_Offline = Decryptline2;
@ -182,6 +185,8 @@ namespace NovetusLauncher
GlobalVars.Custom_Pants_Offline = Decryptline20; GlobalVars.Custom_Pants_Offline = Decryptline20;
GlobalVars.Custom_Icon_Offline = Decryptline21; GlobalVars.Custom_Icon_Offline = Decryptline21;
GlobalVars.CharacterID = Decryptline22;
ReloadLoadtextValue(); ReloadLoadtextValue();
} }
@ -208,7 +213,8 @@ namespace NovetusLauncher
SecurityFuncs.Base64Encode(GlobalVars.Custom_T_Shirt_Offline.ToString()), SecurityFuncs.Base64Encode(GlobalVars.Custom_T_Shirt_Offline.ToString()),
SecurityFuncs.Base64Encode(GlobalVars.Custom_Shirt_Offline.ToString()), SecurityFuncs.Base64Encode(GlobalVars.Custom_Shirt_Offline.ToString()),
SecurityFuncs.Base64Encode(GlobalVars.Custom_Pants_Offline.ToString()), SecurityFuncs.Base64Encode(GlobalVars.Custom_Pants_Offline.ToString()),
SecurityFuncs.Base64Encode(GlobalVars.Custom_Icon_Offline.ToString()) SecurityFuncs.Base64Encode(GlobalVars.Custom_Icon_Offline.ToString()),
SecurityFuncs.Base64Encode(GlobalVars.CharacterID.ToString())
}; };
File.WriteAllText(cfgpath, SecurityFuncs.Base64Encode(string.Join("|",lines))); File.WriteAllText(cfgpath, SecurityFuncs.Base64Encode(string.Join("|",lines)));
@ -232,6 +238,7 @@ namespace NovetusLauncher
GlobalVars.RightArmColorID = 24; GlobalVars.RightArmColorID = 24;
GlobalVars.LeftLegColorID = 119; GlobalVars.LeftLegColorID = 119;
GlobalVars.RightLegColorID = 119; GlobalVars.RightLegColorID = 119;
GlobalVars.CharacterID = "";
GlobalVars.ColorMenu_HeadColor = "Color [A=255, R=245, G=205, B=47]"; GlobalVars.ColorMenu_HeadColor = "Color [A=255, R=245, G=205, B=47]";
GlobalVars.ColorMenu_TorsoColor = "Color [A=255, R=13, G=105, B=172]"; GlobalVars.ColorMenu_TorsoColor = "Color [A=255, R=13, G=105, B=172]";
GlobalVars.ColorMenu_LeftArmColor = "Color [A=255, R=245, G=205, B=47]"; GlobalVars.ColorMenu_LeftArmColor = "Color [A=255, R=245, G=205, B=47]";
@ -263,7 +270,7 @@ namespace NovetusLauncher
public static void ReadClientValues(string clientpath) public static void ReadClientValues(string clientpath)
{ {
string line1; string line1;
string Decryptline1, Decryptline2, Decryptline3, Decryptline4, Decryptline5, Decryptline6, Decryptline7, Decryptline9, Decryptline10;; string Decryptline1, Decryptline2, Decryptline3, Decryptline4, Decryptline5, Decryptline6, Decryptline7, Decryptline9, Decryptline10, Decryptline11;
using(StreamReader reader = new StreamReader(clientpath)) using(StreamReader reader = new StreamReader(clientpath))
{ {
@ -284,6 +291,7 @@ namespace NovetusLauncher
Decryptline7 = SecurityFuncs.Base64Decode(result[6]); Decryptline7 = SecurityFuncs.Base64Decode(result[6]);
Decryptline9 = SecurityFuncs.Base64Decode(result[8]); Decryptline9 = SecurityFuncs.Base64Decode(result[8]);
Decryptline10 = SecurityFuncs.Base64Decode(result[9]); Decryptline10 = SecurityFuncs.Base64Decode(result[9]);
Decryptline11 = SecurityFuncs.Base64Decode(result[10]);
bool bline1 = Convert.ToBoolean(Decryptline1); bool bline1 = Convert.ToBoolean(Decryptline1);
GlobalVars.UsesPlayerName = bline1; GlobalVars.UsesPlayerName = bline1;
@ -291,8 +299,7 @@ namespace NovetusLauncher
bool bline2 = Convert.ToBoolean(Decryptline2); bool bline2 = Convert.ToBoolean(Decryptline2);
GlobalVars.UsesID = bline2; GlobalVars.UsesID = bline2;
bool bline3 = Convert.ToBoolean(Decryptline3); GlobalVars.Warning = Decryptline3;
GlobalVars.LoadsAssetsOnline = bline3;
bool bline4 = Convert.ToBoolean(Decryptline4); bool bline4 = Convert.ToBoolean(Decryptline4);
GlobalVars.LegacyMode = bline4; GlobalVars.LegacyMode = bline4;
@ -308,6 +315,8 @@ namespace NovetusLauncher
bool bline10 = Convert.ToBoolean(Decryptline10); bool bline10 = Convert.ToBoolean(Decryptline10);
GlobalVars.AlreadyHasSecurity = bline10; GlobalVars.AlreadyHasSecurity = bline10;
GlobalVars.CustomArgs = Decryptline11;
} }
public static void GeneratePlayerID() public static void GeneratePlayerID()
@ -528,6 +537,9 @@ namespace NovetusLauncher
/// </summary> /// </summary>
public class SecurityFuncs public class SecurityFuncs
{ {
[DllImport("user32.dll")]
static extern int SetWindowText(IntPtr hWnd, string text);
public SecurityFuncs() public SecurityFuncs()
{ {
} }
@ -568,7 +580,7 @@ namespace NovetusLauncher
public static bool checkClientMD5(string client) public static bool checkClientMD5(string client)
{ {
if (GlobalVars.AdminMode != true) if (GlobalVars.AdminMode != true || GlobalVars.AlreadyHasSecurity != true)
{ {
string rbxexe = ""; string rbxexe = "";
if (GlobalVars.LegacyMode == true) if (GlobalVars.LegacyMode == true)
@ -604,7 +616,7 @@ namespace NovetusLauncher
public static bool checkScriptMD5(string client) public static bool checkScriptMD5(string client)
{ {
if (GlobalVars.AdminMode != true) if (GlobalVars.AdminMode != true|| GlobalVars.AlreadyHasSecurity != true)
{ {
string rbxscript = GlobalVars.BasePath + "\\clients\\" + client + "\\content\\scripts\\" + GlobalVars.ScriptName + ".lua"; string rbxscript = GlobalVars.BasePath + "\\clients\\" + client + "\\content\\scripts\\" + GlobalVars.ScriptName + ".lua";
using (var md5 = MD5.Create()) using (var md5 = MD5.Create())
@ -648,6 +660,38 @@ namespace NovetusLauncher
return WindowsIdentity.GetCurrent().Owner.IsWellKnown(WellKnownSidType.BuiltinAdministratorsSid); return WindowsIdentity.GetCurrent().Owner.IsWellKnown(WellKnownSidType.BuiltinAdministratorsSid);
} }
} }
public static string RandomString(int length)
{
CryptoRandom random = new CryptoRandom();
const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
return new string(Enumerable.Repeat(chars, length).Select(s => s[random.Next(s.Length)]).ToArray());
}
public static void RenameWindow(Process exe, ScriptGenerator.ScriptType type)
{
int time = 1000;
BackgroundWorker worker = new BackgroundWorker();
worker.DoWork += (obj, e) => WorkerDoWork(exe, type, time);
worker.RunWorkerAsync();
}
private static void WorkerDoWork(Process exe, ScriptGenerator.ScriptType type, int time)
{
if (exe.IsRunning() == true)
{
while (exe.IsRunning() == true)
{
SetWindowText(exe.MainWindowHandle, "Novetus - " + GlobalVars.SelectedClient + " " + ScriptGenerator.GetNameForType(type) + " [" + RandomString(12) + "]");
Thread.Sleep(time);
}
}
else
{
Thread.Sleep(time);
RenameWindow(exe, type);
}
}
} }
public static class RichTextBoxExtensions public static class RichTextBoxExtensions
@ -663,6 +707,17 @@ namespace NovetusLauncher
} }
} }
public static class ProcessExtensions
{
public static bool IsRunning(this Process process)
{
try {Process.GetProcessById(process.Id);}
catch (InvalidOperationException) { return false; }
catch (ArgumentException){return false;}
return true;
}
}
public class CryptoRandom : RandomNumberGenerator public class CryptoRandom : RandomNumberGenerator
{ {
private static RandomNumberGenerator r; private static RandomNumberGenerator r;
@ -730,7 +785,8 @@ namespace NovetusLauncher
Client = 0, Client = 0,
Server = 1, Server = 1,
Solo = 2, Solo = 2,
Studio = 3 Studio = 3,
None = 4
} }
public static string GetScriptFuncForType(ScriptType type, string client) public static string GetScriptFuncForType(ScriptType type, string client)
@ -809,6 +865,30 @@ namespace NovetusLauncher
} }
} }
public static string GetNameForType(ScriptType type)
{
if (type == ScriptType.Client)
{
return "Client";
}
else if (type == ScriptType.Server)
{
return "Server";
}
else if (type == ScriptType.Solo)
{
return "Play Solo";
}
else if (type == ScriptType.Studio)
{
return "Studio";
}
else
{
return "";
}
}
/* /*
public static string[] GetScriptContents(string scriptPath) public static string[] GetScriptContents(string scriptPath)
{ {
@ -956,13 +1036,131 @@ namespace NovetusLauncher
} }
} }
public class ClientScript
{
private static string hatdir = "rbxasset://../../../charcustom/hats/";
private static string facedir = "rbxasset://../../../charcustom/faces/";
private static string headdir = "rbxasset://../../../charcustom/heads/";
private static string tshirtdir = "rbxasset://../../../charcustom/tshirts/";
private static string shirtdir = "rbxasset://../../../charcustom/shirts/";
private static string pantsdir = "rbxasset://../../../charcustom/pants/";
public static string GetArgsFromTag(string code, string tag, string endtag)
{
int pFrom = code.IndexOf(tag) + tag.Length;
int pTo = code.LastIndexOf(endtag);
string result = code.Substring(pFrom, pTo - pFrom);
return result;
}
public static ScriptGenerator.ScriptType GetTypeFromTag(string tag, string endtag)
{
if (tag.Contains("client") && endtag.Contains("client"))
{
return ScriptGenerator.ScriptType.Client;
}
else if (tag.Contains("server") && endtag.Contains("server") || tag.Contains("no3d") && endtag.Contains("no3d"))
{
return ScriptGenerator.ScriptType.Server;
}
else if (tag.Contains("solo") && endtag.Contains("solo"))
{
return ScriptGenerator.ScriptType.Solo;
}
else if (tag.Contains("studio") && endtag.Contains("studio"))
{
return ScriptGenerator.ScriptType.Studio;
}
else
{
return ScriptGenerator.ScriptType.None;
}
}
public static int ConvertIconStringToInt()
{
if (GlobalVars.Custom_Icon_Offline == "BC")
{
return 1;
}
else if (GlobalVars.Custom_Icon_Offline == "TBC")
{
return 2;
}
else if (GlobalVars.Custom_Icon_Offline == "OBC")
{
return 3;
}
else if (GlobalVars.Custom_Icon_Offline == "NBC")
{
return 0;
}
return 0;
}
public static string CompileScript(string code, string tag, string endtag, string mapfile, string luafile, string rbxexe)
{
if (GlobalVars.FixScriptMapMode)
{
ScriptGenerator.GenerateScriptForClient(GetTypeFromTag(tag, endtag), GlobalVars.SelectedClient);
}
string extractedCode = GetArgsFromTag(code, tag, endtag);
string md5dir = GlobalVars.AlreadyHasSecurity != true ? SecurityFuncs.CalculateMD5(Assembly.GetExecutingAssembly().Location) : "";
string md5script = GlobalVars.AlreadyHasSecurity != true ? SecurityFuncs.CalculateMD5(GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + @"\\content\\scripts\\" + GlobalVars.ScriptName + ".lua") : "";
string md5exe = GlobalVars.AlreadyHasSecurity != true ? SecurityFuncs.CalculateMD5(rbxexe) : "";
string compiled = extractedCode.Replace("%mapfile%",mapfile)
.Replace("%luafile%",luafile)
.Replace("%charapp%",GlobalVars.CharacterID)
.Replace("%ip%",GlobalVars.IP)
.Replace("%port%",GlobalVars.RobloxPort.ToString())
.Replace("%name%",GlobalVars.PlayerName)
.Replace("%icone%",ConvertIconStringToInt().ToString())
.Replace("%icon%",GlobalVars.Custom_Icon_Offline)
.Replace("%id%",GlobalVars.UserID.ToString())
.Replace("%face%",GlobalVars.Custom_Face_Offline)
.Replace("%head%",GlobalVars.Custom_Head_Offline)
.Replace("%tshirt%",GlobalVars.Custom_T_Shirt_Offline)
.Replace("%shirt%",GlobalVars.Custom_Shirt_Offline)
.Replace("%pants%",GlobalVars.Custom_Pants_Offline)
.Replace("%hat1%",GlobalVars.Custom_Hat1ID_Offline)
.Replace("%hat2%",GlobalVars.Custom_Hat2ID_Offline)
.Replace("%hat3%",GlobalVars.Custom_Hat3ID_Offline)
.Replace("%faced%",facedir + GlobalVars.Custom_Face_Offline)
.Replace("%headd%",headdir + GlobalVars.Custom_Head_Offline)
.Replace("%tshirtd%",tshirtdir + GlobalVars.Custom_T_Shirt_Offline)
.Replace("%shirtd%",shirtdir + GlobalVars.Custom_Shirt_Offline)
.Replace("%pantsd%",pantsdir + GlobalVars.Custom_Pants_Offline)
.Replace("%hat1d%",hatdir + GlobalVars.Custom_Hat1ID_Offline)
.Replace("%hat2d%",hatdir + GlobalVars.Custom_Hat2ID_Offline)
.Replace("%hat3d%",hatdir + GlobalVars.Custom_Hat3ID_Offline)
.Replace("%headcolor%",GlobalVars.HeadColorID.ToString())
.Replace("%torsocolor%",GlobalVars.TorsoColorID.ToString())
.Replace("%larmcolor%",GlobalVars.LeftArmColorID.ToString())
.Replace("%llegcolor%",GlobalVars.LeftLegColorID.ToString())
.Replace("%rarmcolor%",GlobalVars.RightArmColorID.ToString())
.Replace("%rlegcolor%",GlobalVars.RightLegColorID.ToString())
.Replace("%rlegcolor%",GlobalVars.SelectedClientMD5)
.Replace("%md5launcher%",md5dir)
.Replace("%md5script%",GlobalVars.SelectedClientMD5)
.Replace("%md5exe%",GlobalVars.SelectedClientScriptMD5)
.Replace("%md5scriptd%",md5script)
.Replace("%md5exed%",md5exe)
.Replace("%limit%",GlobalVars.PlayerLimit.ToString());
return compiled;
}
}
public static class GlobalVars public static class GlobalVars
{ {
public static string BasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); public static string BasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
public static string ClientDir = (BasePath + "\\clients").Replace(@"\",@"\\"); public static string ClientDir = (BasePath + "\\clients").Replace(@"\",@"\\");
public static string MapsDir = (BasePath + "\\maps").Replace(@"\",@"\\"); public static string MapsDir = (BasePath + "\\maps").Replace(@"\",@"\\");
public static string CustomPlayerDir = (BasePath + "\\charcustom").Replace(@"\",@"\\"); public static string CustomPlayerDir = (BasePath + "\\charcustom").Replace(@"\",@"\\");
public static string AddonDir = (BasePath + "\\addons").Replace(@"\",@"\\");
public static string IP = "localhost"; public static string IP = "localhost";
public static string Version = ""; public static string Version = "";
public static string SharedArgs = ""; public static string SharedArgs = "";
@ -989,12 +1187,13 @@ namespace NovetusLauncher
public static bool UsesPlayerName = false; public static bool UsesPlayerName = false;
public static bool UsesID = true; public static bool UsesID = true;
public static string SelectedClientDesc = ""; public static string SelectedClientDesc = "";
public static bool LoadsAssetsOnline = false; public static string Warning = "";
public static bool LegacyMode = false; public static bool LegacyMode = false;
public static string SelectedClientMD5 = ""; public static string SelectedClientMD5 = "";
public static string SelectedClientScriptMD5 = ""; public static string SelectedClientScriptMD5 = "";
public static bool FixScriptMapMode = false; public static bool FixScriptMapMode = false;
public static bool AlreadyHasSecurity = false; public static bool AlreadyHasSecurity = false;
public static string CustomArgs = "";
//charcustom //charcustom
public static string Custom_Hat1ID_Offline = "NoHat.rbxm"; public static string Custom_Hat1ID_Offline = "NoHat.rbxm";
public static string Custom_Hat2ID_Offline = "NoHat.rbxm"; public static string Custom_Hat2ID_Offline = "NoHat.rbxm";
@ -1012,6 +1211,7 @@ namespace NovetusLauncher
public static int LeftLegColorID = 119; public static int LeftLegColorID = 119;
public static int RightLegColorID = 119; public static int RightLegColorID = 119;
public static string loadtext = ""; public static string loadtext = "";
public static string CharacterID ="";
//color menu. //color menu.
public static string ColorMenu_HeadColor = "Color [A=255, R=245, G=205, B=47]"; public static string ColorMenu_HeadColor = "Color [A=255, R=245, G=205, B=47]";
public static string ColorMenu_TorsoColor = "Color [A=255, R=13, G=105, B=172]"; public static string ColorMenu_TorsoColor = "Color [A=255, R=13, G=105, B=172]";

View File

@ -77,25 +77,31 @@ namespace NovetusLauncher
} }
string quote = "\""; string quote = "\"";
string args = ""; string args = "";
if (!GlobalVars.FixScriptMapMode) if (GlobalVars.CustomArgs.Equals("%args%"))
{ {
args = "-script " + quote + "dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Client, client) + quote; if (!GlobalVars.FixScriptMapMode)
{
args = "-script " + quote + "dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Client, client) + quote;
}
else
{
ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.Client, client);
args = "-script " + quote + luafile + quote;
}
} }
else else
{ {
ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.Client, client); args = ClientScript.CompileScript(GlobalVars.CustomArgs, "<client>", "</client>", "", luafile, rbxexe);
args = "-script " + quote + luafile + quote;
} }
try try
{ {
if (!GlobalVars.AlreadyHasSecurity) if (!GlobalVars.AdminMode || !GlobalVars.AlreadyHasSecurity)
{ {
if (SecurityFuncs.checkClientMD5(client) == true) if (SecurityFuncs.checkClientMD5(client) == true)
{ {
if (SecurityFuncs.checkScriptMD5(client) == true) if (SecurityFuncs.checkScriptMD5(client) == true)
{ {
Process.Start(rbxexe, args); LaunchClient(rbxexe,args);
this.Close();
} }
else else
{ {
@ -109,8 +115,7 @@ namespace NovetusLauncher
} }
else else
{ {
Process.Start(rbxexe, args); LaunchClient(rbxexe,args);
this.Close();
} }
} }
catch (Exception) catch (Exception)
@ -119,6 +124,35 @@ namespace NovetusLauncher
} }
} }
private void LaunchClient(string rbxexe, string args)
{
Process clientproc = new Process();
clientproc.StartInfo.FileName = rbxexe;
clientproc.StartInfo.Arguments = args;
clientproc.EnableRaisingEvents = true;
clientproc.Exited += new EventHandler(ClientExited);
clientproc.Start();
SecurityFuncs.RenameWindow(clientproc, ScriptGenerator.ScriptType.Client);
GlobalVars.presence.largeImageKey = GlobalVars.imagekey_large;
GlobalVars.presence.details = "";
GlobalVars.presence.state = "In " + GlobalVars.SelectedClient + " Game";
GlobalVars.presence.startTimestamp = SecurityFuncs.UnixTimeNow();
GlobalVars.presence.largeImageText = GlobalVars.PlayerName + " | In " + GlobalVars.SelectedClient + " Game";
DiscordRpc.UpdatePresence(ref GlobalVars.presence);
this.Visible = false;
}
void ClientExited(object sender, EventArgs e)
{
GlobalVars.presence.largeImageKey = GlobalVars.imagekey_large;
GlobalVars.presence.state = "In Launcher";
GlobalVars.presence.details = "Selected " + GlobalVars.SelectedClient;
GlobalVars.presence.startTimestamp = SecurityFuncs.UnixTimeNow();
GlobalVars.presence.largeImageText = GlobalVars.PlayerName + " | In Launcher";
DiscordRpc.UpdatePresence(ref GlobalVars.presence);
this.Close();
}
private void CheckIfFinished(object state) private void CheckIfFinished(object state)
{ {
if (GlobalVars.ReadyToLaunch == false) if (GlobalVars.ReadyToLaunch == false)

View File

@ -583,7 +583,6 @@ namespace NovetusLauncher
this.label30.Name = "label30"; this.label30.Name = "label30";
this.label30.Size = new System.Drawing.Size(378, 51); this.label30.Size = new System.Drawing.Size(378, 51);
this.label30.TabIndex = 3; this.label30.TabIndex = 3;
this.label30.Text = resources.GetString("label30.Text");
this.label30.TextAlign = System.Drawing.ContentAlignment.TopCenter; this.label30.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.label30.Visible = false; this.label30.Visible = false;
// //

View File

@ -144,7 +144,7 @@ namespace NovetusLauncher
if (GlobalVars.CloseOnLaunch == true) if (GlobalVars.CloseOnLaunch == true)
{ {
this.Close(); this.Visible = false;
} }
} }
@ -155,7 +155,7 @@ namespace NovetusLauncher
if (GlobalVars.CloseOnLaunch == true) if (GlobalVars.CloseOnLaunch == true)
{ {
this.Close(); this.Visible = false;
} }
} }
@ -169,7 +169,7 @@ namespace NovetusLauncher
StartStudio(); StartStudio();
if (GlobalVars.CloseOnLaunch == true) if (GlobalVars.CloseOnLaunch == true)
{ {
this.Close(); this.Visible = false;
} }
} }
@ -325,14 +325,15 @@ namespace NovetusLauncher
GlobalVars.LocalPlayMode = false; GlobalVars.LocalPlayMode = false;
} }
if (GlobalVars.LoadsAssetsOnline == false) if (!string.IsNullOrWhiteSpace(GlobalVars.Warning))
{
label30.Text = GlobalVars.Warning;
label30.Visible = true;
}
else
{ {
label30.Visible = false; label30.Visible = false;
} }
else if (GlobalVars.LoadsAssetsOnline == true)
{
label30.Visible = true;
}
textBox6.Text = GlobalVars.SelectedClientDesc; textBox6.Text = GlobalVars.SelectedClientDesc;
label26.Text = GlobalVars.SelectedClient; label26.Text = GlobalVars.SelectedClient;
@ -524,7 +525,7 @@ namespace NovetusLauncher
if (GlobalVars.CloseOnLaunch == true) if (GlobalVars.CloseOnLaunch == true)
{ {
this.Close(); this.Visible = false;
} }
} }
@ -535,7 +536,7 @@ namespace NovetusLauncher
if (GlobalVars.CloseOnLaunch == true) if (GlobalVars.CloseOnLaunch == true)
{ {
this.Close(); this.Visible = false;
} }
} }
@ -636,55 +637,38 @@ namespace NovetusLauncher
} }
string quote = "\""; string quote = "\"";
string args = ""; string args = "";
if (!GlobalVars.FixScriptMapMode) if (GlobalVars.CustomArgs.Equals("%args%"))
{ {
args = "-script " + quote + "dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Client, GlobalVars.SelectedClient) + quote; if (!GlobalVars.FixScriptMapMode)
{
args = "-script " + quote + "dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Client, GlobalVars.SelectedClient) + quote;
}
else
{
ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.Client, GlobalVars.SelectedClient);
args = "-script " + quote + luafile + quote;
}
} }
else else
{ {
ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.Client, GlobalVars.SelectedClient); args = ClientScript.CompileScript(GlobalVars.CustomArgs, "<client>", "</client>", "", luafile, rbxexe);
args = "-script " + quote + luafile + quote;
} }
try try
{ {
ConsolePrint("Client Loaded.", 4); ConsolePrint("Client Loaded.", 4);
if (!GlobalVars.AlreadyHasSecurity) if (!GlobalVars.AdminMode || !GlobalVars.AlreadyHasSecurity)
{ {
if (SecurityFuncs.checkClientMD5(GlobalVars.SelectedClient) == true) if (SecurityFuncs.checkClientMD5(GlobalVars.SelectedClient) == true)
{ {
if (SecurityFuncs.checkScriptMD5(GlobalVars.SelectedClient) == true) if (SecurityFuncs.checkScriptMD5(GlobalVars.SelectedClient) == true)
{ {
Process client = new Process(); OpenClient(rbxexe,args);
client.StartInfo.FileName = rbxexe;
client.StartInfo.Arguments = args;
client.EnableRaisingEvents = true;
ReadClientValues(GlobalVars.SelectedClient);
client.Exited += new EventHandler(ClientExited);
client.Start();
GlobalVars.presence.largeImageKey = GlobalVars.imagekey_large;
GlobalVars.presence.details = "";
GlobalVars.presence.state = "In " + GlobalVars.SelectedClient + " Game";
GlobalVars.presence.startTimestamp = SecurityFuncs.UnixTimeNow();
GlobalVars.presence.largeImageText = GlobalVars.PlayerName + " | In " + GlobalVars.SelectedClient + " Game";
DiscordRpc.UpdatePresence(ref GlobalVars.presence);
} }
} }
} }
else else
{ {
Process client = new Process(); OpenClient(rbxexe,args);
client.StartInfo.FileName = rbxexe;
client.StartInfo.Arguments = args;
client.EnableRaisingEvents = true;
ReadClientValues(GlobalVars.SelectedClient);
client.Exited += new EventHandler(ClientExited);
client.Start();
GlobalVars.presence.largeImageKey = GlobalVars.imagekey_large;
GlobalVars.presence.details = "";
GlobalVars.presence.state = "In " + GlobalVars.SelectedClient + " Game";
GlobalVars.presence.startTimestamp = SecurityFuncs.UnixTimeNow();
GlobalVars.presence.largeImageText = GlobalVars.PlayerName + " | In " + GlobalVars.SelectedClient + " Game";
DiscordRpc.UpdatePresence(ref GlobalVars.presence);
} }
} }
catch (Exception ex) catch (Exception ex)
@ -694,6 +678,24 @@ namespace NovetusLauncher
} }
} }
void OpenClient(string rbxexe, string args)
{
Process client = new Process();
client.StartInfo.FileName = rbxexe;
client.StartInfo.Arguments = args;
client.EnableRaisingEvents = true;
ReadClientValues(GlobalVars.SelectedClient);
client.Exited += new EventHandler(ClientExited);
client.Start();
SecurityFuncs.RenameWindow(client, ScriptGenerator.ScriptType.Client);
GlobalVars.presence.largeImageKey = GlobalVars.imagekey_large;
GlobalVars.presence.details = "";
GlobalVars.presence.state = "In " + GlobalVars.SelectedClient + " Game";
GlobalVars.presence.startTimestamp = SecurityFuncs.UnixTimeNow();
GlobalVars.presence.largeImageText = GlobalVars.PlayerName + " | In " + GlobalVars.SelectedClient + " Game";
DiscordRpc.UpdatePresence(ref GlobalVars.presence);
}
void ClientExited(object sender, EventArgs e) void ClientExited(object sender, EventArgs e)
{ {
GlobalVars.presence.largeImageKey = GlobalVars.imagekey_large; GlobalVars.presence.largeImageKey = GlobalVars.imagekey_large;
@ -702,6 +704,10 @@ namespace NovetusLauncher
GlobalVars.presence.startTimestamp = SecurityFuncs.UnixTimeNow(); GlobalVars.presence.startTimestamp = SecurityFuncs.UnixTimeNow();
GlobalVars.presence.largeImageText = GlobalVars.PlayerName + " | In Launcher"; GlobalVars.presence.largeImageText = GlobalVars.PlayerName + " | In Launcher";
DiscordRpc.UpdatePresence(ref GlobalVars.presence); DiscordRpc.UpdatePresence(ref GlobalVars.presence);
if (GlobalVars.CloseOnLaunch == true)
{
this.Visible = true;
}
} }
void StartSolo() void StartSolo()
@ -727,14 +733,21 @@ namespace NovetusLauncher
} }
string quote = "\""; string quote = "\"";
string args = ""; string args = "";
if (!GlobalVars.FixScriptMapMode) if (GlobalVars.CustomArgs.Equals("%args%"))
{ {
args = quote + mapfile + "\" -script \"dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Solo, GlobalVars.SelectedClient) + quote; if (!GlobalVars.FixScriptMapMode)
{
args = quote + mapfile + "\" -script \"dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Solo, GlobalVars.SelectedClient) + quote;
}
else
{
ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.Solo, GlobalVars.SelectedClient);
args = "-script " + quote + luafile + quote + " " + quote + mapfile + quote;
}
} }
else else
{ {
ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.Solo, GlobalVars.SelectedClient); args = ClientScript.CompileScript(GlobalVars.CustomArgs, "<solo>", "</solo>", mapfile, luafile, rbxexe);
args = "-script " + quote + luafile + quote + " " + quote + mapfile + quote;
} }
try try
{ {
@ -746,6 +759,7 @@ namespace NovetusLauncher
ReadClientValues(GlobalVars.SelectedClient); ReadClientValues(GlobalVars.SelectedClient);
client.Exited += new EventHandler(StudioExited); client.Exited += new EventHandler(StudioExited);
client.Start(); client.Start();
SecurityFuncs.RenameWindow(client, ScriptGenerator.ScriptType.Solo);
GlobalVars.presence.largeImageKey = GlobalVars.imagekey_large; GlobalVars.presence.largeImageKey = GlobalVars.imagekey_large;
GlobalVars.presence.details = GlobalVars.Map; GlobalVars.presence.details = GlobalVars.Map;
GlobalVars.presence.state = "In " + GlobalVars.SelectedClient + " Solo Game"; GlobalVars.presence.state = "In " + GlobalVars.SelectedClient + " Solo Game";
@ -783,20 +797,41 @@ namespace NovetusLauncher
} }
string quote = "\""; string quote = "\"";
string args = ""; string args = "";
if (!GlobalVars.FixScriptMapMode) if (GlobalVars.CustomArgs.Equals("%args%"))
{ {
args = quote + mapfile + "\" -script \"dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Server, GlobalVars.SelectedClient) + quote + (no3d ? " -no3d" : ""); if (!GlobalVars.FixScriptMapMode)
{
args = quote + mapfile + "\" -script \"dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Server, GlobalVars.SelectedClient) + quote + (no3d ? " -no3d" : "");
}
else
{
ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.Server, GlobalVars.SelectedClient);
args = "-script " + quote + luafile + quote + (no3d ? " -no3d" : "") + " " + quote + mapfile + quote;
}
} }
else else
{ {
ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.Server, GlobalVars.SelectedClient); if (!no3d)
args = "-script " + quote + luafile + quote + (no3d ? " -no3d" : "") + " " + quote + mapfile + quote; {
args = ClientScript.CompileScript(GlobalVars.CustomArgs, "<server>", "</server>", mapfile, luafile, rbxexe);
}
else
{
args = ClientScript.CompileScript(GlobalVars.CustomArgs, "<no3d>", "</no3d>", mapfile, luafile, rbxexe);
}
} }
try try
{ {
//when we add upnp, change this //when we add upnp, change this
ConsolePrint("Server Loaded.", 4); ConsolePrint("Server Loaded.", 4);
Process.Start(rbxexe, args); Process client = new Process();
client.StartInfo.FileName = rbxexe;
client.StartInfo.Arguments = args;
client.EnableRaisingEvents = true;
ReadClientValues(GlobalVars.SelectedClient);
client.Exited += new EventHandler(ServerExited);
client.Start();
SecurityFuncs.RenameWindow(client, ScriptGenerator.ScriptType.Server);
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -805,6 +840,14 @@ namespace NovetusLauncher
} }
} }
void ServerExited(object sender, EventArgs e)
{
if (GlobalVars.CloseOnLaunch == true)
{
this.Visible = true;
}
}
void StartStudio() void StartStudio()
{ {
string luafile = ""; string luafile = "";
@ -828,14 +871,21 @@ namespace NovetusLauncher
} }
string quote = "\""; string quote = "\"";
string args = ""; string args = "";
if (!GlobalVars.FixScriptMapMode) if (GlobalVars.CustomArgs.Equals("%args%"))
{ {
args = quote + mapfile + "\" -script \"dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Studio, GlobalVars.SelectedClient) + quote; if (!GlobalVars.FixScriptMapMode)
{
args = quote + mapfile + "\" -script \"dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Studio, GlobalVars.SelectedClient) + quote;
}
else
{
ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.Studio, GlobalVars.SelectedClient);
args = "-script " + quote + luafile + quote + " " + quote + mapfile + quote;
}
} }
else else
{ {
ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.Studio, GlobalVars.SelectedClient); args = ClientScript.CompileScript(GlobalVars.CustomArgs, "<studio>", "</studio>", mapfile, luafile, rbxexe);
args = "-script " + quote + luafile + quote + " " + quote + mapfile + quote;
} }
try try
{ {
@ -847,6 +897,7 @@ namespace NovetusLauncher
ReadClientValues(GlobalVars.SelectedClient); ReadClientValues(GlobalVars.SelectedClient);
client.Exited += new EventHandler(StudioExited); client.Exited += new EventHandler(StudioExited);
client.Start(); client.Start();
SecurityFuncs.RenameWindow(client, ScriptGenerator.ScriptType.Studio);
GlobalVars.presence.largeImageKey = GlobalVars.imagekey_large; GlobalVars.presence.largeImageKey = GlobalVars.imagekey_large;
GlobalVars.presence.details = GlobalVars.Map; GlobalVars.presence.details = GlobalVars.Map;
GlobalVars.presence.state = "In " + GlobalVars.SelectedClient + " Studio"; GlobalVars.presence.state = "In " + GlobalVars.SelectedClient + " Studio";
@ -869,6 +920,10 @@ namespace NovetusLauncher
GlobalVars.presence.startTimestamp = SecurityFuncs.UnixTimeNow(); GlobalVars.presence.startTimestamp = SecurityFuncs.UnixTimeNow();
GlobalVars.presence.largeImageText = GlobalVars.PlayerName + " | In Launcher"; GlobalVars.presence.largeImageText = GlobalVars.PlayerName + " | In Launcher";
DiscordRpc.UpdatePresence(ref GlobalVars.presence); DiscordRpc.UpdatePresence(ref GlobalVars.presence);
if (GlobalVars.CloseOnLaunch == true)
{
this.Visible = true;
}
} }
void ConsoleProcessCommands(string command) void ConsoleProcessCommands(string command)

View File

@ -45800,9 +45800,6 @@
- If you tried to connect to the server and you get an error, REJOIN THE SERVER. - If you tried to connect to the server and you get an error, REJOIN THE SERVER.
</value> </value>
</data> </data>
<data name="label30.Text" xml:space="preserve">
<value>WARNING: This client loads assets directly from a server. This means that you may not be able to play it over a LAN or local connection without internet access. This may also mean that some things won't load (i.e the healthbar)</value>
</data>
<data name="pictureBox2.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="pictureBox2.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAB9AAAAfQCAYAAACaOMR5AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAB9AAAAfQCAYAAACaOMR5AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8

View File

@ -72,7 +72,7 @@ namespace NovetusLauncher
{ {
try try
{ {
ipAddress = wc.DownloadString("http://icanhazip.com/"); ipAddress = wc.DownloadString("http://ipv4.icanhazip.com/");
} }
catch (Exception) catch (Exception)
{ {

View File

@ -106,112 +106,72 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
end end
end end
function KickPlayer(Player,reason)
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: "..reason
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: "..reason)
end
function LoadSecurity(playerApp,Player,ServerSecurityLocation) function LoadSecurity(playerApp,Player,ServerSecurityLocation)
local function kick()
KickPlayer(Player, "Modified Client")
end
if (playerApp==nil) then if (playerApp==nil) then
local message = Instance.new("Message") kick()
message.Text = "You were kicked. Reason: Modified Client" return
message.Parent = Player end
wait(2)
Player:remove() if (not playerApp:FindFirstChild("ClientEXEMD5") or not playerApp:FindFirstChild("LauncherMD5") or not playerApp:FindFirstChild("ClientScriptMD5")) then
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client") kick()
else return
if ((playerApp:GetChildren() ~= 0) or (playerApp:GetChildren() ~= nil)) then end
for _,newVal in pairs(playerApp:GetChildren()) do
if (playerApp:FindFirstChild("ClientEXEMD5")) then for _,newVal in pairs(playerApp:GetChildren()) do
if ((newVal.Name == "ClientEXEMD5")) then if (newVal.Name == "ClientEXEMD5") then
if ((newVal.Value ~= ServerSecurityLocation.Security.ClientEXEMD5.Value) or (newVal.Value == nil) or (newVal.Value == "")) then if (newVal.Value ~= ServerSecurityLocation.Security.ClientEXEMD5.Value) then
local message = Instance.new("Message") kick()
message.Text = "You were kicked. Reason: Modified Client" end
message.Parent = Player end
wait(2)
Player:remove() if (newVal.Name == "LauncherMD5") then
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client") if (newVal.Value ~= ServerSecurityLocation.Security.LauncherMD5.Value) then
end kick()
end end
else end
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client" if (newVal.Name == "ClientScriptMD5") then
message.Parent = Player if (newVal.Value ~= ServerSecurityLocation.Security.ClientScriptMD5.Value) then
wait(2) kick()
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
if (playerApp:FindFirstChild("LauncherMD5")) then
if ((newVal.Name == "LauncherMD5")) then
if ((newVal.Value ~= ServerSecurityLocation.Security.LauncherMD5.Value) or (newVal.Value == nil) or (newVal.Value == "")) then
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
end
else
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
if (playerApp:FindFirstChild("ClientScriptMD5")) then
if ((newVal.Name == "ClientScriptMD5")) then
if ((newVal.Value ~= ServerSecurityLocation.Security.ClientScriptMD5.Value) or (newVal.Value == nil) or (newVal.Value == "")) then
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
end
else
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
end end
else
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end end
end end
end end
function InitalizeSecurityValues(Location,ClientEXEMD5,LauncherMD5,ClientScriptMD5) function InitalizeSecurityValues(Location,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
local newCharApp = Instance.new("IntValue",Location) Location = Instance.new("IntValue", Location)
newCharApp.Name = "Security" Location.Name = "Security"
local newClientMD5 = Instance.new("StringValue",newCharApp)
if (ClientEXEMD5 ~= nil) then local clientValue = Instance.new("StringValue", Location)
newClientMD5.Value = ClientEXEMD5 clientValue.Value = ClientEXEMD5 or ""
else clientValue.Name = "ClientEXEMD5"
newClientMD5.Value = ""
end local launcherValue = Instance.new("StringValue", Location)
newClientMD5.Name = "ClientEXEMD5" launcherValue.Value = LauncherMD5 or ""
local newLauncherMD5 = Instance.new("StringValue",newCharApp) launcherValue.Name = "LauncherMD5"
if (LauncherMD5 ~= nil) then
newLauncherMD5.Value = LauncherMD5 local scriptValue = Instance.new("StringValue", Location)
else scriptValue.Value = ClientScriptMD5 or ""
newLauncherMD5.Value = "" scriptValue.Name = "ClientScriptMD5"
end end
newLauncherMD5.Name = "LauncherMD5"
local newClientScriptMD5 = Instance.new("StringValue",newCharApp) function InitalizeClientName(Location)
if (ClientScriptMD5 ~= nil) then local newName = Instance.new("StringValue",Location)
newClientScriptMD5.Value = ClientScriptMD5 newName.Value = "2006S"
else newName.Name = "Name"
newClientScriptMD5.Value = ""
end
newClientScriptMD5.Name = "ClientScriptMD5"
end end
rbxversion = version() rbxversion = version()
@ -223,44 +183,47 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Remo
Server:start(Port, 20) Server:start(Port, 20)
RunService:run() RunService:run()
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
game:GetService("Players").MaxPlayers = PlayerLimit PlayerService = game:GetService("Players")
game:GetService("Players").PlayerAdded:connect(function(Player) PlayerService.MaxPlayers = PlayerLimit
if (game:GetService("Players").NumPlayers > game:GetService("Players").MaxPlayers) then PlayerService.PlayerAdded:connect(function(Player)
local message = Instance.new("Message") Player.Chatted:connect(function(msg)
message.Text = "You were kicked. Reason: Too many players on server." print(Player.Name.."; "..msg)
message.Parent = Player end)
wait(2)
Player:remove() if (PlayerService.NumPlayers > PlayerService.MaxPlayers) then
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Too many players on server.") KickPlayer(Player, "Too many players on server.")
else else
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' added") print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' added")
Player:LoadCharacter() Player:LoadCharacter()
LoadSecurity(newWaitForChild(Player,"Security"),Player,game.Lighting) LoadSecurity(newWaitForChild(Player,"Security"),Player,game.Lighting)
if (Player.Character ~= nil) then local ch = Player.Character
LoadCharacterNew(newWaitForChild(Player,"Appearance"),Player.Character,RemoveTeapotTurret) if (ch ~= nil) then
LoadCharacterNew(newWaitForChild(Player,"Appearance"),ch,RemoveTeapotTurret)
end end
end end
while true do
wait(0.001) while true do
if (Player.Character ~= nil) then wait(0.001)
if (Player.Character.Humanoid.Health == 0) then local ch = Player.Character
wait(5) if (ch ~= nil) then
Player:LoadCharacter() if (ch.Humanoid.Health == 0) then
LoadCharacterNew(newWaitForChild(Player,"Appearance"),Player.Character,RemoveTeapotTurret) wait(5)
elseif (Player.Character.Parent == nil) then Player:LoadCharacter()
wait(5) LoadCharacterNew(newWaitForChild(Player,"Appearance"),ch,RemoveTeapotTurret)
Player:LoadCharacter() -- to make sure nobody is deleted. elseif (ch.Parent == nil) then
LoadCharacterNew(newWaitForChild(Player,"Appearance"),Player.Character,RemoveTeapotTurret) wait(5)
end Player:LoadCharacter() -- to make sure nobody is deleted.
LoadCharacterNew(newWaitForChild(Player,"Appearance"),ch,RemoveTeapotTurret)
end end
end end
end) end
game:GetService("Players").PlayerRemoving:connect(function(Player) end)
PlayerService.PlayerRemoving:connect(function(Player)
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving") print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving")
end) end)
game:GetService("RunService"):Run()
pcall(function() game.Close:connect(function() Server:Stop() end) end) pcall(function() game.Close:connect(function() Server:Stop() end) end)
InitalizeSecurityValues(game.Lighting,LauncherMD5,ClientEXEMD5,ClientScriptMD5) InitalizeSecurityValues(game.Lighting,LauncherMD5,ClientEXEMD5,ClientScriptMD5)
InitalizeClientName(game.Lighting)
Server.IncommingConnection:connect(IncommingConnection) Server.IncommingConnection:connect(IncommingConnection)
end end

View File

@ -134,7 +134,7 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
for i=1,3,1 do for i=1,3,1 do
local newHat = Instance.new("StringValue",newCharApp) local newHat = Instance.new("StringValue",newCharApp)
if (i == 1) then if (i == 1) then
if (RightLegColorID ~= nil) then if (Hat1ID ~= nil) then
newHat.Value = Hat1ID newHat.Value = Hat1ID
newHat.Name = Hat1ID newHat.Name = Hat1ID
else else
@ -142,7 +142,7 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
newHat.Name = "NoHat.rbxm" newHat.Name = "NoHat.rbxm"
end end
elseif (i == 2) then elseif (i == 2) then
if (RightLegColorID ~= nil) then if (Hat2ID ~= nil) then
newHat.Value = Hat2ID newHat.Value = Hat2ID
newHat.Name = Hat2ID newHat.Name = Hat2ID
else else
@ -150,7 +150,7 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
newHat.Name = "NoHat.rbxm" newHat.Name = "NoHat.rbxm"
end end
elseif (i == 3) then elseif (i == 3) then
if (RightLegColorID ~= nil) then if (Hat3ID ~= nil) then
newHat.Value = Hat3ID newHat.Value = Hat3ID
newHat.Name = Hat3ID newHat.Name = Hat3ID
else else
@ -178,112 +178,72 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
typeValue.Value = 3 typeValue.Value = 3
end end
function KickPlayer(Player,reason)
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: "..reason
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: "..reason)
end
function LoadSecurity(playerApp,Player,ServerSecurityLocation) function LoadSecurity(playerApp,Player,ServerSecurityLocation)
local function kick()
KickPlayer(Player, "Modified Client")
end
if (playerApp==nil) then if (playerApp==nil) then
local message = Instance.new("Message") kick()
message.Text = "You were kicked. Reason: Modified Client" return
message.Parent = Player end
wait(2)
Player:remove() if (not playerApp:FindFirstChild("ClientEXEMD5") or not playerApp:FindFirstChild("LauncherMD5") or not playerApp:FindFirstChild("ClientScriptMD5")) then
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client") kick()
else return
if ((playerApp:GetChildren() ~= 0) or (playerApp:GetChildren() ~= nil)) then end
for _,newVal in pairs(playerApp:GetChildren()) do
if (playerApp:FindFirstChild("ClientEXEMD5")) then for _,newVal in pairs(playerApp:GetChildren()) do
if ((newVal.Name == "ClientEXEMD5")) then if (newVal.Name == "ClientEXEMD5") then
if ((newVal.Value ~= ServerSecurityLocation.Security.ClientEXEMD5.Value) or (newVal.Value == nil) or (newVal.Value == "")) then if (newVal.Value ~= ServerSecurityLocation.Security.ClientEXEMD5.Value) then
local message = Instance.new("Message") kick()
message.Text = "You were kicked. Reason: Modified Client" end
message.Parent = Player end
wait(2)
Player:remove() if (newVal.Name == "LauncherMD5") then
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client") if (newVal.Value ~= ServerSecurityLocation.Security.LauncherMD5.Value) then
end kick()
end end
else end
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client" if (newVal.Name == "ClientScriptMD5") then
message.Parent = Player if (newVal.Value ~= ServerSecurityLocation.Security.ClientScriptMD5.Value) then
wait(2) kick()
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
if (playerApp:FindFirstChild("LauncherMD5")) then
if ((newVal.Name == "LauncherMD5")) then
if ((newVal.Value ~= ServerSecurityLocation.Security.LauncherMD5.Value) or (newVal.Value == nil) or (newVal.Value == "")) then
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
end
else
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
if (playerApp:FindFirstChild("ClientScriptMD5")) then
if ((newVal.Name == "ClientScriptMD5")) then
if ((newVal.Value ~= ServerSecurityLocation.Security.ClientScriptMD5.Value) or (newVal.Value == nil) or (newVal.Value == "")) then
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
end
else
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
end end
else
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end end
end end
end end
function InitalizeSecurityValues(Location,ClientEXEMD5,LauncherMD5,ClientScriptMD5) function InitalizeSecurityValues(Location,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
local newCharApp = Instance.new("IntValue",Location) Location = Instance.new("IntValue", Location)
newCharApp.Name = "Security" Location.Name = "Security"
local newClientMD5 = Instance.new("StringValue",newCharApp)
if (ClientEXEMD5 ~= nil) then local clientValue = Instance.new("StringValue", Location)
newClientMD5.Value = ClientEXEMD5 clientValue.Value = ClientEXEMD5 or ""
else clientValue.Name = "ClientEXEMD5"
newClientMD5.Value = ""
end local launcherValue = Instance.new("StringValue", Location)
newClientMD5.Name = "ClientEXEMD5" launcherValue.Value = LauncherMD5 or ""
local newLauncherMD5 = Instance.new("StringValue",newCharApp) launcherValue.Name = "LauncherMD5"
if (LauncherMD5 ~= nil) then
newLauncherMD5.Value = LauncherMD5 local scriptValue = Instance.new("StringValue", Location)
else scriptValue.Value = ClientScriptMD5 or ""
newLauncherMD5.Value = "" scriptValue.Name = "ClientScriptMD5"
end end
newLauncherMD5.Name = "LauncherMD5"
local newClientScriptMD5 = Instance.new("StringValue",newCharApp) function InitalizeClientName(Location)
if (ClientScriptMD5 ~= nil) then local newName = Instance.new("StringValue",Location)
newClientScriptMD5.Value = ClientScriptMD5 newName.Value = "2007M"
else newName.Name = "Name"
newClientScriptMD5.Value = ""
end
newClientScriptMD5.Name = "ClientScriptMD5"
end end
print("ROBLOX Client version '0.3.512.0' loaded.") print("ROBLOX Client version '0.3.512.0' loaded.")
@ -291,49 +251,52 @@ print("ROBLOX Client version '0.3.512.0' loaded.")
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,RemoveTeapotTurret) function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,RemoveTeapotTurret)
Server = game:GetService("NetworkServer") Server = game:GetService("NetworkServer")
RunService = game:GetService("RunService") RunService = game:GetService("RunService")
PlayerService = game:GetService("Players")
Server:start(Port, 20) Server:start(Port, 20)
RunService:run() RunService:run()
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
game:GetService("Players").MaxPlayers = PlayerLimit PlayerService.MaxPlayers = PlayerLimit
game:GetService("Players").PlayerAdded:connect(function(Player) PlayerService.PlayerAdded:connect(function(Player)
if (game:GetService("Players").NumPlayers > game:GetService("Players").MaxPlayers) then if (PlayerService.NumPlayers > PlayerService.MaxPlayers) then
local message = Instance.new("Message") KickPlayer(Player, "Too many players on server.")
message.Text = "You were kicked. Reason: Too many players on server."
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Too many players on server.")
else else
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' added") print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' added")
Player:LoadCharacter() Player:LoadCharacter()
LoadSecurity(newWaitForChild(Player,"Security"),Player,game.Lighting) LoadSecurity(newWaitForChild(Player,"Security"),Player,game.Lighting)
if (Player.Character ~= nil) then local ch = Player.Character
LoadCharacterNew(newWaitForChild(Player,"Appearance"),Player.Character,RemoveTeapotTurret) if (ch ~= nil) then
LoadCharacterNew(newWaitForChild(Player,"Appearance"),ch,RemoveTeapotTurret)
end end
end end
coroutine.resume(coroutine.create(function()
while Player ~= nil do coroutine.resume(coroutine.create(function()
wait(0.1) while Player ~= nil do
if (Player.Character ~= nil) then wait(0.1)
if (Player.Character.Humanoid.Health == 0) then local ch = Player.Character
wait(5) if (ch ~= nil) then
Player:LoadCharacter() if (ch.Humanoid.Health == 0) then
LoadCharacterNew(newWaitForChild(Player,"Appearance"),Player.Character,RemoveTeapotTurret) wait(5)
elseif (Player.Character.Parent == nil) then Player:LoadCharacter()
wait(5) LoadCharacterNew(newWaitForChild(Player,"Appearance"),ch,RemoveTeapotTurret)
Player:LoadCharacter() elseif (ch.Parent == nil) then
LoadCharacterNew(newWaitForChild(Player,"Appearance"),Player.Character,RemoveTeapotTurret) wait(5)
end Player:LoadCharacter()
LoadCharacterNew(newWaitForChild(Player,"Appearance"),ch,RemoveTeapotTurret)
end end
end end
end)) end
end))
Player.Chatted:connect(function(msg)
print(Player.Name.."; "..msg)
end) end)
game:GetService("Players").PlayerRemoving:connect(function(Player) end)
PlayerService.PlayerRemoving:connect(function(Player)
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving") print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving")
end) end)
game:GetService("RunService"):Run()
pcall(function() game.Close:connect(function() Server:Stop() end) end) pcall(function() game.Close:connect(function() Server:Stop() end) end)
InitalizeSecurityValues(game.Lighting,LauncherMD5,ClientEXEMD5,ClientScriptMD5) InitalizeSecurityValues(game.Lighting,LauncherMD5,ClientEXEMD5,ClientScriptMD5)
InitalizeClientName(game.Lighting)
Server.IncommingConnection:connect(IncommingConnection) Server.IncommingConnection:connect(IncommingConnection)
end end

View File

@ -160,7 +160,7 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
for i=1,3,1 do for i=1,3,1 do
local newHat = Instance.new("StringValue",newCharApp) local newHat = Instance.new("StringValue",newCharApp)
if (i == 1) then if (i == 1) then
if (RightLegColorID ~= nil) then if (Hat1ID ~= nil) then
newHat.Value = Hat1ID newHat.Value = Hat1ID
newHat.Name = Hat1ID newHat.Name = Hat1ID
else else
@ -168,7 +168,7 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
newHat.Name = "NoHat.rbxm" newHat.Name = "NoHat.rbxm"
end end
elseif (i == 2) then elseif (i == 2) then
if (RightLegColorID ~= nil) then if (Hat2ID ~= nil) then
newHat.Value = Hat2ID newHat.Value = Hat2ID
newHat.Name = Hat2ID newHat.Name = Hat2ID
else else
@ -176,7 +176,7 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
newHat.Name = "NoHat.rbxm" newHat.Name = "NoHat.rbxm"
end end
elseif (i == 3) then elseif (i == 3) then
if (RightLegColorID ~= nil) then if (Hat3ID ~= nil) then
newHat.Value = Hat3ID newHat.Value = Hat3ID
newHat.Name = Hat3ID newHat.Name = Hat3ID
else else
@ -230,112 +230,72 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
typeValue.Value = 5 typeValue.Value = 5
end end
function KickPlayer(Player,reason)
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: "..reason
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: "..reason)
end
function LoadSecurity(playerApp,Player,ServerSecurityLocation) function LoadSecurity(playerApp,Player,ServerSecurityLocation)
local function kick()
KickPlayer(Player, "Modified Client")
end
if (playerApp==nil) then if (playerApp==nil) then
local message = Instance.new("Message") kick()
message.Text = "You were kicked. Reason: Modified Client" return
message.Parent = Player end
wait(2)
Player:remove() if (not playerApp:FindFirstChild("ClientEXEMD5") or not playerApp:FindFirstChild("LauncherMD5") or not playerApp:FindFirstChild("ClientScriptMD5")) then
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client") kick()
else return
if ((playerApp:GetChildren() ~= 0) or (playerApp:GetChildren() ~= nil)) then end
for _,newVal in pairs(playerApp:GetChildren()) do
if (playerApp:FindFirstChild("ClientEXEMD5")) then for _,newVal in pairs(playerApp:GetChildren()) do
if ((newVal.Name == "ClientEXEMD5")) then if (newVal.Name == "ClientEXEMD5") then
if ((newVal.Value ~= ServerSecurityLocation.Security.ClientEXEMD5.Value) or (newVal.Value == nil) or (newVal.Value == "")) then if (newVal.Value ~= ServerSecurityLocation.Security.ClientEXEMD5.Value) then
local message = Instance.new("Message") kick()
message.Text = "You were kicked. Reason: Modified Client" end
message.Parent = Player end
wait(2)
Player:remove() if (newVal.Name == "LauncherMD5") then
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client") if (newVal.Value ~= ServerSecurityLocation.Security.LauncherMD5.Value) then
end kick()
end end
else end
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client" if (newVal.Name == "ClientScriptMD5") then
message.Parent = Player if (newVal.Value ~= ServerSecurityLocation.Security.ClientScriptMD5.Value) then
wait(2) kick()
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
if (playerApp:FindFirstChild("LauncherMD5")) then
if ((newVal.Name == "LauncherMD5")) then
if ((newVal.Value ~= ServerSecurityLocation.Security.LauncherMD5.Value) or (newVal.Value == nil) or (newVal.Value == "")) then
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
end
else
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
if (playerApp:FindFirstChild("ClientScriptMD5")) then
if ((newVal.Name == "ClientScriptMD5")) then
if ((newVal.Value ~= ServerSecurityLocation.Security.ClientScriptMD5.Value) or (newVal.Value == nil) or (newVal.Value == "")) then
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
end
else
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
end end
else
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end end
end end
end end
function InitalizeSecurityValues(Location,ClientEXEMD5,LauncherMD5,ClientScriptMD5) function InitalizeSecurityValues(Location,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
local newCharApp = Instance.new("IntValue",Location) Location = Instance.new("IntValue", Location)
newCharApp.Name = "Security" Location.Name = "Security"
local newClientMD5 = Instance.new("StringValue",newCharApp)
if (ClientEXEMD5 ~= nil) then local clientValue = Instance.new("StringValue", Location)
newClientMD5.Value = ClientEXEMD5 clientValue.Value = ClientEXEMD5 or ""
else clientValue.Name = "ClientEXEMD5"
newClientMD5.Value = ""
end local launcherValue = Instance.new("StringValue", Location)
newClientMD5.Name = "ClientEXEMD5" launcherValue.Value = LauncherMD5 or ""
local newLauncherMD5 = Instance.new("StringValue",newCharApp) launcherValue.Name = "LauncherMD5"
if (LauncherMD5 ~= nil) then
newLauncherMD5.Value = LauncherMD5 local scriptValue = Instance.new("StringValue", Location)
else scriptValue.Value = ClientScriptMD5 or ""
newLauncherMD5.Value = "" scriptValue.Name = "ClientScriptMD5"
end end
newLauncherMD5.Name = "LauncherMD5"
local newClientScriptMD5 = Instance.new("StringValue",newCharApp) function InitalizeClientName(Location)
if (ClientScriptMD5 ~= nil) then local newName = Instance.new("StringValue",Location)
newClientScriptMD5.Value = ClientScriptMD5 newName.Value = "2008M"
else newName.Name = "Name"
newClientScriptMD5.Value = ""
end
newClientScriptMD5.Name = "ClientScriptMD5"
end end
rbxversion = version() rbxversion = version()
@ -347,44 +307,47 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Remo
Server:start(Port, 20) Server:start(Port, 20)
RunService:run() RunService:run()
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
game:GetService("Players").MaxPlayers = PlayerLimit PlayerService = game:GetService("Players")
game:GetService("Players").PlayerAdded:connect(function(Player) PlayerService.MaxPlayers = PlayerLimit
if (game:GetService("Players").NumPlayers > game:GetService("Players").MaxPlayers) then PlayerService.PlayerAdded:connect(function(Player)
local message = Instance.new("Message") Player.Chatted:connect(function(msg)
message.Text = "You were kicked. Reason: Too many players on server." print(Player.Name.."; "..msg)
message.Parent = Player end)
wait(2)
Player:remove() if (PlayerService.NumPlayers > PlayerService.MaxPlayers) then
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Too many players on server.") KickPlayer(Player, "Too many players on server.")
else else
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' added") print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' added")
Player:LoadCharacter() Player:LoadCharacter()
LoadSecurity(newWaitForChild(Player,"Security"),Player,game.Lighting) LoadSecurity(newWaitForChild(Player,"Security"),Player,game.Lighting)
if (Player.Character ~= nil) then local ch = Player.Character
LoadCharacterNew(newWaitForChild(Player,"Appearance"),Player.Character,RemoveTeapotTurret) if (ch ~= nil) then
LoadCharacterNew(newWaitForChild(Player,"Appearance"),ch,RemoveTeapotTurret)
end end
end end
while true do
wait(0.001) while true do
if (Player.Character ~= nil) then wait(0.001)
if (Player.Character.Humanoid.Health == 0) then local ch = Player.Character
wait(5) if (ch ~= nil) then
Player:LoadCharacter() if (ch.Humanoid.Health == 0) then
LoadCharacterNew(newWaitForChild(Player,"Appearance"),Player.Character,RemoveTeapotTurret) wait(5)
elseif (Player.Character.Parent == nil) then Player:LoadCharacter()
wait(5) LoadCharacterNew(newWaitForChild(Player,"Appearance"),ch,RemoveTeapotTurret)
Player:LoadCharacter() -- to make sure nobody is deleted. elseif (ch.Parent == nil) then
LoadCharacterNew(newWaitForChild(Player,"Appearance"),Player.Character,RemoveTeapotTurret) wait(5)
end Player:LoadCharacter() -- to make sure nobody is deleted.
LoadCharacterNew(newWaitForChild(Player,"Appearance"),ch,RemoveTeapotTurret)
end end
end end
end) end
game:GetService("Players").PlayerRemoving:connect(function(Player) end)
PlayerService.PlayerRemoving:connect(function(Player)
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving") print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving")
end) end)
game:GetService("RunService"):Run()
pcall(function() game.Close:connect(function() Server:Stop() end) end) pcall(function() game.Close:connect(function() Server:Stop() end) end)
InitalizeSecurityValues(game.Lighting,LauncherMD5,ClientEXEMD5,ClientScriptMD5) InitalizeSecurityValues(game.Lighting,LauncherMD5,ClientEXEMD5,ClientScriptMD5)
InitalizeClientName(game.Lighting)
Server.IncommingConnection:connect(IncommingConnection) Server.IncommingConnection:connect(IncommingConnection)
end end

View File

@ -182,7 +182,7 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
for i=1,3,1 do for i=1,3,1 do
local newHat = Instance.new("StringValue",newCharApp) local newHat = Instance.new("StringValue",newCharApp)
if (i == 1) then if (i == 1) then
if (RightLegColorID ~= nil) then if (Hat1ID ~= nil) then
newHat.Value = Hat1ID newHat.Value = Hat1ID
newHat.Name = Hat1ID newHat.Name = Hat1ID
else else
@ -190,7 +190,7 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
newHat.Name = "NoHat.rbxm" newHat.Name = "NoHat.rbxm"
end end
elseif (i == 2) then elseif (i == 2) then
if (RightLegColorID ~= nil) then if (Hat2ID ~= nil) then
newHat.Value = Hat2ID newHat.Value = Hat2ID
newHat.Name = Hat2ID newHat.Name = Hat2ID
else else
@ -198,7 +198,7 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
newHat.Name = "NoHat.rbxm" newHat.Name = "NoHat.rbxm"
end end
elseif (i == 3) then elseif (i == 3) then
if (RightLegColorID ~= nil) then if (Hat3ID ~= nil) then
newHat.Value = Hat3ID newHat.Value = Hat3ID
newHat.Name = Hat3ID newHat.Name = Hat3ID
else else
@ -278,112 +278,72 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
typeValue.Value = 7 typeValue.Value = 7
end end
function KickPlayer(Player,reason)
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: "..reason
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: "..reason)
end
function LoadSecurity(playerApp,Player,ServerSecurityLocation) function LoadSecurity(playerApp,Player,ServerSecurityLocation)
local function kick()
KickPlayer(Player, "Modified Client")
end
if (playerApp==nil) then if (playerApp==nil) then
local message = Instance.new("Message") kick()
message.Text = "You were kicked. Reason: Modified Client" return
message.Parent = Player end
wait(2)
Player:remove() if (not playerApp:FindFirstChild("ClientEXEMD5") or not playerApp:FindFirstChild("LauncherMD5") or not playerApp:FindFirstChild("ClientScriptMD5")) then
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client") kick()
else return
if ((playerApp:GetChildren() ~= 0) or (playerApp:GetChildren() ~= nil)) then end
for _,newVal in pairs(playerApp:GetChildren()) do
if (playerApp:FindFirstChild("ClientEXEMD5")) then for _,newVal in pairs(playerApp:GetChildren()) do
if ((newVal.Name == "ClientEXEMD5")) then if (newVal.Name == "ClientEXEMD5") then
if ((newVal.Value ~= ServerSecurityLocation.Security.ClientEXEMD5.Value) or (newVal.Value == nil) or (newVal.Value == "")) then if (newVal.Value ~= ServerSecurityLocation.Security.ClientEXEMD5.Value) then
local message = Instance.new("Message") kick()
message.Text = "You were kicked. Reason: Modified Client" end
message.Parent = Player end
wait(2)
Player:remove() if (newVal.Name == "LauncherMD5") then
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client") if (newVal.Value ~= ServerSecurityLocation.Security.LauncherMD5.Value) then
end kick()
end end
else end
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client" if (newVal.Name == "ClientScriptMD5") then
message.Parent = Player if (newVal.Value ~= ServerSecurityLocation.Security.ClientScriptMD5.Value) then
wait(2) kick()
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
if (playerApp:FindFirstChild("LauncherMD5")) then
if ((newVal.Name == "LauncherMD5")) then
if ((newVal.Value ~= ServerSecurityLocation.Security.LauncherMD5.Value) or (newVal.Value == nil) or (newVal.Value == "")) then
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
end
else
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
if (playerApp:FindFirstChild("ClientScriptMD5")) then
if ((newVal.Name == "ClientScriptMD5")) then
if ((newVal.Value ~= ServerSecurityLocation.Security.ClientScriptMD5.Value) or (newVal.Value == nil) or (newVal.Value == "")) then
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
end
else
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
end end
else
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end end
end end
end end
function InitalizeSecurityValues(Location,ClientEXEMD5,LauncherMD5,ClientScriptMD5) function InitalizeSecurityValues(Location,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
local newCharApp = Instance.new("IntValue",Location) Location = Instance.new("IntValue", Location)
newCharApp.Name = "Security" Location.Name = "Security"
local newClientMD5 = Instance.new("StringValue",newCharApp)
if (ClientEXEMD5 ~= nil) then local clientValue = Instance.new("StringValue", Location)
newClientMD5.Value = ClientEXEMD5 clientValue.Value = ClientEXEMD5 or ""
else clientValue.Name = "ClientEXEMD5"
newClientMD5.Value = ""
end local launcherValue = Instance.new("StringValue", Location)
newClientMD5.Name = "ClientEXEMD5" launcherValue.Value = LauncherMD5 or ""
local newLauncherMD5 = Instance.new("StringValue",newCharApp) launcherValue.Name = "LauncherMD5"
if (LauncherMD5 ~= nil) then
newLauncherMD5.Value = LauncherMD5 local scriptValue = Instance.new("StringValue", Location)
else scriptValue.Value = ClientScriptMD5 or ""
newLauncherMD5.Value = "" scriptValue.Name = "ClientScriptMD5"
end end
newLauncherMD5.Name = "LauncherMD5"
local newClientScriptMD5 = Instance.new("StringValue",newCharApp) function InitalizeClientName(Location)
if (ClientScriptMD5 ~= nil) then local newName = Instance.new("StringValue",Location)
newClientScriptMD5.Value = ClientScriptMD5 newName.Value = "2009E"
else newName.Name = "Name"
newClientScriptMD5.Value = ""
end
newClientScriptMD5.Name = "ClientScriptMD5"
end end
rbxversion = version() rbxversion = version()
@ -395,47 +355,49 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Remo
Server:start(Port, 20) Server:start(Port, 20)
RunService:run() RunService:run()
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
game:GetService("Players").MaxPlayers = PlayerLimit PlayerService = game:GetService("Players")
game:GetService("Players").PlayerAdded:connect(function(Player) PlayerService.MaxPlayers = PlayerLimit
if (game:GetService("Players").NumPlayers > game:GetService("Players").MaxPlayers) then PlayerService.PlayerAdded:connect(function(Player)
local message = Instance.new("Message") if (PlayerService.NumPlayers > PlayerService.MaxPlayers) then
message.Text = "You were kicked. Reason: Too many players on server." KickPlayer(Player, "Too many players on server.")
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Too many players on server.")
else else
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' added") print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' added")
Player:LoadCharacter() Player:LoadCharacter()
LoadSecurity(newWaitForChild(Player,"Security"),Player,game.Lighting) LoadSecurity(newWaitForChild(Player,"Security"),Player,game.Lighting)
if (Player.Character ~= nil) then local ch = Player.Character
LoadCharacterNew(newWaitForChild(Player,"Appearance"),Player.Character,RemoveTeapotTurret) if (ch ~= nil) then
LoadCharacterNew(newWaitForChild(Player,"Appearance"),ch,RemoveTeapotTurret)
end end
end end
while true do
wait(0.001) while true do
if (Player.Character ~= nil) then wait(0.001)
if (Player.Character.Humanoid.Health == 0) then local ch = Player.Character
wait(5) if (ch ~= nil) then
Player:LoadCharacter() if (ch.Humanoid.Health == 0) then
LoadCharacterNew(newWaitForChild(Player,"Appearance"),Player.Character,RemoveTeapotTurret) wait(5)
elseif (Player.Character.Parent == nil) then Player:LoadCharacter()
wait(5) LoadCharacterNew(newWaitForChild(Player,"Appearance"),ch,RemoveTeapotTurret)
Player:LoadCharacter() -- to make sure nobody is deleted. elseif (ch.Parent == nil) then
LoadCharacterNew(newWaitForChild(Player,"Appearance"),Player.Character,RemoveTeapotTurret) wait(5)
end Player:LoadCharacter() -- to make sure nobody is deleted.
LoadCharacterNew(newWaitForChild(Player,"Appearance"),ch,RemoveTeapotTurret)
end end
end end
end
Player.Chatted:connect(function(msg)
print(Player.Name.."; "..msg)
end) end)
game:GetService("Players").PlayerRemoving:connect(function(Player) end)
PlayerService.PlayerRemoving:connect(function(Player)
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving") print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving")
end) end)
game:GetService("RunService"):Run()
pcall(function() game.Close:connect(function() Server:Stop() end) end) pcall(function() game.Close:connect(function() Server:Stop() end) end)
InitalizeSecurityValues(game.Lighting,LauncherMD5,ClientEXEMD5,ClientScriptMD5) InitalizeSecurityValues(game.Lighting,LauncherMD5,ClientEXEMD5,ClientScriptMD5)
InitalizeClientName(game.Lighting)
Server.IncommingConnection:connect(IncommingConnection) Server.IncommingConnection:connect(IncommingConnection)
end end
function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Ticket) function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Ticket)
pcall(function() game:SetPlaceID(-1, false) end) pcall(function() game:SetPlaceID(-1, false) end)
pcall(function() game:GetService("Players"):SetChatStyle(Enum.ChatStyle.ClassicAndBubble) end) pcall(function() game:GetService("Players"):SetChatStyle(Enum.ChatStyle.ClassicAndBubble) end)

View File

@ -110,6 +110,7 @@ script:remove()</ProtectedString>
<YO>0</YO> <YO>0</YO>
</UDim2> </UDim2>
<token name="SizeConstraint">0</token> <token name="SizeConstraint">0</token>
<token name="Style">0</token>
<bool name="Visible">true</bool> <bool name="Visible">true</bool>
<int name="ZIndex">1</int> <int name="ZIndex">1</int>
<bool name="archivable">true</bool> <bool name="archivable">true</bool>
@ -135,6 +136,7 @@ script:remove()</ProtectedString>
<YO>0</YO> <YO>0</YO>
</UDim2> </UDim2>
<token name="SizeConstraint">0</token> <token name="SizeConstraint">0</token>
<token name="Style">0</token>
<bool name="Visible">true</bool> <bool name="Visible">true</bool>
<int name="ZIndex">2</int> <int name="ZIndex">2</int>
<bool name="archivable">true</bool> <bool name="archivable">true</bool>
@ -176,6 +178,7 @@ end)
<YO>0</YO> <YO>0</YO>
</UDim2> </UDim2>
<token name="SizeConstraint">0</token> <token name="SizeConstraint">0</token>
<token name="Style">0</token>
<bool name="Visible">true</bool> <bool name="Visible">true</bool>
<int name="ZIndex">1</int> <int name="ZIndex">1</int>
<bool name="archivable">true</bool> <bool name="archivable">true</bool>
@ -188,7 +191,7 @@ end)
<float name="BackgroundTransparency">1</float> <float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3> <Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int> <int name="BorderSizePixel">1</int>
<Content name="Image"><url>rbxasset://textures/health.png</url></Content> <Content name="Image"><url>rbxasset://../../../shareddata/textures/health.png</url></Content>
<string name="Name">ImageLabel</string> <string name="Name">ImageLabel</string>
<UDim2 name="Position"> <UDim2 name="Position">
<XS>0</XS> <XS>0</XS>

View File

@ -184,7 +184,7 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
for i=1,3,1 do for i=1,3,1 do
local newHat = Instance.new("StringValue",newCharApp) local newHat = Instance.new("StringValue",newCharApp)
if (i == 1) then if (i == 1) then
if (RightLegColorID ~= nil) then if (Hat1ID ~= nil) then
newHat.Value = Hat1ID newHat.Value = Hat1ID
newHat.Name = Hat1ID newHat.Name = Hat1ID
else else
@ -192,7 +192,7 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
newHat.Name = "NoHat.rbxm" newHat.Name = "NoHat.rbxm"
end end
elseif (i == 2) then elseif (i == 2) then
if (RightLegColorID ~= nil) then if (Hat2ID ~= nil) then
newHat.Value = Hat2ID newHat.Value = Hat2ID
newHat.Name = Hat2ID newHat.Name = Hat2ID
else else
@ -200,7 +200,7 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
newHat.Name = "NoHat.rbxm" newHat.Name = "NoHat.rbxm"
end end
elseif (i == 3) then elseif (i == 3) then
if (RightLegColorID ~= nil) then if (Hat3ID ~= nil) then
newHat.Value = Hat3ID newHat.Value = Hat3ID
newHat.Name = Hat3ID newHat.Name = Hat3ID
else else
@ -280,112 +280,72 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
typeValue.Value = 7 typeValue.Value = 7
end end
function KickPlayer(Player,reason)
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: "..reason
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: "..reason)
end
function LoadSecurity(playerApp,Player,ServerSecurityLocation) function LoadSecurity(playerApp,Player,ServerSecurityLocation)
local function kick()
KickPlayer(Player, "Modified Client")
end
if (playerApp==nil) then if (playerApp==nil) then
local message = Instance.new("Message") kick()
message.Text = "You were kicked. Reason: Modified Client" return
message.Parent = Player end
wait(2)
Player:remove() if (not playerApp:FindFirstChild("ClientEXEMD5") or not playerApp:FindFirstChild("LauncherMD5") or not playerApp:FindFirstChild("ClientScriptMD5")) then
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client") kick()
else return
if ((playerApp:GetChildren() ~= 0) or (playerApp:GetChildren() ~= nil)) then end
for _,newVal in pairs(playerApp:GetChildren()) do
if (playerApp:FindFirstChild("ClientEXEMD5")) then for _,newVal in pairs(playerApp:GetChildren()) do
if ((newVal.Name == "ClientEXEMD5")) then if (newVal.Name == "ClientEXEMD5") then
if ((newVal.Value ~= ServerSecurityLocation.Security.ClientEXEMD5.Value) or (newVal.Value == nil) or (newVal.Value == "")) then if (newVal.Value ~= ServerSecurityLocation.Security.ClientEXEMD5.Value) then
local message = Instance.new("Message") kick()
message.Text = "You were kicked. Reason: Modified Client" end
message.Parent = Player end
wait(2)
Player:remove() if (newVal.Name == "LauncherMD5") then
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client") if (newVal.Value ~= ServerSecurityLocation.Security.LauncherMD5.Value) then
end kick()
end end
else end
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client" if (newVal.Name == "ClientScriptMD5") then
message.Parent = Player if (newVal.Value ~= ServerSecurityLocation.Security.ClientScriptMD5.Value) then
wait(2) kick()
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
if (playerApp:FindFirstChild("LauncherMD5")) then
if ((newVal.Name == "LauncherMD5")) then
if ((newVal.Value ~= ServerSecurityLocation.Security.LauncherMD5.Value) or (newVal.Value == nil) or (newVal.Value == "")) then
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
end
else
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
if (playerApp:FindFirstChild("ClientScriptMD5")) then
if ((newVal.Name == "ClientScriptMD5")) then
if ((newVal.Value ~= ServerSecurityLocation.Security.ClientScriptMD5.Value) or (newVal.Value == nil) or (newVal.Value == "")) then
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
end
else
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
end end
else
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end end
end end
end end
function InitalizeSecurityValues(Location,ClientEXEMD5,LauncherMD5,ClientScriptMD5) function InitalizeSecurityValues(Location,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
local newCharApp = Instance.new("IntValue",Location) Location = Instance.new("IntValue", Location)
newCharApp.Name = "Security" Location.Name = "Security"
local newClientMD5 = Instance.new("StringValue",newCharApp)
if (ClientEXEMD5 ~= nil) then local clientValue = Instance.new("StringValue", Location)
newClientMD5.Value = ClientEXEMD5 clientValue.Value = ClientEXEMD5 or ""
else clientValue.Name = "ClientEXEMD5"
newClientMD5.Value = ""
end local launcherValue = Instance.new("StringValue", Location)
newClientMD5.Name = "ClientEXEMD5" launcherValue.Value = LauncherMD5 or ""
local newLauncherMD5 = Instance.new("StringValue",newCharApp) launcherValue.Name = "LauncherMD5"
if (LauncherMD5 ~= nil) then
newLauncherMD5.Value = LauncherMD5 local scriptValue = Instance.new("StringValue", Location)
else scriptValue.Value = ClientScriptMD5 or ""
newLauncherMD5.Value = "" scriptValue.Name = "ClientScriptMD5"
end end
newLauncherMD5.Name = "LauncherMD5"
local newClientScriptMD5 = Instance.new("StringValue",newCharApp) function InitalizeClientName(Location)
if (ClientScriptMD5 ~= nil) then local newName = Instance.new("StringValue",Location)
newClientScriptMD5.Value = ClientScriptMD5 newName.Value = "2010L"
else newName.Name = "Name"
newClientScriptMD5.Value = ""
end
newClientScriptMD5.Name = "ClientScriptMD5"
end end
rbxversion = version() rbxversion = version()
@ -394,27 +354,26 @@ print("ROBLOX Client version '" .. rbxversion .. "' loaded.")
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,RemoveTeapotTurret) function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,RemoveTeapotTurret)
assert((type(Port)~="number" or tonumber(Port)~=nil or Port==nil),"CSRun Error: Port must be nil or a number.") assert((type(Port)~="number" or tonumber(Port)~=nil or Port==nil),"CSRun Error: Port must be nil or a number.")
local NetworkServer=game:GetService("NetworkServer") local NetworkServer=game:GetService("NetworkServer")
local RunService = game:GetService("RunService")
local PlayerService = game:GetService("Players")
pcall(NetworkServer.Stop,NetworkServer) pcall(NetworkServer.Stop,NetworkServer)
NetworkServer:Start(Port) NetworkServer:Start(Port)
game:GetService("Players").MaxPlayers = PlayerLimit PlayerService.MaxPlayers = PlayerLimit
game:GetService("Players").PlayerAdded:connect(function(Player) PlayerService.PlayerAdded:connect(function(Player)
if (game:GetService("Players").NumPlayers > game:GetService("Players").MaxPlayers) then if (PlayerService.NumPlayers > PlayerService.MaxPlayers) then
local message = Instance.new("Message") KickPlayer(Player, "Too many players on server.")
message.Text = "You were kicked. Reason: Too many players on server."
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Too many players on server.")
else else
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' added") print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' added")
Player:LoadCharacter() Player:LoadCharacter()
end end
Player.CharacterAdded:connect(function(char) Player.CharacterAdded:connect(function(char)
LoadSecurity(newWaitForChild(Player,"Security"),Player,game.Lighting) LoadSecurity(newWaitForChild(Player,"Security"),Player,game.Lighting)
if (Player.Character ~= nil) then if (char ~= nil) then
LoadCharacterNew(newWaitForChild(Player,"Appearance"),Player.Character,RemoveTeapotTurret) LoadCharacterNew(newWaitForChild(Player,"Appearance"),char,RemoveTeapotTurret)
end end
end) end)
Player.Changed:connect(function(Property) Player.Changed:connect(function(Property)
if (Property=="Character") and (Player.Character~=nil) then if (Property=="Character") and (Player.Character~=nil) then
local Character=Player.Character local Character=Player.Character
@ -424,13 +383,18 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Remo
end end
end end
end) end)
Player.Chatted:connect(function(msg)
print(Player.Name.."; "..msg)
end)
end) end)
game:GetService("Players").PlayerRemoving:connect(function(Player) PlayerService.PlayerRemoving:connect(function(Player)
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving") print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving")
end) end)
game:GetService("RunService"):Run() RunService:Run()
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
InitalizeSecurityValues(game.Lighting,LauncherMD5,ClientEXEMD5,ClientScriptMD5) InitalizeSecurityValues(game.Lighting,LauncherMD5,ClientEXEMD5,ClientScriptMD5)
InitalizeClientName(game.Lighting)
pcall(function() game.Close:connect(function() NetworkServer:Stop() end) end) pcall(function() game.Close:connect(function() NetworkServer:Stop() end) end)
NetworkServer.IncommingConnection:connect(IncommingConnection) NetworkServer.IncommingConnection:connect(IncommingConnection)
end end

View File

@ -96,6 +96,7 @@ game.Players.ChildAdded:connect(onPlayerEntered)</ProtectedString>
<YO>18</YO> <YO>18</YO>
</UDim2> </UDim2>
<token name="SizeConstraint">2</token> <token name="SizeConstraint">2</token>
<token name="Style">0</token>
<bool name="Visible">true</bool> <bool name="Visible">true</bool>
<int name="ZIndex">1</int> <int name="ZIndex">1</int>
<bool name="archivable">true</bool> <bool name="archivable">true</bool>
@ -107,7 +108,7 @@ game.Players.ChildAdded:connect(onPlayerEntered)</ProtectedString>
<float name="BackgroundTransparency">1</float> <float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3> <Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int> <int name="BorderSizePixel">1</int>
<Content name="Image"><url>rbxasset://textures/healthgui/bkg.png</url></Content> <Content name="Image"><url>rbxasset://../../../shareddata/textures/healthgui/bkg.png</url></Content>
<string name="Name">bkg</string> <string name="Name">bkg</string>
<UDim2 name="Position"> <UDim2 name="Position">
<XS>0</XS> <XS>0</XS>
@ -134,7 +135,7 @@ game.Players.ChildAdded:connect(onPlayerEntered)</ProtectedString>
<float name="BackgroundTransparency">1</float> <float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3> <Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int> <int name="BorderSizePixel">1</int>
<Content name="Image"><url>rbxasset://textures/healthgui/BarRed.png</url></Content> <Content name="Image"><url>rbxasset://../../../shareddata/textures/healthgui/BarRed.png</url></Content>
<string name="Name">barRed</string> <string name="Name">barRed</string>
<UDim2 name="Position"> <UDim2 name="Position">
<XS>0.0189999994</XS> <XS>0.0189999994</XS>
@ -175,6 +176,7 @@ game.Players.ChildAdded:connect(onPlayerEntered)</ProtectedString>
<YO>0</YO> <YO>0</YO>
</UDim2> </UDim2>
<token name="SizeConstraint">0</token> <token name="SizeConstraint">0</token>
<token name="Style">0</token>
<bool name="Visible">true</bool> <bool name="Visible">true</bool>
<int name="ZIndex">1</int> <int name="ZIndex">1</int>
<bool name="archivable">true</bool> <bool name="archivable">true</bool>
@ -313,7 +315,7 @@ h.Changed:connect(function()
<float name="BackgroundTransparency">1</float> <float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3> <Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int> <int name="BorderSizePixel">1</int>
<Content name="Image"><url>rbxasset://textures/healthgui/Bar.png</url></Content> <Content name="Image"><url>rbxasset://../../../shareddata/textures/healthgui/Bar.png</url></Content>
<string name="Name">bar</string> <string name="Name">bar</string>
<UDim2 name="Position"> <UDim2 name="Position">
<XS>0.0189999994</XS> <XS>0.0189999994</XS>
@ -340,7 +342,7 @@ h.Changed:connect(function()
<float name="BackgroundTransparency">1</float> <float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3> <Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int> <int name="BorderSizePixel">0</int>
<Content name="Image"><url>rbxasset://textures/healthgui/label.png</url></Content> <Content name="Image"><url>rbxasset://../../../shareddata/textures/healthgui/label.png</url></Content>
<string name="Name">label</string> <string name="Name">label</string>
<UDim2 name="Position"> <UDim2 name="Position">
<XS>0.680000007</XS> <XS>0.680000007</XS>
@ -368,7 +370,7 @@ h.Changed:connect(function()
<float name="BackgroundTransparency">1</float> <float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3> <Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int> <int name="BorderSizePixel">1</int>
<Content name="Image"><url>rbxasset://textures/healthgui/HurtOverlay.png</url></Content> <Content name="Image"><url>rbxasset://../../../shareddata/textures/healthgui/HurtOverlay.png</url></Content>
<string name="Name">hurtOverlay</string> <string name="Name">hurtOverlay</string>
<UDim2 name="Position"> <UDim2 name="Position">
<XS>2</XS> <XS>2</XS>
@ -415,6 +417,7 @@ h.Changed:connect(function()
<YO>0</YO> <YO>0</YO>
</UDim2> </UDim2>
<token name="SizeConstraint">0</token> <token name="SizeConstraint">0</token>
<token name="Style">0</token>
<bool name="Visible">true</bool> <bool name="Visible">true</bool>
<int name="ZIndex">1</int> <int name="ZIndex">1</int>
<bool name="archivable">true</bool> <bool name="archivable">true</bool>
@ -440,6 +443,7 @@ h.Changed:connect(function()
<YO>46</YO> <YO>46</YO>
</UDim2> </UDim2>
<token name="SizeConstraint">0</token> <token name="SizeConstraint">0</token>
<token name="Style">0</token>
<bool name="Visible">true</bool> <bool name="Visible">true</bool>
<int name="ZIndex">1</int> <int name="ZIndex">1</int>
<bool name="archivable">true</bool> <bool name="archivable">true</bool>
@ -5062,23 +5066,6 @@ t.Help =
local RbxGui local RbxGui
local ADMINS =
{
iagoMAO = &quot;rbxasset://textures/ui/admins/iagoMAO.png&quot;,
winsupermario1234 = &quot;rbxasset://textures/ui/admins/winsupermario1234.png&quot;,
Carrot = &quot;rbxasset://textures/ui/admins/carrot.png&quot;,
coke = &quot;rbxasset://textures/ui/admins/coke.png&quot;,
khanglegos = &quot;rbxasset://textures/ui/admins/khanglegos.png&quot;,
QuackIAttack = &quot;rbxasset://textures/ui/admins/QuackIAttack.png&quot;,
romulo27 = &quot;rbxasset://textures/ui/admins/romulo27.png&quot;,
TheLivingBee = &quot;rbxasset://textures/ui/admins/TheLivingBee.png&quot;,
OliverA = 1,
kinery = 1,
Peridorky =1,
Bitl = &quot;rbxasset://textures/ui/admins/bitl.png&quot;,
Raymonf = &quot;rbxasset://textures/ui/admins/Raymonf.png&quot;,
}
local localTesting = true local localTesting = true
local screen = script.Parent local screen = script.Parent
@ -5885,14 +5872,8 @@ if UserSettings and LoadLibrary then
end end
local function getMembershipTypeIcon(membershipType, playerName) local function getMembershipTypeIcon(membershipType, playerName)
if ADMINS[playerName]~=nil then if membershipType == Enum.MembershipType.None then
if ADMINS[playerName] == 1 then return &quot;rbxasset://../../../charcustom/icons/&quot;..playerName..&quot;.png&quot;
return &quot;rbxasset://textures/ui/admins/default.png&quot;
else
return ADMINS[playerName]
end
elseif membershipType == Enum.MembershipType.None then
return &quot;&quot;
elseif membershipType == Enum.MembershipType.BuildersClub then elseif membershipType == Enum.MembershipType.BuildersClub then
return &quot;rbxasset://textures/ui/TinyBcIcon.png&quot; return &quot;rbxasset://textures/ui/TinyBcIcon.png&quot;
elseif membershipType == Enum.MembershipType.TurboBuildersClub then elseif membershipType == Enum.MembershipType.TurboBuildersClub then

View File

@ -199,7 +199,7 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
for i=1,3,1 do for i=1,3,1 do
local newHat = Instance.new("StringValue",newCharApp) local newHat = Instance.new("StringValue",newCharApp)
if (i == 1) then if (i == 1) then
if (RightLegColorID ~= nil) then if (Hat1ID ~= nil) then
newHat.Value = Hat1ID newHat.Value = Hat1ID
newHat.Name = Hat1ID newHat.Name = Hat1ID
else else
@ -207,7 +207,7 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
newHat.Name = "NoHat.rbxm" newHat.Name = "NoHat.rbxm"
end end
elseif (i == 2) then elseif (i == 2) then
if (RightLegColorID ~= nil) then if (Hat2ID ~= nil) then
newHat.Value = Hat2ID newHat.Value = Hat2ID
newHat.Name = Hat2ID newHat.Name = Hat2ID
else else
@ -215,7 +215,7 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
newHat.Name = "NoHat.rbxm" newHat.Name = "NoHat.rbxm"
end end
elseif (i == 3) then elseif (i == 3) then
if (RightLegColorID ~= nil) then if (Hat3ID ~= nil) then
newHat.Value = Hat3ID newHat.Value = Hat3ID
newHat.Name = Hat3ID newHat.Name = Hat3ID
else else
@ -295,112 +295,72 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
typeValue.Value = 7 typeValue.Value = 7
end end
function KickPlayer(Player,reason)
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: "..reason
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: "..reason)
end
function LoadSecurity(playerApp,Player,ServerSecurityLocation) function LoadSecurity(playerApp,Player,ServerSecurityLocation)
local function kick()
KickPlayer(Player, "Modified Client")
end
if (playerApp==nil) then if (playerApp==nil) then
local message = Instance.new("Message") kick()
message.Text = "You were kicked. Reason: Modified Client" return
message.Parent = Player end
wait(2)
Player:remove() if (not playerApp:FindFirstChild("ClientEXEMD5") or not playerApp:FindFirstChild("LauncherMD5") or not playerApp:FindFirstChild("ClientScriptMD5")) then
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client") kick()
else return
if ((playerApp:GetChildren() ~= 0) or (playerApp:GetChildren() ~= nil)) then end
for _,newVal in pairs(playerApp:GetChildren()) do
if (playerApp:FindFirstChild("ClientEXEMD5")) then for _,newVal in pairs(playerApp:GetChildren()) do
if ((newVal.Name == "ClientEXEMD5")) then if (newVal.Name == "ClientEXEMD5") then
if ((newVal.Value ~= ServerSecurityLocation.Security.ClientEXEMD5.Value) or (newVal.Value == nil) or (newVal.Value == "")) then if (newVal.Value ~= ServerSecurityLocation.Security.ClientEXEMD5.Value) then
local message = Instance.new("Message") kick()
message.Text = "You were kicked. Reason: Modified Client" end
message.Parent = Player end
wait(2)
Player:remove() if (newVal.Name == "LauncherMD5") then
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client") if (newVal.Value ~= ServerSecurityLocation.Security.LauncherMD5.Value) then
end kick()
end end
else end
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client" if (newVal.Name == "ClientScriptMD5") then
message.Parent = Player if (newVal.Value ~= ServerSecurityLocation.Security.ClientScriptMD5.Value) then
wait(2) kick()
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
if (playerApp:FindFirstChild("LauncherMD5")) then
if ((newVal.Name == "LauncherMD5")) then
if ((newVal.Value ~= ServerSecurityLocation.Security.LauncherMD5.Value) or (newVal.Value == nil) or (newVal.Value == "")) then
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
end
else
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
if (playerApp:FindFirstChild("ClientScriptMD5")) then
if ((newVal.Name == "ClientScriptMD5")) then
if ((newVal.Value ~= ServerSecurityLocation.Security.ClientScriptMD5.Value) or (newVal.Value == nil) or (newVal.Value == "")) then
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
end
else
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end
end end
else
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: Modified Client"
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Modified Client")
end end
end end
end end
function InitalizeSecurityValues(Location,ClientEXEMD5,LauncherMD5,ClientScriptMD5) function InitalizeSecurityValues(Location,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
local newCharApp = Instance.new("IntValue",Location) Location = Instance.new("IntValue", Location)
newCharApp.Name = "Security" Location.Name = "Security"
local newClientMD5 = Instance.new("StringValue",newCharApp)
if (ClientEXEMD5 ~= nil) then local clientValue = Instance.new("StringValue", Location)
newClientMD5.Value = ClientEXEMD5 clientValue.Value = ClientEXEMD5 or ""
else clientValue.Name = "ClientEXEMD5"
newClientMD5.Value = ""
end local launcherValue = Instance.new("StringValue", Location)
newClientMD5.Name = "ClientEXEMD5" launcherValue.Value = LauncherMD5 or ""
local newLauncherMD5 = Instance.new("StringValue",newCharApp) launcherValue.Name = "LauncherMD5"
if (LauncherMD5 ~= nil) then
newLauncherMD5.Value = LauncherMD5 local scriptValue = Instance.new("StringValue", Location)
else scriptValue.Value = ClientScriptMD5 or ""
newLauncherMD5.Value = "" scriptValue.Name = "ClientScriptMD5"
end end
newLauncherMD5.Name = "LauncherMD5"
local newClientScriptMD5 = Instance.new("StringValue",newCharApp) function InitalizeClientName(Location)
if (ClientScriptMD5 ~= nil) then local newName = Instance.new("StringValue",Location)
newClientScriptMD5.Value = ClientScriptMD5 newName.Value = "2011E"
else newName.Name = "Name"
newClientScriptMD5.Value = ""
end
newClientScriptMD5.Name = "ClientScriptMD5"
end end
rbxversion = version() rbxversion = version()
@ -409,27 +369,26 @@ print("ROBLOX Client version '" .. rbxversion .. "' loaded.")
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,RemoveTeapotTurret) function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,RemoveTeapotTurret)
assert((type(Port)~="number" or tonumber(Port)~=nil or Port==nil),"CSRun Error: Port must be nil or a number.") assert((type(Port)~="number" or tonumber(Port)~=nil or Port==nil),"CSRun Error: Port must be nil or a number.")
local NetworkServer=game:GetService("NetworkServer") local NetworkServer=game:GetService("NetworkServer")
local RunService = game:GetService("RunService")
local PlayerService = game:GetService("Players")
pcall(NetworkServer.Stop,NetworkServer) pcall(NetworkServer.Stop,NetworkServer)
NetworkServer:Start(Port) NetworkServer:Start(Port)
game:GetService("Players").MaxPlayers = PlayerLimit PlayerService.MaxPlayers = PlayerLimit
game:GetService("Players").PlayerAdded:connect(function(Player) PlayerService.PlayerAdded:connect(function(Player)
if (game:GetService("Players").NumPlayers > game:GetService("Players").MaxPlayers) then if (PlayerService.NumPlayers > PlayerService.MaxPlayers) then
local message = Instance.new("Message") KickPlayer(Player, "Too many players on server.")
message.Text = "You were kicked. Reason: Too many players on server."
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: Too many players on server.")
else else
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' added") print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' added")
Player:LoadCharacter() Player:LoadCharacter()
end end
Player.CharacterAdded:connect(function(char) Player.CharacterAdded:connect(function(char)
LoadSecurity(newWaitForChild(Player,"Security"),Player,game.Lighting) LoadSecurity(newWaitForChild(Player,"Security"),Player,game.Lighting)
if (Player.Character ~= nil) then if (char ~= nil) then
LoadCharacterNew(newWaitForChild(Player,"Appearance"),Player.Character,RemoveTeapotTurret) LoadCharacterNew(newWaitForChild(Player,"Appearance"),char,RemoveTeapotTurret)
end end
end) end)
Player.Changed:connect(function(Property) Player.Changed:connect(function(Property)
if (Property=="Character") and (Player.Character~=nil) then if (Property=="Character") and (Player.Character~=nil) then
local Character=Player.Character local Character=Player.Character
@ -439,13 +398,18 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Remo
end end
end end
end) end)
Player.Chatted:connect(function(msg)
print(Player.Name.."; "..msg)
end)
end) end)
game:GetService("Players").PlayerRemoving:connect(function(Player) PlayerService.PlayerRemoving:connect(function(Player)
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving") print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving")
end) end)
game:GetService("RunService"):Run() RunService:Run()
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
InitalizeSecurityValues(game.Lighting,LauncherMD5,ClientEXEMD5,ClientScriptMD5) InitalizeSecurityValues(game.Lighting,LauncherMD5,ClientEXEMD5,ClientScriptMD5)
InitalizeClientName(game.Lighting)
pcall(function() game.Close:connect(function() NetworkServer:Stop() end) end) pcall(function() game.Close:connect(function() NetworkServer:Stop() end) end)
NetworkServer.IncommingConnection:connect(IncommingConnection) NetworkServer.IncommingConnection:connect(IncommingConnection)
end end

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 952 B

After

Width:  |  Height:  |  Size: 952 B

View File

Before

Width:  |  Height:  |  Size: 956 B

After

Width:  |  Height:  |  Size: 956 B

View File

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 104 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 988 B

After

Width:  |  Height:  |  Size: 988 B