increased 2011 outfit loading speed. added proper kicking
This commit is contained in:
parent
44a1fda831
commit
61ddc385b4
|
|
@ -48,6 +48,8 @@ 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.
|
||||
- Increased the speed of loading outfits in 2011 clients.
|
||||
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.
|
||||
|
|
|
|||
|
|
@ -13,14 +13,11 @@ end
|
|||
|
||||
function KickPlayer(Player,reason)
|
||||
if (Player ~= nil) then
|
||||
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)
|
||||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' was kicked. Reason: "..reason)
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
if (Server:findFirstChild(name) ~= nil) then
|
||||
Child:CloseConnection()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -237,6 +234,16 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
PlayerService.maxPlayers = PlayerLimit
|
||||
end
|
||||
PlayerService.ChildAdded:connect(function(Player)
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
if (Server:findFirstChild(name) == nil) then
|
||||
if (string.match(Child.Name, "ServerReplicator") == nil) then
|
||||
Child.Name = name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Player.Chatted:connect(function(msg)
|
||||
print(Player.Name.."; "..msg)
|
||||
end)
|
||||
|
|
@ -258,11 +265,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
end
|
||||
end
|
||||
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:children()) do
|
||||
Child.Name = "ServerReplicator"
|
||||
end
|
||||
|
||||
coroutine.resume(coroutine.create(function()
|
||||
while Player ~= nil do
|
||||
wait(0.1)
|
||||
|
|
|
|||
|
|
@ -13,14 +13,11 @@ end
|
|||
|
||||
function KickPlayer(Player,reason)
|
||||
if (Player ~= nil) then
|
||||
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)
|
||||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' was kicked. Reason: "..reason)
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
if (Server:findFirstChild(name) ~= nil) then
|
||||
Child:CloseConnection()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -237,6 +234,16 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
PlayerService.maxPlayers = PlayerLimit
|
||||
end
|
||||
PlayerService.ChildAdded:connect(function(Player)
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
if (Server:findFirstChild(name) == nil) then
|
||||
if (string.match(Child.Name, "ServerReplicator") == nil) then
|
||||
Child.Name = name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Player.Chatted:connect(function(msg)
|
||||
print(Player.Name.."; "..msg)
|
||||
end)
|
||||
|
|
@ -258,11 +265,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
end
|
||||
end
|
||||
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:children()) do
|
||||
Child.Name = "ServerReplicator"
|
||||
end
|
||||
|
||||
coroutine.resume(coroutine.create(function()
|
||||
while Player ~= nil do
|
||||
wait(0.1)
|
||||
|
|
|
|||
|
|
@ -13,14 +13,11 @@ end
|
|||
|
||||
function KickPlayer(Player,reason)
|
||||
if (Player ~= nil) then
|
||||
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)
|
||||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' was kicked. Reason: "..reason)
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
if (Server:findFirstChild(name) ~= nil) then
|
||||
Child:CloseConnection()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -261,6 +258,16 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
PlayerService.maxPlayers = PlayerLimit
|
||||
end
|
||||
PlayerService.ChildAdded:connect(function(Player)
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
if (Server:findFirstChild(name) == nil) then
|
||||
if (string.match(Child.Name, "ServerReplicator") == nil) then
|
||||
Child.Name = name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Player.Chatted:connect(function(msg)
|
||||
print(Player.Name.."; "..msg)
|
||||
end)
|
||||
|
|
@ -282,11 +289,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
end
|
||||
end
|
||||
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:children()) do
|
||||
Child.Name = "ServerReplicator"
|
||||
end
|
||||
|
||||
coroutine.resume(coroutine.create(function()
|
||||
while Player ~= nil do
|
||||
wait(0.1)
|
||||
|
|
|
|||
|
|
@ -13,14 +13,11 @@ end
|
|||
|
||||
function KickPlayer(Player,reason)
|
||||
if (Player ~= nil) then
|
||||
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)
|
||||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' was kicked. Reason: "..reason)
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
if (Server:findFirstChild(name) ~= nil) then
|
||||
Child:CloseConnection()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -260,7 +257,18 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
else
|
||||
PlayerService.maxPlayers = PlayerLimit
|
||||
end
|
||||
|
||||
PlayerService.ChildAdded:connect(function(Player)
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
if (Server:findFirstChild(name) == nil) then
|
||||
if (string.match(Child.Name, "ServerReplicator") == nil) then
|
||||
Child.Name = name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Player.Chatted:connect(function(msg)
|
||||
print(Player.Name.."; "..msg)
|
||||
end)
|
||||
|
|
@ -282,11 +290,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
end
|
||||
end
|
||||
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:children()) do
|
||||
Child.Name = "ServerReplicator"
|
||||
end
|
||||
|
||||
coroutine.resume(coroutine.create(function()
|
||||
while Player ~= nil do
|
||||
wait(0.1)
|
||||
|
|
|
|||
|
|
@ -13,14 +13,11 @@ end
|
|||
|
||||
function KickPlayer(Player,reason)
|
||||
if (Player ~= nil) then
|
||||
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)
|
||||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' was kicked. Reason: "..reason)
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
if (Server:findFirstChild(name) ~= nil) then
|
||||
Child:CloseConnection()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -352,6 +349,16 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
PlayerService.MaxPlayers = PlayerLimit
|
||||
end
|
||||
PlayerService.PlayerAdded:connect(function(Player)
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
if (Server:findFirstChild(name) == nil) then
|
||||
if (string.match(Child.Name, "ServerReplicator") == nil) then
|
||||
Child.Name = name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Player.Chatted:connect(function(msg)
|
||||
print(Player.Name.."; "..msg)
|
||||
end)
|
||||
|
|
@ -373,11 +380,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
end
|
||||
end
|
||||
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:GetChildren()) do
|
||||
Child.Name = "ServerReplicator"
|
||||
end
|
||||
|
||||
coroutine.resume(coroutine.create(function()
|
||||
while Player ~= nil do
|
||||
wait(0.1)
|
||||
|
|
|
|||
|
|
@ -13,14 +13,11 @@ end
|
|||
|
||||
function KickPlayer(Player,reason)
|
||||
if (Player ~= nil) then
|
||||
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)
|
||||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' was kicked. Reason: "..reason)
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
if (Server:findFirstChild(name) ~= nil) then
|
||||
Child:CloseConnection()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -352,6 +349,16 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
PlayerService.MaxPlayers = PlayerLimit
|
||||
end
|
||||
PlayerService.PlayerAdded:connect(function(Player)
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
if (Server:findFirstChild(name) == nil) then
|
||||
if (string.match(Child.Name, "ServerReplicator") == nil) then
|
||||
Child.Name = name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Player.Chatted:connect(function(msg)
|
||||
print(Player.Name.."; "..msg)
|
||||
end)
|
||||
|
|
@ -373,11 +380,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
end
|
||||
end
|
||||
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:GetChildren()) do
|
||||
Child.Name = "ServerReplicator"
|
||||
end
|
||||
|
||||
coroutine.resume(coroutine.create(function()
|
||||
while Player ~= nil do
|
||||
wait(0.1)
|
||||
|
|
|
|||
|
|
@ -13,14 +13,11 @@ end
|
|||
|
||||
function KickPlayer(Player,reason)
|
||||
if (Player ~= nil) then
|
||||
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)
|
||||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' was kicked. Reason: "..reason)
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
if (Server:findFirstChild(name) ~= nil) then
|
||||
Child:CloseConnection()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -482,6 +479,16 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
PlayerService.MaxPlayers = PlayerLimit
|
||||
end
|
||||
PlayerService.PlayerAdded:connect(function(Player)
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
if (Server:findFirstChild(name) == nil) then
|
||||
if (string.match(Child.Name, "ServerReplicator") == nil) then
|
||||
Child.Name = name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Player.Chatted:connect(function(msg)
|
||||
print(Player.Name.."; "..msg)
|
||||
end)
|
||||
|
|
@ -503,11 +510,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
end
|
||||
end
|
||||
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:GetChildren()) do
|
||||
Child.Name = "ServerReplicator"
|
||||
end
|
||||
|
||||
while true do
|
||||
wait(0.001)
|
||||
if (Player.Character ~= nil) then
|
||||
|
|
|
|||
|
|
@ -13,14 +13,11 @@ end
|
|||
|
||||
function KickPlayer(Player,reason)
|
||||
if (Player ~= nil) then
|
||||
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)
|
||||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' was kicked. Reason: "..reason)
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
if (Server:findFirstChild(name) ~= nil) then
|
||||
Child:CloseConnection()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -563,6 +560,16 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
PlayerService.MaxPlayers = PlayerLimit
|
||||
end
|
||||
PlayerService.PlayerAdded:connect(function(Player)
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
if (Server:findFirstChild(name) == nil) then
|
||||
if (string.match(Child.Name, "ServerReplicator") == nil) then
|
||||
Child.Name = name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Player.Chatted:connect(function(msg)
|
||||
print(Player.Name.."; "..msg)
|
||||
end)
|
||||
|
|
@ -584,11 +591,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
end
|
||||
end
|
||||
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:GetChildren()) do
|
||||
Child.Name = "ServerReplicator"
|
||||
end
|
||||
|
||||
while true do
|
||||
wait(0.001)
|
||||
if (Player.Character ~= nil) then
|
||||
|
|
|
|||
|
|
@ -13,14 +13,11 @@ end
|
|||
|
||||
function KickPlayer(Player,reason)
|
||||
if (Player ~= nil) then
|
||||
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)
|
||||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' was kicked. Reason: "..reason)
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
if (Server:findFirstChild(name) ~= nil) then
|
||||
Child:CloseConnection()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -563,6 +560,16 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
PlayerService.MaxPlayers = PlayerLimit
|
||||
end
|
||||
PlayerService.PlayerAdded:connect(function(Player)
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
if (Server:findFirstChild(name) == nil) then
|
||||
if (string.match(Child.Name, "ServerReplicator") == nil) then
|
||||
Child.Name = name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Player.Chatted:connect(function(msg)
|
||||
print(Player.Name.."; "..msg)
|
||||
end)
|
||||
|
|
@ -584,11 +591,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
end
|
||||
end
|
||||
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(Server:GetChildren()) do
|
||||
Child.Name = "ServerReplicator"
|
||||
end
|
||||
|
||||
while true do
|
||||
wait(0.001)
|
||||
if (Player.Character ~= nil) then
|
||||
|
|
|
|||
|
|
@ -14,14 +14,11 @@ end
|
|||
|
||||
function KickPlayer(Player,reason)
|
||||
if (Player ~= nil) then
|
||||
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)
|
||||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' was kicked. Reason: "..reason)
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
if (Server:findFirstChild(name) ~= nil) then
|
||||
Child:CloseConnection()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -566,6 +563,16 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
PlayerService.MaxPlayers = PlayerLimit
|
||||
end
|
||||
PlayerService.PlayerAdded:connect(function(Player)
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(NetworkServer:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
if (NetworkServer:findFirstChild(name) == nil) then
|
||||
if (string.match(Child.Name, "ServerReplicator") == nil) then
|
||||
Child.Name = name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (PlayerService.NumPlayers > PlayerService.MaxPlayers) then
|
||||
KickPlayer(Player, "Too many players on server.")
|
||||
else
|
||||
|
|
@ -584,11 +591,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (char ~= nil) then
|
||||
LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),char)
|
||||
end
|
||||
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(NetworkServer:GetChildren()) do
|
||||
Child.Name = "ServerReplicator"
|
||||
end
|
||||
end)
|
||||
|
||||
Player.Changed:connect(function(Property)
|
||||
|
|
|
|||
|
|
@ -31,14 +31,11 @@ end
|
|||
|
||||
function KickPlayer(Player,reason)
|
||||
if (Player ~= nil) then
|
||||
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)
|
||||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' was kicked. Reason: "..reason)
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
if (Server:findFirstChild(name) ~= nil) then
|
||||
Child:CloseConnection()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -69,8 +66,6 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
PlayerService = game:GetService("Players")
|
||||
Player = PlayerService:GetPlayerFromCharacter(newChar)
|
||||
|
||||
wait(0.65)
|
||||
|
||||
local function kick()
|
||||
KickPlayer(Player, "Modified Client")
|
||||
end
|
||||
|
|
@ -584,6 +579,16 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
PlayerService.MaxPlayers = PlayerLimit
|
||||
end
|
||||
PlayerService.PlayerAdded:connect(function(Player)
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(NetworkServer:children()) do
|
||||
if (Child:GetPlayer() == Player) then
|
||||
name = "ServerReplicator"..Player.userId
|
||||
if (NetworkServer:findFirstChild(name) == nil) then
|
||||
Child.Name = name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (PlayerService.NumPlayers > PlayerService.MaxPlayers) then
|
||||
KickPlayer(Player, "Too many players on server.")
|
||||
else
|
||||
|
|
@ -591,18 +596,17 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' joined")
|
||||
end
|
||||
|
||||
Player:LoadCharacter()
|
||||
end
|
||||
|
||||
Player.CharacterAdded:connect(function(char)
|
||||
|
||||
LoadSecurity(newWaitForChildSecurity(Player,"Security"),Player,game.Lighting)
|
||||
newWaitForChildSecurity(Player,"Tripcode")
|
||||
LoadTripcode(Player)
|
||||
pcall(function() print("Player '" .. Player.Name .. "-" .. Player.userId .. "' security check success. Tripcode: '" .. Player.Tripcode.Value .. "'") end)
|
||||
if (char ~= nil) then
|
||||
LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),char)
|
||||
if (Player.Character ~= nil) then
|
||||
LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
Player.Changed:connect(function(Property)
|
||||
if (Property=="Character") and (Player.Character~=nil) then
|
||||
|
|
@ -742,7 +746,6 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
|
||||
pcall(function() Visit:SetUploadUrl("") end)
|
||||
InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID)
|
||||
wait(0.65)
|
||||
InitalizeSecurityValues(Player,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||
InitalizeTripcode(Player,Tripcode)
|
||||
end
|
||||
|
|
@ -763,6 +766,7 @@ 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")
|
||||
|
|
|
|||
|
|
@ -22,14 +22,11 @@ end
|
|||
|
||||
function KickPlayer(Player,reason)
|
||||
if (Player ~= nil) then
|
||||
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)
|
||||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' was kicked. Reason: "..reason)
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator"..Player.userId
|
||||
if (Server:findFirstChild(name) ~= nil) then
|
||||
Child:CloseConnection()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -60,8 +57,6 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
PlayerService = game:GetService("Players")
|
||||
Player = PlayerService:GetPlayerFromCharacter(newChar)
|
||||
|
||||
wait(0.65)
|
||||
|
||||
local function kick()
|
||||
KickPlayer(Player, "Modified Client")
|
||||
end
|
||||
|
|
@ -575,6 +570,16 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
PlayerService.MaxPlayers = PlayerLimit
|
||||
end
|
||||
PlayerService.PlayerAdded:connect(function(Player)
|
||||
-- rename all Server replicators in NetworkServer to "ServerReplicator"
|
||||
for _,Child in pairs(NetworkServer:children()) do
|
||||
if (Child:GetPlayer() == Player) then
|
||||
name = "ServerReplicator"..Player.userId
|
||||
if (NetworkServer:findFirstChild(name) == nil) then
|
||||
Child.Name = name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (PlayerService.NumPlayers > PlayerService.MaxPlayers) then
|
||||
KickPlayer(Player, "Too many players on server.")
|
||||
else
|
||||
|
|
@ -582,18 +587,17 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' joined")
|
||||
end
|
||||
|
||||
Player:LoadCharacter()
|
||||
end
|
||||
|
||||
Player.CharacterAdded:connect(function(char)
|
||||
|
||||
LoadSecurity(newWaitForChildSecurity(Player,"Security"),Player,game.Lighting)
|
||||
newWaitForChildSecurity(Player,"Tripcode")
|
||||
LoadTripcode(Player)
|
||||
pcall(function() print("Player '" .. Player.Name .. "-" .. Player.userId .. "' security check success. Tripcode: '" .. Player.Tripcode.Value .. "'") end)
|
||||
if (char ~= nil) then
|
||||
LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),char)
|
||||
if (Player.Character ~= nil) then
|
||||
LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"), Player.Character)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
Player.Changed:connect(function(Property)
|
||||
if (Property=="Character") and (Player.Character~=nil) then
|
||||
|
|
@ -734,7 +738,6 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
|
|||
|
||||
pcall(function() Visit:SetUploadUrl("") end)
|
||||
InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID)
|
||||
wait(0.65)
|
||||
InitalizeSecurityValues(Player,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||
InitalizeTripcode(Player,Tripcode)
|
||||
end
|
||||
|
|
@ -756,6 +759,7 @@ 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")
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@ function newWaitForChild(newParent,name)
|
|||
end
|
||||
|
||||
function LoadCharacterNew(playerApp,newChar)
|
||||
wait(0.65)
|
||||
|
||||
local path = "rbxasset://../../../shareddata/charcustom/"
|
||||
|
||||
local charparts = {[1] = newWaitForChild(newChar,"Head"),[2] = newWaitForChild(newChar,"Torso"),[3] = newWaitForChild(newChar,"Left Arm"),[4] = newWaitForChild(newChar,"Right Arm"),[5] = newWaitForChild(newChar,"Left Leg"),[6] = newWaitForChild(newChar,"Right Leg")}
|
||||
|
|
@ -428,9 +426,9 @@ function CS3DView(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorI
|
|||
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")
|
||||
game:GetService("Visit"):SetUploadUrl("")
|
||||
|
||||
newWaitForChild(game.StarterGui, "Playerlist")
|
||||
game.StarterGui.Playerlist:clone().Parent = plr.PlayerGui
|
||||
|
|
@ -459,6 +457,7 @@ function CS3DView(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorI
|
|||
human.WalkSpeed = 0
|
||||
human.Jumping:connect(fixJump)
|
||||
|
||||
game:GetService("Visit"):SetUploadUrl("")
|
||||
game:ClearMessage()
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue