server browser fixes, better replicator solution
This commit is contained in:
parent
923a19deb3
commit
4b1ccdb1e9
|
|
@ -1,10 +1,16 @@
|
|||
[[actions]]
|
||||
name = "Play"
|
||||
path = "NovetusLauncher.exe"
|
||||
path = "NovetusBootstrapper.exe"
|
||||
sandbox = true
|
||||
|
||||
[[actions]]
|
||||
name = "Play (Legacy Launcher. USE THIS IF YOU DON'T HAVE NET FRAMEWORK 4.0 INSTALLED.)"
|
||||
path = "Novetus_launcher_legacy.bat"
|
||||
console = true
|
||||
sandbox = true
|
||||
|
||||
[[actions]]
|
||||
name = "Install Dependencies"
|
||||
path = "Novetus_dependency_installer.bat"
|
||||
console = true
|
||||
sandbox = true
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
#region Usings
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Net.Sockets;
|
||||
#endregion
|
||||
|
||||
#region Variable Storage
|
||||
|
|
@ -36,6 +38,7 @@ public class VarStorage
|
|||
ServerIP = SecurityFuncs.Base64DecodeOld(ip);
|
||||
ServerPort = Convert.ToInt32(SecurityFuncs.Base64DecodeOld(port));
|
||||
ServerClient = SecurityFuncs.Base64DecodeOld(client);
|
||||
ServerStatus = PingServer(ServerIP, ServerPort);
|
||||
}
|
||||
|
||||
public bool IsValid()
|
||||
|
|
@ -45,7 +48,8 @@ public class VarStorage
|
|||
!string.IsNullOrWhiteSpace(ServerIP) &&
|
||||
!string.IsNullOrWhiteSpace(ServerPort.ToString()) &&
|
||||
GlobalFuncs.IsClientValid(ServerClient) &&
|
||||
(!ServerIP.Equals("localhost") || !ServerIP.Equals("127.0.0.1")))
|
||||
(!ServerIP.Equals("localhost") || !ServerIP.Equals("127.0.0.1")) &&
|
||||
!GetStatusString().Equals("Offline"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
@ -55,10 +59,33 @@ public class VarStorage
|
|||
}
|
||||
}
|
||||
|
||||
//Modified from https://stackoverflow.com/questions/22903861/how-to-check-remote-ip-and-port-is-available
|
||||
public static bool PingServer(string hostUri, int portNumber)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var client = new UdpClient(hostUri, portNumber))
|
||||
return true;
|
||||
}
|
||||
catch (SocketException ex)
|
||||
{
|
||||
#if URI || LAUNCHER || CMD
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public string GetStatusString()
|
||||
{
|
||||
return (ServerStatus ? "Online" : "Offline");
|
||||
}
|
||||
|
||||
public string ServerName { get; set; }
|
||||
public string ServerIP { get; set; }
|
||||
public int ServerPort { get; set; }
|
||||
public string ServerClient { get; set; }
|
||||
public bool ServerStatus { get; set; }
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ namespace NovetusLauncher
|
|||
|
||||
void MainFormClose(object sender, CancelEventArgs e)
|
||||
{
|
||||
launcherForm.CloseEvent();
|
||||
launcherForm.CloseEvent(e);
|
||||
}
|
||||
|
||||
void TextBox1TextChanged(object sender, EventArgs e)
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ namespace NovetusLauncher
|
|||
|
||||
void MainFormClose(object sender, CancelEventArgs e)
|
||||
{
|
||||
launcherForm.CloseEvent();
|
||||
launcherForm.CloseEvent(e);
|
||||
}
|
||||
|
||||
void TextBox1TextChanged(object sender, EventArgs e)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
using Mono.Nat;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
|
|
@ -288,7 +289,23 @@ namespace NovetusLauncher
|
|||
}
|
||||
}
|
||||
|
||||
public void CloseEvent()
|
||||
public void CloseEvent(CancelEventArgs e)
|
||||
{
|
||||
if (GlobalVars.AdminMode)
|
||||
{
|
||||
DialogResult closeNovetus = MessageBox.Show("You are in Admin Mode.\nAre you sure you want to quit Novetus?", "Novetus - Admin Mode Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
|
||||
if (closeNovetus == DialogResult.No)
|
||||
{
|
||||
e.Cancel = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
CloseEventInternal();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void CloseEventInternal()
|
||||
{
|
||||
if (!GlobalVars.LocalPlayMode)
|
||||
{
|
||||
|
|
@ -744,16 +761,18 @@ namespace NovetusLauncher
|
|||
if (FormStyle != Settings.Style.Extended)
|
||||
{
|
||||
GlobalVars.UserConfiguration.LauncherStyle = Settings.Style.Extended;
|
||||
CloseEvent();
|
||||
Application.Restart();
|
||||
CloseEventInternal();
|
||||
System.Diagnostics.Process.Start(Application.ExecutablePath);
|
||||
Application.Exit();
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (FormStyle != Settings.Style.Compact)
|
||||
{
|
||||
GlobalVars.UserConfiguration.LauncherStyle = Settings.Style.Compact;
|
||||
CloseEvent();
|
||||
Application.Restart();
|
||||
CloseEventInternal();
|
||||
System.Diagnostics.Process.Start(Application.ExecutablePath);
|
||||
Application.Exit();
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
|
|
@ -761,8 +780,9 @@ namespace NovetusLauncher
|
|||
if (FormStyle != Settings.Style.Stylish)
|
||||
{
|
||||
GlobalVars.UserConfiguration.LauncherStyle = Settings.Style.Stylish;
|
||||
CloseEvent();
|
||||
Application.Restart();
|
||||
CloseEventInternal();
|
||||
System.Diagnostics.Process.Start(Application.ExecutablePath);
|
||||
Application.Exit();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,13 +89,28 @@ namespace NovetusLauncher
|
|||
|
||||
void LauncherFormStylish_Close(object sender, CancelEventArgs e)
|
||||
{
|
||||
CloseEvent();
|
||||
Application.Exit();
|
||||
CloseEvent(e);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Functions
|
||||
public void CloseEvent()
|
||||
public void CloseEvent(CancelEventArgs e)
|
||||
{
|
||||
if (GlobalVars.AdminMode)
|
||||
{
|
||||
DialogResult closeNovetus = MessageBox.Show("You are in Admin Mode.\nAre you sure you want to quit Novetus?", "Novetus - Admin Mode Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
|
||||
if (closeNovetus == DialogResult.No)
|
||||
{
|
||||
e.Cancel = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
CloseEventInternal();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void CloseEventInternal()
|
||||
{
|
||||
WriteConfigValues();
|
||||
|
||||
|
|
@ -103,6 +118,8 @@ namespace NovetusLauncher
|
|||
{
|
||||
DiscordRPC.Shutdown();
|
||||
}
|
||||
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
void splashLabel_Paint(object sender, PaintEventArgs e)
|
||||
|
|
|
|||
|
|
@ -455,13 +455,15 @@ namespace NovetusLauncher
|
|||
{
|
||||
case 0:
|
||||
GlobalVars.UserConfiguration.LauncherStyle = Settings.Style.Extended;
|
||||
FormParent.CloseEvent();
|
||||
System.Windows.Forms.Application.Restart();
|
||||
FormParent.CloseEventInternal();
|
||||
System.Diagnostics.Process.Start(System.Windows.Forms.Application.ExecutablePath);
|
||||
System.Windows.Forms.Application.Exit();
|
||||
break;
|
||||
case 1:
|
||||
GlobalVars.UserConfiguration.LauncherStyle = Settings.Style.Compact;
|
||||
FormParent.CloseEvent();
|
||||
System.Windows.Forms.Application.Restart();
|
||||
FormParent.CloseEventInternal();
|
||||
System.Diagnostics.Process.Start(System.Windows.Forms.Application.ExecutablePath);
|
||||
System.Windows.Forms.Application.Exit();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -50,9 +50,11 @@ namespace NovetusLauncher
|
|||
//
|
||||
// MasterServerBox
|
||||
//
|
||||
this.MasterServerBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.MasterServerBox.Location = new System.Drawing.Point(135, 10);
|
||||
this.MasterServerBox.Name = "MasterServerBox";
|
||||
this.MasterServerBox.Size = new System.Drawing.Size(131, 20);
|
||||
this.MasterServerBox.Size = new System.Drawing.Size(323, 20);
|
||||
this.MasterServerBox.TabIndex = 1;
|
||||
this.MasterServerBox.TextChanged += new System.EventHandler(this.MasterServerBox_TextChanged);
|
||||
//
|
||||
|
|
@ -67,12 +69,13 @@ namespace NovetusLauncher
|
|||
//
|
||||
// MasterServerRefreshButton
|
||||
//
|
||||
this.MasterServerRefreshButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.MasterServerRefreshButton.AutoEllipsis = true;
|
||||
this.MasterServerRefreshButton.Location = new System.Drawing.Point(272, 8);
|
||||
this.MasterServerRefreshButton.Image = global::NovetusLauncher.Properties.Resources.refresh;
|
||||
this.MasterServerRefreshButton.Location = new System.Drawing.Point(464, 8);
|
||||
this.MasterServerRefreshButton.Name = "MasterServerRefreshButton";
|
||||
this.MasterServerRefreshButton.Size = new System.Drawing.Size(125, 23);
|
||||
this.MasterServerRefreshButton.Size = new System.Drawing.Size(25, 23);
|
||||
this.MasterServerRefreshButton.TabIndex = 3;
|
||||
this.MasterServerRefreshButton.Text = "REFRESH SERVERS";
|
||||
this.MasterServerRefreshButton.UseVisualStyleBackColor = true;
|
||||
this.MasterServerRefreshButton.Click += new System.EventHandler(this.MasterServerRefreshButton_Click);
|
||||
//
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using System.Collections.Generic;
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
|
@ -16,7 +17,7 @@ namespace NovetusLauncher
|
|||
{
|
||||
#region Private Variables
|
||||
List<VarStorage.GameServer> serverList = new List<VarStorage.GameServer>();
|
||||
private int selectedServer;
|
||||
private VarStorage.GameServer selectedServer;
|
||||
private string oldIP;
|
||||
private int oldPort;
|
||||
#endregion
|
||||
|
|
@ -38,16 +39,15 @@ namespace NovetusLauncher
|
|||
{
|
||||
try
|
||||
{
|
||||
if (ServerListView.Items.Count > 0 && ServerListView.Items[selectedServer] != null && serverList[selectedServer] != null)
|
||||
if (ServerListView.Items.Count > 0 && selectedServer != null)
|
||||
{
|
||||
VarStorage.GameServer curServer = serverList[selectedServer];
|
||||
if (curServer.IsValid())
|
||||
if (selectedServer.IsValid())
|
||||
{
|
||||
oldIP = GlobalVars.IP;
|
||||
oldPort = GlobalVars.JoinPort;
|
||||
GlobalVars.IP = curServer.ServerIP;
|
||||
GlobalVars.JoinPort = curServer.ServerPort;
|
||||
GlobalFuncs.LaunchRBXClient(curServer.ServerClient, ScriptType.Client, false, true, new EventHandler(ClientExited), null);
|
||||
GlobalVars.IP = selectedServer.ServerIP;
|
||||
GlobalVars.JoinPort = selectedServer.ServerPort;
|
||||
GlobalFuncs.LaunchRBXClient(selectedServer.ServerClient, ScriptType.Client, false, true, new EventHandler(ClientExited), null);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -80,7 +80,7 @@ namespace NovetusLauncher
|
|||
int intselectedindex = ServerListView.SelectedIndices[0];
|
||||
if (intselectedindex >= 0)
|
||||
{
|
||||
selectedServer = ServerListView.Items[intselectedindex].Index;
|
||||
selectedServer = serverList.Find(item => item.ServerName == ServerListView.Items[intselectedindex].Text);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
@ -137,10 +137,7 @@ namespace NovetusLauncher
|
|||
string DecodedLine = SecurityFuncs.Base64DecodeOld(line);
|
||||
string[] serverInfo = DecodedLine.Split('|');
|
||||
VarStorage.GameServer gameServer = new VarStorage.GameServer(serverInfo[0], serverInfo[1], serverInfo[2], serverInfo[3]);
|
||||
if (gameServer.IsValid() && !serverList.Any(item => item.ServerName.Equals(gameServer.ServerName)))
|
||||
{
|
||||
serverList.Add(gameServer);
|
||||
}
|
||||
serverList.Add(gameServer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -176,13 +173,25 @@ namespace NovetusLauncher
|
|||
ColumnClient.Width = 75;
|
||||
ServerListView.Columns.Add(ColumnClient);
|
||||
|
||||
var ColumnStatus = new ColumnHeader();
|
||||
ColumnStatus.Text = "Status";
|
||||
ColumnStatus.TextAlign = HorizontalAlignment.Center;
|
||||
ColumnStatus.Width = 75;
|
||||
ServerListView.Columns.Add(ColumnStatus);
|
||||
|
||||
foreach (var server in serverList)
|
||||
{
|
||||
if (!server.IsValid())
|
||||
continue;
|
||||
|
||||
var serverItem = new ListViewItem(server.ServerName);
|
||||
|
||||
var serverClient = new ListViewItem.ListViewSubItem(serverItem, server.ServerClient);
|
||||
serverItem.SubItems.Add(serverClient);
|
||||
|
||||
var serverStatus = new ListViewItem.ListViewSubItem(serverItem, server.GetStatusString());
|
||||
serverItem.SubItems.Add(serverStatus);
|
||||
|
||||
ServerListView.Items.Add(serverItem);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,26 +27,7 @@ namespace NovetusLauncher
|
|||
GlobalVars.ColorsLoaded = GlobalFuncs.InitColors();
|
||||
if (args.Length == 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
switch (GlobalVars.UserConfiguration.LauncherStyle)
|
||||
{
|
||||
case Settings.Style.Compact:
|
||||
System.Windows.Forms.Application.Run(new LauncherFormCompact());
|
||||
break;
|
||||
case Settings.Style.Extended:
|
||||
System.Windows.Forms.Application.Run(new LauncherFormExtended());
|
||||
break;
|
||||
case Settings.Style.Stylish:
|
||||
default:
|
||||
System.Windows.Forms.Application.Run(new LauncherFormStylish());
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
}
|
||||
RunLauncher();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -58,6 +39,30 @@ namespace NovetusLauncher
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void RunLauncher()
|
||||
{
|
||||
try
|
||||
{
|
||||
switch (GlobalVars.UserConfiguration.LauncherStyle)
|
||||
{
|
||||
case Settings.Style.Compact:
|
||||
System.Windows.Forms.Application.Run(new LauncherFormCompact());
|
||||
break;
|
||||
case Settings.Style.Extended:
|
||||
System.Windows.Forms.Application.Run(new LauncherFormExtended());
|
||||
break;
|
||||
case Settings.Style.Stylish:
|
||||
default:
|
||||
System.Windows.Forms.Application.Run(new LauncherFormStylish());
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,5 +79,15 @@ namespace NovetusLauncher.Properties {
|
|||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap refresh {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("refresh", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -124,4 +124,7 @@
|
|||
<data name="NOVETUS_small" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\NOVETUS_small.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="refresh" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\refresh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -48,8 +48,10 @@ Changes from Pre-Release 5:
|
|||
- The server browser will now load the current master server address on bootup.
|
||||
- Fixed a bug where joining a game with the Server Browser loads the wrong IP address in the game title.
|
||||
- The user will now know when the Server Browser is loading servers.
|
||||
- Novetus will now properly kick players.
|
||||
- Novetus will now properly kick players who join with modified clients/scripts.
|
||||
- Server hosters may now insert a "SkipSecurity" object into Lighting that will skip security. SkipSecurity may also be removed to re-enable security.
|
||||
- Increased the speed of loading outfits in 2011 clients.
|
||||
- Fixed issues with launching Novetus from itch.io.
|
||||
Changes from 1.2.4.1:
|
||||
- The OBJ2MeshV1GUI, The Asset Localizer, and the Item SDK have been merged to form the Asset SDK!
|
||||
- Works with the Roblox Asset Delivery API! Note: Script assets wil have to be downloaded manually in order to be used in scripts.
|
||||
|
|
|
|||
|
|
@ -12,9 +12,13 @@ function newWaitForChild(newParent,name)
|
|||
end
|
||||
|
||||
function KickPlayer(Player,reason)
|
||||
if (game.Lighting:findFirstChild("SkipSecurity") ~= nil) then
|
||||
do return end
|
||||
end
|
||||
|
||||
if (Player ~= nil) then
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) ~= nil) then
|
||||
Child:CloseConnection()
|
||||
end
|
||||
|
|
@ -233,10 +237,19 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
else
|
||||
PlayerService.maxPlayers = PlayerLimit
|
||||
end
|
||||
|
||||
local playerCount = 0
|
||||
PlayerService.ChildAdded:connect(function(Player)
|
||||
-- create anonymous player identifier. This is so we can track clients without tripcodes
|
||||
playerCount = playerCount + 1
|
||||
|
||||
local code = Instance.new("StringValue", Player)
|
||||
code.Value = playerCount
|
||||
code.Name = "AnonymousIdentifier"
|
||||
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) == nil) then
|
||||
if (string.match(Child.Name, "ServerReplicator") == nil) then
|
||||
Child.Name = name
|
||||
|
|
@ -347,7 +360,7 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
end
|
||||
|
||||
local function failed(peer, errcode, why)
|
||||
dieerror("Failed to connect to the Game. (ID="..errcode.." ["..why.."])")
|
||||
dieerror("Failed to connect to the Game. (ID="..errcode..")")
|
||||
end
|
||||
|
||||
local suc, err = pcall(function()
|
||||
|
|
@ -371,8 +384,8 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
end
|
||||
|
||||
function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID)
|
||||
local plr = game.Players:createLocalPlayer(UserID)
|
||||
game:service("RunService"):run()
|
||||
local plr = game.Players:createLocalPlayer(UserID)
|
||||
game.Workspace:insertContent("rbxasset://Fonts//libraries.rbxm")
|
||||
plr.Name = PlayerName
|
||||
plr:SetAdminMode(true)
|
||||
|
|
|
|||
|
|
@ -12,9 +12,13 @@ function newWaitForChild(newParent,name)
|
|||
end
|
||||
|
||||
function KickPlayer(Player,reason)
|
||||
if (game.Lighting:findFirstChild("SkipSecurity") ~= nil) then
|
||||
do return end
|
||||
end
|
||||
|
||||
if (Player ~= nil) then
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) ~= nil) then
|
||||
Child:CloseConnection()
|
||||
end
|
||||
|
|
@ -233,10 +237,19 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
else
|
||||
PlayerService.maxPlayers = PlayerLimit
|
||||
end
|
||||
|
||||
local playerCount = 0
|
||||
PlayerService.ChildAdded:connect(function(Player)
|
||||
-- create anonymous player identifier. This is so we can track clients without tripcodes
|
||||
playerCount = playerCount + 1
|
||||
|
||||
local code = Instance.new("StringValue", Player)
|
||||
code.Value = playerCount
|
||||
code.Name = "AnonymousIdentifier"
|
||||
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) == nil) then
|
||||
if (string.match(Child.Name, "ServerReplicator") == nil) then
|
||||
Child.Name = name
|
||||
|
|
@ -347,7 +360,7 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
end
|
||||
|
||||
local function failed(peer, errcode, why)
|
||||
dieerror("Failed to connect to the Game. (ID="..errcode.." ["..why.."])")
|
||||
dieerror("Failed to connect to the Game. (ID="..errcode..")")
|
||||
end
|
||||
|
||||
local suc, err = pcall(function()
|
||||
|
|
@ -371,8 +384,8 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
end
|
||||
|
||||
function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID)
|
||||
local plr = game.Players:createLocalPlayer(UserID)
|
||||
game:service("RunService"):run()
|
||||
local plr = game.Players:createLocalPlayer(UserID)
|
||||
game.Workspace:insertContent("rbxasset://Fonts//libraries.rbxm")
|
||||
plr.Name = PlayerName
|
||||
plr:SetAdminMode(true)
|
||||
|
|
|
|||
|
|
@ -12,9 +12,13 @@ function newWaitForChild(newParent,name)
|
|||
end
|
||||
|
||||
function KickPlayer(Player,reason)
|
||||
if (game.Lighting:findFirstChild("SkipSecurity") ~= nil) then
|
||||
do return end
|
||||
end
|
||||
|
||||
if (Player ~= nil) then
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) ~= nil) then
|
||||
Child:CloseConnection()
|
||||
end
|
||||
|
|
@ -257,10 +261,19 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
else
|
||||
PlayerService.maxPlayers = PlayerLimit
|
||||
end
|
||||
|
||||
local playerCount = 0
|
||||
PlayerService.ChildAdded:connect(function(Player)
|
||||
-- create anonymous player identifier. This is so we can track clients without tripcodes
|
||||
playerCount = playerCount + 1
|
||||
|
||||
local code = Instance.new("StringValue", Player)
|
||||
code.Value = playerCount
|
||||
code.Name = "AnonymousIdentifier"
|
||||
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) == nil) then
|
||||
if (string.match(Child.Name, "ServerReplicator") == nil) then
|
||||
Child.Name = name
|
||||
|
|
@ -371,7 +384,7 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
end
|
||||
|
||||
local function failed(peer, errcode, why)
|
||||
dieerror("Failed to connect to the Game. (ID="..errcode.." ["..why.."])")
|
||||
dieerror("Failed to connect to the Game. (ID="..errcode..")")
|
||||
end
|
||||
|
||||
local suc, err = pcall(function()
|
||||
|
|
@ -391,8 +404,8 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
end
|
||||
|
||||
function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID)
|
||||
local plr = game.Players:createLocalPlayer(UserID)
|
||||
game:service("RunService"):run()
|
||||
local plr = game.Players:createLocalPlayer(UserID)
|
||||
game.Workspace:insertContent("rbxasset://Fonts//libraries.rbxm")
|
||||
plr.Name = PlayerName
|
||||
plr:SetAdminMode(true)
|
||||
|
|
|
|||
|
|
@ -12,9 +12,13 @@ function newWaitForChild(newParent,name)
|
|||
end
|
||||
|
||||
function KickPlayer(Player,reason)
|
||||
if (game.Lighting:findFirstChild("SkipSecurity") ~= nil) then
|
||||
do return end
|
||||
end
|
||||
|
||||
if (Player ~= nil) then
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) ~= nil) then
|
||||
Child:CloseConnection()
|
||||
end
|
||||
|
|
@ -258,10 +262,18 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
PlayerService.maxPlayers = PlayerLimit
|
||||
end
|
||||
|
||||
local playerCount = 0
|
||||
PlayerService.ChildAdded:connect(function(Player)
|
||||
-- create anonymous player identifier. This is so we can track clients without tripcodes
|
||||
playerCount = playerCount + 1
|
||||
|
||||
local code = Instance.new("StringValue", Player)
|
||||
code.Value = playerCount
|
||||
code.Name = "AnonymousIdentifier"
|
||||
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) == nil) then
|
||||
if (string.match(Child.Name, "ServerReplicator") == nil) then
|
||||
Child.Name = name
|
||||
|
|
@ -372,7 +384,7 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
end
|
||||
|
||||
local function failed(peer, errcode, why)
|
||||
dieerror("Failed to connect to the Game. (ID="..errcode.." ["..why.."])")
|
||||
dieerror("Failed to connect to the Game. (ID="..errcode..")")
|
||||
end
|
||||
|
||||
local suc, err = pcall(function()
|
||||
|
|
@ -392,8 +404,8 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
end
|
||||
|
||||
function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID)
|
||||
local plr = game.Players:createLocalPlayer(UserID)
|
||||
game:service("RunService"):run()
|
||||
local plr = game.Players:createLocalPlayer(UserID)
|
||||
game.Workspace:insertContent("rbxasset://Fonts//libraries.rbxm")
|
||||
plr.Name = PlayerName
|
||||
plr:SetAdminMode(true)
|
||||
|
|
|
|||
|
|
@ -12,9 +12,13 @@ function newWaitForChild(newParent,name)
|
|||
end
|
||||
|
||||
function KickPlayer(Player,reason)
|
||||
if (game.Lighting:FindFirstChild("SkipSecurity") ~= nil) then
|
||||
do return end
|
||||
end
|
||||
|
||||
if (Player ~= nil) then
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) ~= nil) then
|
||||
Child:CloseConnection()
|
||||
end
|
||||
|
|
@ -348,10 +352,19 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
else
|
||||
PlayerService.MaxPlayers = PlayerLimit
|
||||
end
|
||||
|
||||
local playerCount = 0
|
||||
PlayerService.PlayerAdded:connect(function(Player)
|
||||
-- create anonymous player identifier. This is so we can track clients without tripcodes
|
||||
playerCount = playerCount + 1
|
||||
|
||||
local code = Instance.new("StringValue", Player)
|
||||
code.Value = playerCount
|
||||
code.Name = "AnonymousIdentifier"
|
||||
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) == nil) then
|
||||
if (string.match(Child.Name, "ServerReplicator") == nil) then
|
||||
Child.Name = name
|
||||
|
|
@ -461,7 +474,7 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
end
|
||||
|
||||
local function failed(peer, errcode, why)
|
||||
dieerror("Failed to connect to the Game. (ID="..errcode.." ["..why.."])")
|
||||
dieerror("Failed to connect to the Game. (ID="..errcode..")")
|
||||
end
|
||||
|
||||
local suc, err = pcall(function()
|
||||
|
|
@ -481,8 +494,8 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
end
|
||||
|
||||
function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID)
|
||||
local plr = game.Players:CreateLocalPlayer(UserID)
|
||||
game:GetService("RunService"):run()
|
||||
local plr = game.Players:CreateLocalPlayer(UserID)
|
||||
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
|
||||
plr.Name = PlayerName
|
||||
plr:LoadCharacter()
|
||||
|
|
|
|||
|
|
@ -12,9 +12,13 @@ function newWaitForChild(newParent,name)
|
|||
end
|
||||
|
||||
function KickPlayer(Player,reason)
|
||||
if (game.Lighting:FindFirstChild("SkipSecurity") ~= nil) then
|
||||
do return end
|
||||
end
|
||||
|
||||
if (Player ~= nil) then
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) ~= nil) then
|
||||
Child:CloseConnection()
|
||||
end
|
||||
|
|
@ -348,10 +352,19 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
else
|
||||
PlayerService.MaxPlayers = PlayerLimit
|
||||
end
|
||||
|
||||
local playerCount = 0
|
||||
PlayerService.PlayerAdded:connect(function(Player)
|
||||
-- create anonymous player identifier. This is so we can track clients without tripcodes
|
||||
playerCount = playerCount + 1
|
||||
|
||||
local code = Instance.new("StringValue", Player)
|
||||
code.Value = playerCount
|
||||
code.Name = "AnonymousIdentifier"
|
||||
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) == nil) then
|
||||
if (string.match(Child.Name, "ServerReplicator") == nil) then
|
||||
Child.Name = name
|
||||
|
|
@ -461,7 +474,7 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
end
|
||||
|
||||
local function failed(peer, errcode, why)
|
||||
dieerror("Failed to connect to the Game. (ID="..errcode.." ["..why.."])")
|
||||
dieerror("Failed to connect to the Game. (ID="..errcode..")")
|
||||
end
|
||||
|
||||
local suc, err = pcall(function()
|
||||
|
|
@ -481,8 +494,8 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
end
|
||||
|
||||
function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID)
|
||||
local plr = game.Players:CreateLocalPlayer(UserID)
|
||||
game:GetService("RunService"):run()
|
||||
local plr = game.Players:CreateLocalPlayer(UserID)
|
||||
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
|
||||
plr.Name = PlayerName
|
||||
plr:LoadCharacter()
|
||||
|
|
|
|||
|
|
@ -12,9 +12,13 @@ function newWaitForChild(newParent,name)
|
|||
end
|
||||
|
||||
function KickPlayer(Player,reason)
|
||||
if (game.Lighting:FindFirstChild("SkipSecurity") ~= nil) then
|
||||
do return end
|
||||
end
|
||||
|
||||
if (Player ~= nil) then
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) ~= nil) then
|
||||
Child:CloseConnection()
|
||||
end
|
||||
|
|
@ -478,10 +482,19 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
else
|
||||
PlayerService.MaxPlayers = PlayerLimit
|
||||
end
|
||||
|
||||
local playerCount = 0
|
||||
PlayerService.PlayerAdded:connect(function(Player)
|
||||
-- create anonymous player identifier. This is so we can track clients without tripcodes
|
||||
playerCount = playerCount + 1
|
||||
|
||||
local code = Instance.new("StringValue", Player)
|
||||
code.Value = playerCount
|
||||
code.Name = "AnonymousIdentifier"
|
||||
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) == nil) then
|
||||
if (string.match(Child.Name, "ServerReplicator") == nil) then
|
||||
Child.Name = name
|
||||
|
|
@ -591,7 +604,7 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
end
|
||||
|
||||
local function failed(peer, errcode, why)
|
||||
dieerror("Failed to connect to the Game. (ID="..errcode.." ["..why.."])")
|
||||
dieerror("Failed to connect to the Game. (ID="..errcode..")")
|
||||
end
|
||||
|
||||
local suc, err = pcall(function()
|
||||
|
|
@ -611,8 +624,8 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
end
|
||||
|
||||
function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID)
|
||||
local plr = game.Players:CreateLocalPlayer(UserID)
|
||||
game:GetService("RunService"):run()
|
||||
local plr = game.Players:CreateLocalPlayer(UserID)
|
||||
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
|
||||
plr.Name = PlayerName
|
||||
plr:LoadCharacter()
|
||||
|
|
|
|||
|
|
@ -12,9 +12,13 @@ function newWaitForChild(newParent,name)
|
|||
end
|
||||
|
||||
function KickPlayer(Player,reason)
|
||||
if (game.Lighting:FindFirstChild("SkipSecurity") ~= nil) then
|
||||
do return end
|
||||
end
|
||||
|
||||
if (Player ~= nil) then
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) ~= nil) then
|
||||
Child:CloseConnection()
|
||||
end
|
||||
|
|
@ -559,10 +563,19 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
else
|
||||
PlayerService.MaxPlayers = PlayerLimit
|
||||
end
|
||||
|
||||
local playerCount = 0
|
||||
PlayerService.PlayerAdded:connect(function(Player)
|
||||
-- create anonymous player identifier. This is so we can track clients without tripcodes
|
||||
playerCount = playerCount + 1
|
||||
|
||||
local code = Instance.new("StringValue", Player)
|
||||
code.Value = playerCount
|
||||
code.Name = "AnonymousIdentifier"
|
||||
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) == nil) then
|
||||
if (string.match(Child.Name, "ServerReplicator") == nil) then
|
||||
Child.Name = name
|
||||
|
|
@ -685,7 +698,7 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
end
|
||||
|
||||
local function failed(peer, errcode, why)
|
||||
dieerror("Failed to connect to the Game. (ID="..errcode.." ["..why.."])")
|
||||
dieerror("Failed to connect to the Game. (ID="..errcode..")")
|
||||
end
|
||||
|
||||
local suc, err = pcall(function()
|
||||
|
|
@ -705,8 +718,8 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
end
|
||||
|
||||
function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID)
|
||||
local plr = game.Players:CreateLocalPlayer(UserID)
|
||||
game:GetService("RunService"):run()
|
||||
local plr = game.Players:CreateLocalPlayer(UserID)
|
||||
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
|
||||
plr.Name = PlayerName
|
||||
plr:LoadCharacter()
|
||||
|
|
|
|||
|
|
@ -12,9 +12,13 @@ function newWaitForChild(newParent,name)
|
|||
end
|
||||
|
||||
function KickPlayer(Player,reason)
|
||||
if (game.Lighting:FindFirstChild("SkipSecurity") ~= nil) then
|
||||
do return end
|
||||
end
|
||||
|
||||
if (Player ~= nil) then
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) ~= nil) then
|
||||
Child:CloseConnection()
|
||||
end
|
||||
|
|
@ -559,10 +563,19 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
else
|
||||
PlayerService.MaxPlayers = PlayerLimit
|
||||
end
|
||||
|
||||
local playerCount = 0
|
||||
PlayerService.PlayerAdded:connect(function(Player)
|
||||
-- create anonymous player identifier. This is so we can track clients without tripcodes
|
||||
playerCount = playerCount + 1
|
||||
|
||||
local code = Instance.new("StringValue", Player)
|
||||
code.Value = playerCount
|
||||
code.Name = "AnonymousIdentifier"
|
||||
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) == nil) then
|
||||
if (string.match(Child.Name, "ServerReplicator") == nil) then
|
||||
Child.Name = name
|
||||
|
|
@ -685,7 +698,7 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
end
|
||||
|
||||
local function failed(peer, errcode, why)
|
||||
dieerror("Failed to connect to the Game. (ID="..errcode.." ["..why.."])")
|
||||
dieerror("Failed to connect to the Game. (ID="..errcode..")")
|
||||
end
|
||||
|
||||
local suc, err = pcall(function()
|
||||
|
|
@ -705,8 +718,8 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
end
|
||||
|
||||
function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID)
|
||||
local plr = game.Players:CreateLocalPlayer(UserID)
|
||||
game:GetService("RunService"):run()
|
||||
local plr = game.Players:CreateLocalPlayer(UserID)
|
||||
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
|
||||
plr.Name = PlayerName
|
||||
plr:LoadCharacter()
|
||||
|
|
|
|||
|
|
@ -13,9 +13,13 @@ function newWaitForChild(newParent,name)
|
|||
end
|
||||
|
||||
function KickPlayer(Player,reason)
|
||||
if (game.Lighting:FindFirstChild("SkipSecurity") ~= nil) then
|
||||
do return end
|
||||
end
|
||||
|
||||
if (Player ~= nil) then
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) ~= nil) then
|
||||
Child:CloseConnection()
|
||||
end
|
||||
|
|
@ -562,10 +566,19 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
else
|
||||
PlayerService.MaxPlayers = PlayerLimit
|
||||
end
|
||||
|
||||
local playerCount = 0
|
||||
PlayerService.PlayerAdded:connect(function(Player)
|
||||
-- create anonymous player identifier. This is so we can track clients without tripcodes
|
||||
playerCount = playerCount + 1
|
||||
|
||||
local code = Instance.new("StringValue", Player)
|
||||
code.Value = playerCount
|
||||
code.Name = "AnonymousIdentifier"
|
||||
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(NetworkServer:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (NetworkServer:findFirstChild(name) == nil) then
|
||||
if (string.match(Child.Name, "ServerReplicator") == nil) then
|
||||
Child.Name = name
|
||||
|
|
@ -683,7 +696,7 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
end
|
||||
|
||||
local function ConnectionFailed(Peer, Code, why)
|
||||
SetMessage("Failed to connect to the Game. (ID="..Code.." ["..why.."])")
|
||||
SetMessage("Failed to connect to the Game. (ID="..Code..")")
|
||||
end
|
||||
|
||||
pcall(function() settings().Diagnostics:LegacyScriptMode() end)
|
||||
|
|
@ -727,8 +740,8 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
end
|
||||
|
||||
function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID)
|
||||
local plr = game.Players:CreateLocalPlayer(UserID)
|
||||
game:GetService("RunService"):Run()
|
||||
local plr = game.Players:CreateLocalPlayer(UserID)
|
||||
plr.Name = PlayerName
|
||||
plr:LoadCharacter()
|
||||
plr.CharacterAppearance=0
|
||||
|
|
|
|||
|
|
@ -30,9 +30,13 @@ function newWaitForChild(newParent,name)
|
|||
end
|
||||
|
||||
function KickPlayer(Player,reason)
|
||||
if (game.Lighting:FindFirstChild("SkipSecurity") ~= nil) then
|
||||
do return end
|
||||
end
|
||||
|
||||
if (Player ~= nil) then
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) ~= nil) then
|
||||
Child:CloseConnection()
|
||||
end
|
||||
|
|
@ -578,11 +582,20 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
else
|
||||
PlayerService.MaxPlayers = PlayerLimit
|
||||
end
|
||||
|
||||
local playerCount = 0
|
||||
PlayerService.PlayerAdded:connect(function(Player)
|
||||
-- create anonymous player identifier. This is so we can track clients without tripcodes
|
||||
playerCount = playerCount + 1
|
||||
|
||||
local code = Instance.new("StringValue", Player)
|
||||
code.Value = playerCount
|
||||
code.Name = "AnonymousIdentifier"
|
||||
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(NetworkServer:children()) do
|
||||
if (Child:GetPlayer() == Player) then
|
||||
name = "ServerReplicator"..Player.userId
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (NetworkServer:findFirstChild(name) == nil) then
|
||||
Child.Name = name
|
||||
end
|
||||
|
|
@ -698,7 +711,7 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
end
|
||||
|
||||
local function ConnectionFailed(Peer, Code, why)
|
||||
SetMessage("Failed to connect to the Game. (ID="..Code.." ["..why.."])")
|
||||
SetMessage("Failed to connect to the Game. (ID="..Code..")")
|
||||
end
|
||||
|
||||
pcall(function() settings().Diagnostics:LegacyScriptMode() end)
|
||||
|
|
@ -751,8 +764,8 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
end
|
||||
|
||||
function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID)
|
||||
local plr = game.Players:CreateLocalPlayer(UserID)
|
||||
game:GetService("RunService"):Run()
|
||||
local plr = game.Players:CreateLocalPlayer(UserID)
|
||||
plr.Name = PlayerName
|
||||
plr:LoadCharacter()
|
||||
if (IconType == "BC") then
|
||||
|
|
@ -766,7 +779,6 @@ function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,
|
|||
end
|
||||
plr.CharacterAppearance=0
|
||||
InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID)
|
||||
wait(0.5)
|
||||
LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false)
|
||||
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
|
||||
newWaitForChild(game.StarterGui, "Dialogs")
|
||||
|
|
|
|||
|
|
@ -21,9 +21,13 @@ function newWaitForChild(newParent,name)
|
|||
end
|
||||
|
||||
function KickPlayer(Player,reason)
|
||||
if (game.Lighting:FindFirstChild("SkipSecurity") ~= nil) then
|
||||
do return end
|
||||
end
|
||||
|
||||
if (Player ~= nil) then
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) ~= nil) then
|
||||
Child:CloseConnection()
|
||||
end
|
||||
|
|
@ -569,11 +573,20 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
else
|
||||
PlayerService.MaxPlayers = PlayerLimit
|
||||
end
|
||||
|
||||
local playerCount = 0
|
||||
PlayerService.PlayerAdded:connect(function(Player)
|
||||
-- create anonymous player identifier. This is so we can track clients without tripcodes
|
||||
playerCount = playerCount + 1
|
||||
|
||||
local code = Instance.new("StringValue", Player)
|
||||
code.Value = playerCount
|
||||
code.Name = "AnonymousIdentifier"
|
||||
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(NetworkServer:children()) do
|
||||
if (Child:GetPlayer() == Player) then
|
||||
name = "ServerReplicator"..Player.userId
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (NetworkServer:findFirstChild(name) == nil) then
|
||||
Child.Name = name
|
||||
end
|
||||
|
|
@ -689,7 +702,7 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
end
|
||||
|
||||
local function ConnectionFailed(Peer, Code, why)
|
||||
SetMessage("Failed to connect to the Game. (ID="..Code.." ["..why.."])")
|
||||
SetMessage("Failed to connect to the Game. (ID="..Code..")")
|
||||
end
|
||||
|
||||
pcall(function() settings().Diagnostics:LegacyScriptMode() end)
|
||||
|
|
@ -743,8 +756,8 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
end
|
||||
|
||||
function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID)
|
||||
local plr = game.Players:CreateLocalPlayer(UserID)
|
||||
game:GetService("RunService"):Run()
|
||||
local plr = game.Players:CreateLocalPlayer(UserID)
|
||||
plr.Name = PlayerName
|
||||
plr:LoadCharacter()
|
||||
if (IconType == "BC") then
|
||||
|
|
@ -759,7 +772,6 @@ function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,
|
|||
game.GuiRoot.ScoreHud:Remove()
|
||||
plr.CharacterAppearance=0
|
||||
InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID)
|
||||
wait(0.5)
|
||||
LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false)
|
||||
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
|
||||
newWaitForChild(game.StarterGui, "Dialogs")
|
||||
|
|
|
|||
|
|
@ -404,6 +404,8 @@ end
|
|||
print("3DView loaded. Nerd.")
|
||||
|
||||
function CS3DView(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID)
|
||||
game:GetService("RunService"):Run()
|
||||
|
||||
game.CoreGui.RobloxGui:Remove()
|
||||
game.GuiRoot.RightPalette:Remove()
|
||||
game.GuiRoot.ChatMenuPanel:Remove()
|
||||
|
|
@ -412,7 +414,6 @@ function CS3DView(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorI
|
|||
game:SetMessage("Loading Player...")
|
||||
|
||||
local plr = game.Players:CreateLocalPlayer(UserID)
|
||||
game:GetService("RunService"):Run()
|
||||
plr.Name = PlayerName
|
||||
plr:LoadCharacter()
|
||||
if (IconType == "BC") then
|
||||
|
|
|
|||
Loading…
Reference in New Issue