Updated csmpfunctions. Fixed bug with body menu.

This commit is contained in:
Bitl 2017-07-29 20:30:43 -07:00
parent 53f512c42f
commit 53d3a7a5da
2 changed files with 332 additions and 207 deletions

View File

@ -1,69 +1,48 @@
--coded by Bitl and Carrot --coded by Bitl and Carrot
--stuff was borrowed from RBXBanland, EnergyCell, John, and the RBXPri team --stuff was borrowed from RBXBanland, EnergyCell, John, and the RBXPri team
rbxlegacyversion = "" rbxlegacyversion = 0
function SetRBXLegacyVersion(Version) function SetRBXLegacyVersion(Version)
rbxlegacyversion = Version rbxlegacyversion = Version
if (rbxlegacyversion == "pre-alpha") then if (rbxlegacyversion == 1) then -- Pre Alpha
settings().Rendering.frameRateManager = 2 settings().Rendering.frameRateManager = 2
settings().Rendering.graphicsMode = 2 settings().Rendering.graphicsMode = 2
settings().Network.MaxSendBuffer = 1000000 settings().Network.MaxSendBuffer = 1000000
settings().Network.PhysicsReplicationUpdateRate = 1000000 settings().Network.PhysicsReplicationUpdateRate = 1000000
settings().Network.SendRate = 1000000 settings().Network.SendRate = 1000000
elseif (rbxlegacyversion == "pre-alpha-ext") then elseif (rbxlegacyversion == 2) then -- Ext. Pre Alpha
settings().Rendering.frameRateManager = 2 settings().Rendering.frameRateManager = 2
settings().Rendering.graphicsMode = 2 settings().Rendering.graphicsMode = 2
settings().Network.MaxSendBuffer = 1000000 settings().Network.MaxSendBuffer = 1000000
settings().Network.PhysicsReplicationUpdateRate = 1000000 settings().Network.PhysicsReplicationUpdateRate = 1000000
settings().Network.SendRate = 1000000 settings().Network.SendRate = 1000000
elseif (rbxlegacyversion == "alpha") then elseif (rbxlegacyversion == 3) then -- Alpha
settings().Rendering.frameRateManager = 2 settings().Rendering.frameRateManager = 2
settings().Network.MaxSendBuffer = 1000000 settings().Network.MaxSendBuffer = 1000000
settings().Network.PhysicsReplicationUpdateRate = 1000000 settings().Network.PhysicsReplicationUpdateRate = 1000000
settings().Network.SendRate = 1000000 settings().Network.SendRate = 1000000
elseif (rbxlegacyversion == "beta") then elseif (rbxlegacyversion == 4) then -- Beta
settings().Rendering.FrameRateManager = 2 settings().Rendering.FrameRateManager = 2
settings().Network.SendRate = 30 settings().Network.SendRate = 30
settings().Network.ReceiveRate = 60 settings().Network.ReceiveRate = 60
elseif (rbxlegacyversion == "delta-beta") then elseif (rbxlegacyversion == 5) then -- Beta Pre-Gamma
settings().Rendering.FrameRateManager = 2
settings().Network.SendRate = 30
settings().Network.ReceiveRate = 60
elseif (rbxlegacyversion == "pre-gamma-beta") then
settings().Rendering.FrameRateManager = 2 settings().Rendering.FrameRateManager = 2
settings().Network.DataSendRate = 30 settings().Network.DataSendRate = 30
settings().Network.PhysicsSendRate = 20 settings().Network.PhysicsSendRate = 20
settings().Network.ReceiveRate = 60 settings().Network.ReceiveRate = 60
elseif (rbxlegacyversion == "delta-pre-gamma-beta") then elseif (rbxlegacyversion == 6) then -- Pre-Gamma
settings().Rendering.FrameRateManager = 2 settings().Rendering.FrameRateManager = 2
settings().Network.DataSendRate = 30 settings().Network.DataSendRate = 30
settings().Network.PhysicsSendRate = 20 settings().Network.PhysicsSendRate = 20
settings().Network.ReceiveRate = 60 settings().Network.ReceiveRate = 60
elseif (rbxlegacyversion == "pre-gamma") then elseif (rbxlegacyversion == 7) then -- Gamma
settings().Rendering.FrameRateManager = 2
settings().Network.DataSendRate = 30
settings().Network.PhysicsSendRate = 20
settings().Network.ReceiveRate = 60
elseif (rbxlegacyversion == "delta-pre-gamma") then
settings().Rendering.FrameRateManager = 2
settings().Network.DataSendRate = 30
settings().Network.PhysicsSendRate = 20
settings().Network.ReceiveRate = 60
elseif (rbxlegacyversion == "gamma") then
settings().Rendering.FrameRateManager = 2 settings().Rendering.FrameRateManager = 2
settings().Network.DataSendRate = 30 settings().Network.DataSendRate = 30
settings().Network.PhysicsSendRate = 20 settings().Network.PhysicsSendRate = 20
settings().Network.ReceiveRate = 60 settings().Network.ReceiveRate = 60
pcall(function() game:GetService("ScriptContext").ScriptsDisabled = false end) pcall(function() game:GetService("ScriptContext").ScriptsDisabled = false end)
pcall(function() settings().Diagnostics:LegacyScriptMode() end) pcall(function() settings().Diagnostics:LegacyScriptMode() end)
elseif (rbxlegacyversion == "delta-gamma") then elseif (rbxlegacyversion == 8) then -- Delta
settings().Rendering.FrameRateManager = 2
settings().Network.DataSendRate = 30
settings().Network.PhysicsSendRate = 20
settings().Network.ReceiveRate = 60
pcall(function() game:GetService("ScriptContext").ScriptsDisabled = false end)
pcall(function() settings().Diagnostics:LegacyScriptMode() end)
elseif (rbxlegacyversion == "delta") then
settings().Rendering.FrameRateManager = 2 settings().Rendering.FrameRateManager = 2
pcall(function() game:GetService("ScriptContext").ScriptsDisabled = false end) pcall(function() game:GetService("ScriptContext").ScriptsDisabled = false end)
pcall(function() settings().Diagnostics:LegacyScriptMode() end) pcall(function() settings().Diagnostics:LegacyScriptMode() end)
@ -117,13 +96,13 @@ function SetRBXLegacyVersion(Version)
end)) end))
wait() -- intalizing wait() -- intalizing
game.GuiRoot.ScoreHud:Remove() -- no legacy scorehud, allow for the new one game.GuiRoot.ScoreHud:Remove() -- no legacy scorehud, allow for the new one
elseif (rbxlegacyversion == "delta-omega") then elseif (rbxlegacyversion == 9) then -- Delta Omega
settings().Rendering.FrameRateManager = 2 settings().Rendering.FrameRateManager = 2
pcall(function() game:GetService("ScriptContext").ScriptsDisabled = false end) pcall(function() game:GetService("ScriptContext").ScriptsDisabled = false end)
pcall(function() settings().Diagnostics:LegacyScriptMode() end) pcall(function() settings().Diagnostics:LegacyScriptMode() end)
wait() -- intalizing wait() -- intalizing
game.GuiRoot.ScoreHud:Remove() -- no legacy scorehud, allow for the new one game.GuiRoot.ScoreHud:Remove() -- no legacy scorehud, allow for the new one
elseif (rbxlegacyversion == "omega") then elseif (rbxlegacyversion == 10) then -- Omega
settings().Rendering.FrameRateManager = 2 settings().Rendering.FrameRateManager = 2
pcall(function() game:GetService("ScriptContext").ScriptsDisabled = false end) pcall(function() game:GetService("ScriptContext").ScriptsDisabled = false end)
pcall(function() settings().Diagnostics:LegacyScriptMode() pcall(function() settings().Diagnostics:LegacyScriptMode()
@ -141,10 +120,10 @@ function SetRBXLegacyVersion(Version)
scriptContext:AddCoreScript("CoreScripts/BackpackFull", RobloxGui) scriptContext:AddCoreScript("CoreScripts/BackpackFull", RobloxGui)
]]--todo: file:// (rbxasset://) and the corescript adder thing ]]--todo: file:// (rbxasset://) and the corescript adder thing
end) end)
--[[elseif (rbxlegacyversion == "ultra") then elseif (rbxlegacyversion == 11) then -- Ultra
settings().Rendering.FrameRateManager = 2 settings().Rendering.FrameRateManager = 2
pcall(function() game:GetService("ScriptContext").ScriptsDisabled = false end) pcall(function() game:GetService("ScriptContext").ScriptsDisabled = false end)
pcall(function() settings().Diagnostics:LegacyScriptMode() end)]]--we aren't ready for this yet pcall(function() settings().Diagnostics:LegacyScriptMode() end)
end end
print("RBXLegacy client operation set to '" .. rbxlegacyversion .. "'.") print("RBXLegacy client operation set to '" .. rbxlegacyversion .. "'.")
end end
@ -164,6 +143,7 @@ end
function LoadCharacterNew(playerApp,newChar) function LoadCharacterNew(playerApp,newChar)
--authentic roblox style loading --authentic roblox style loading
wait(1.5)
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")} 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")}
for _,newVal in pairs(playerApp:GetChildren()) do for _,newVal in pairs(playerApp:GetChildren()) do
if (newVal.CustomizationType.Value == 1) then if (newVal.CustomizationType.Value == 1) then
@ -171,7 +151,7 @@ function LoadCharacterNew(playerApp,newChar)
charparts[newVal.ColorIndex.Value].BrickColor = newVal.Value charparts[newVal.ColorIndex.Value].BrickColor = newVal.Value
end) end)
elseif (newVal.CustomizationType.Value == 2) then elseif (newVal.CustomizationType.Value == 2) then
if (rbxlegacyversion ~= "pre-alpha") then if (rbxlegacyversion > 1) then
pcall(function() pcall(function()
local newHat = game.Workspace:InsertContent("rbxasset://../../../charcustom/hats/"..newVal.Value) local newHat = game.Workspace:InsertContent("rbxasset://../../../charcustom/hats/"..newVal.Value)
if newHat[1] then if newHat[1] then
@ -184,7 +164,7 @@ function LoadCharacterNew(playerApp,newChar)
end) end)
end end
elseif (newVal.CustomizationType.Value == 3) then elseif (newVal.CustomizationType.Value == 3) then
if (rbxlegacyversion ~= "pre-alpha") then if (rbxlegacyversion > 1) then
pcall(function() pcall(function()
local newTShirt = game.Workspace:InsertContent("http://www.roblox.com/asset/?id="..newVal.Value) local newTShirt = game.Workspace:InsertContent("http://www.roblox.com/asset/?id="..newVal.Value)
if newTShirt[1] then if newTShirt[1] then
@ -197,7 +177,7 @@ function LoadCharacterNew(playerApp,newChar)
end) end)
end end
elseif (newVal.CustomizationType.Value == 4) then elseif (newVal.CustomizationType.Value == 4) then
if (rbxlegacyversion ~= "pre-alpha" or rbxlegacyversion ~= "pre-alpha-ext") then if (rbxlegacyversion > 2) then
pcall(function() pcall(function()
local newShirt = game.Workspace:InsertContent("http://www.roblox.com/asset/?id="..newVal.Value) local newShirt = game.Workspace:InsertContent("http://www.roblox.com/asset/?id="..newVal.Value)
if newShirt[1] then if newShirt[1] then
@ -210,7 +190,7 @@ function LoadCharacterNew(playerApp,newChar)
end) end)
end end
elseif (newVal.CustomizationType.Value == 5) then elseif (newVal.CustomizationType.Value == 5) then
if (rbxlegacyversion ~= "pre-alpha" or rbxlegacyversion ~= "pre-alpha-ext") then if (rbxlegacyversion > 2) then
pcall(function() pcall(function()
local newPants = game.Workspace:InsertContent("http://www.roblox.com/asset/?id="..newVal.Value) local newPants = game.Workspace:InsertContent("http://www.roblox.com/asset/?id="..newVal.Value)
if newPants[1] then if newPants[1] then
@ -223,7 +203,7 @@ function LoadCharacterNew(playerApp,newChar)
end) end)
end end
elseif (newVal.CustomizationType.Value == 6) then elseif (newVal.CustomizationType.Value == 6) then
if (rbxlegacyversion ~= "pre-alpha" or rbxlegacyversion ~= "pre-alpha-ext" or rbxlegacyversion ~= "alpha" or rbxlegacyversion ~= "beta" or rbxlegacyversion ~= "delta-beta" or rbxlegacyversion ~= "pre-gamma-beta" or rbxlegacyversion ~= "delta-pre-gamma-beta") then if (rbxlegacyversion > 5) then
pcall(function() pcall(function()
local newFace = game.Workspace:InsertContent("rbxasset://../../../charcustom/faces/"..newVal.Value) local newFace = game.Workspace:InsertContent("rbxasset://../../../charcustom/faces/"..newVal.Value)
if newFace[1] then if newFace[1] then
@ -238,7 +218,7 @@ function LoadCharacterNew(playerApp,newChar)
end) end)
end end
elseif (newVal.CustomizationType.Value == 7) then elseif (newVal.CustomizationType.Value == 7) then
if (rbxlegacyversion ~= "pre-alpha" or rbxlegacyversion ~= "pre-alpha-ext" or rbxlegacyversion ~= "alpha" or rbxlegacyversion ~= "beta" or rbxlegacyversion ~= "delta-beta" or rbxlegacyversion ~= "pre-gamma-beta" or rbxlegacyversion ~= "delta-pre-gamma-beta") then if (rbxlegacyversion > 5) then
pcall(function() pcall(function()
local newPart = game.Workspace:InsertContent("rbxasset://../../../charcustom/heads/"..newVal.Value) local newPart = game.Workspace:InsertContent("rbxasset://../../../charcustom/heads/"..newVal.Value)
if newPart[1] then if newPart[1] then
@ -252,7 +232,7 @@ function LoadCharacterNew(playerApp,newChar)
end) end)
end end
elseif (newVal.CustomizationType.Value == 8) then elseif (newVal.CustomizationType.Value == 8) then
if (rbxlegacyversion ~= "pre-alpha" or rbxlegacyversion ~= "pre-alpha-ext" or rbxlegacyversion ~= "alpha" or rbxlegacyversion ~= "beta" or rbxlegacyversion ~= "delta-beta" or rbxlegacyversion ~= "pre-gamma" or rbxlegacyversion ~= "delta-pre-gamma" or rbxlegacyversion ~= "pre-gamma-beta" or rbxlegacyversion ~= "delta-pre-gamma-beta") then if (rbxlegacyversion > 6) then
pcall(function() pcall(function()
local newPart = game.Workspace:InsertContent("rbxasset://../../../charcustom/bodies/"..newVal.MeshIndex.Value.."/"..newVal.Value) local newPart = game.Workspace:InsertContent("rbxasset://../../../charcustom/bodies/"..newVal.MeshIndex.Value.."/"..newVal.Value)
if newPart[1] then if newPart[1] then
@ -327,7 +307,6 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
typeValue.Value = 1 typeValue.Value = 1
end end
--HATS --HATS
if (rbxlegacyversion ~= "pre-alpha") then
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
@ -360,9 +339,7 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
typeValue.Parent = newHat typeValue.Parent = newHat
typeValue.Value = 2 typeValue.Value = 2
end end
end
--T-SHIRT --T-SHIRT
if (rbxlegacyversion ~= "pre-alpha") then
local newTShirt = Instance.new("StringValue",newCharApp) local newTShirt = Instance.new("StringValue",newCharApp)
if (TShirtID ~= nil or TShirtID ~= "0") then if (TShirtID ~= nil or TShirtID ~= "0") then
newTShirt.Value = TShirtID newTShirt.Value = TShirtID
@ -374,9 +351,7 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
typeValue.Name = "CustomizationType" typeValue.Name = "CustomizationType"
typeValue.Parent = newTShirt typeValue.Parent = newTShirt
typeValue.Value = 3 typeValue.Value = 3
end --SHIRT
--SHIRTS AND PANTS
if (rbxlegacyversion ~= "pre-alpha" or rbxlegacyversion ~= "pre-alpha-ext") then
local newShirt = Instance.new("StringValue",newCharApp) local newShirt = Instance.new("StringValue",newCharApp)
if (ShirtID ~= nil or ShirtID ~= "0") then if (ShirtID ~= nil or ShirtID ~= "0") then
newShirt.Value = ShirtID newShirt.Value = ShirtID
@ -388,7 +363,7 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
typeValue.Name = "CustomizationType" typeValue.Name = "CustomizationType"
typeValue.Parent = newShirt typeValue.Parent = newShirt
typeValue.Value = 4 typeValue.Value = 4
--PANTS
local newPants = Instance.new("StringValue",newCharApp) local newPants = Instance.new("StringValue",newCharApp)
if (PantsID ~= nil or PantsID ~= "0") then if (PantsID ~= nil or PantsID ~= "0") then
newPants.Value = PantsID newPants.Value = PantsID
@ -400,9 +375,7 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
typeValue.Name = "CustomizationType" typeValue.Name = "CustomizationType"
typeValue.Parent = newPants typeValue.Parent = newPants
typeValue.Value = 5 typeValue.Value = 5
end --FACE
--FACE AND HEADS
if (rbxlegacyversion ~= "pre-alpha" or rbxlegacyversion ~= "pre-alpha-ext" or rbxlegacyversion ~= "alpha" or rbxlegacyversion ~= "beta" or rbxlegacyversion ~= "delta-beta" or rbxlegacyversion ~= "pre-gamma-beta" or rbxlegacyversion ~= "delta-pre-gamma-beta") then
local newFace = Instance.new("StringValue",newCharApp) local newFace = Instance.new("StringValue",newCharApp)
if (FaceID ~= nil) then if (FaceID ~= nil) then
newFace.Value = FaceID newFace.Value = FaceID
@ -415,7 +388,7 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
typeValue.Name = "CustomizationType" typeValue.Name = "CustomizationType"
typeValue.Parent = newFace typeValue.Parent = newFace
typeValue.Value = 6 typeValue.Value = 6
--HEADS
local newHead = Instance.new("StringValue",newCharApp) local newHead = Instance.new("StringValue",newCharApp)
if (HeadID ~= nil) then if (HeadID ~= nil) then
newHead.Value = HeadID newHead.Value = HeadID
@ -428,9 +401,7 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
typeValue.Name = "CustomizationType" typeValue.Name = "CustomizationType"
typeValue.Parent = newHead typeValue.Parent = newHead
typeValue.Value = 7 typeValue.Value = 7
end
--PACKAGES --PACKAGES
if (rbxlegacyversion ~= "pre-alpha" or rbxlegacyversion ~= "pre-alpha-ext" or rbxlegacyversion ~= "alpha" or rbxlegacyversion ~= "beta" or rbxlegacyversion ~= "delta-beta" or rbxlegacyversion ~= "pre-gamma" or rbxlegacyversion ~= "delta-pre-gamma" or rbxlegacyversion ~= "pre-gamma-beta" or rbxlegacyversion ~= "delta-pre-gamma-beta") then
for i=2,5,1 do for i=2,5,1 do
local BodyMesh = Instance.new("StringValue",newCharApp) local BodyMesh = Instance.new("StringValue",newCharApp)
if (i == 2) then if (i == 2) then
@ -483,16 +454,15 @@ function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,Torso
typeValue.Parent = BodyColor typeValue.Parent = BodyColor
typeValue.Value = 8 typeValue.Value = 8
end end
end
end end
function CSServer(Port,PlayerLimit) function CSServer(Port,PlayerLimit)
if (rbxlegacyversion == "delta" or rbxlegacyversion == "delta-gamma" or rbxlegacyversion == "omega" or rbxlegacyversion == "delta-pre-gamma" or rbxlegacyversion == "delta-omega" or rbxlegacyversion == "delta-beta" or rbxlegacyversion == "delta-pre-gamma-beta") then if (rbxlegacyversion >= 8) then
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")
pcall(NetworkServer.Stop,NetworkServer) pcall(NetworkServer.Stop,NetworkServer)
NetworkServer:Start(Port) NetworkServer:Start(Port)
if (rbxlegacyversion ~= "omega") then if (rbxlegacyversion < 9) then
game:GetService("Players").MaxPlayers = PlayerLimit game:GetService("Players").MaxPlayers = PlayerLimit
end end
game:GetService("Players").PlayerAdded:connect(function(Player) game:GetService("Players").PlayerAdded:connect(function(Player)
@ -572,7 +542,7 @@ function CSServer(Port,PlayerLimit)
end end
function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,TorsoID,RArmID,LArmID,RLegID,LLegID,IconType,Ticket) function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,TorsoID,RArmID,LArmID,RLegID,LLegID,IconType,Ticket)
if (rbxlegacyversion == "delta" or rbxlegacyversion == "delta-gamma" or rbxlegacyversion == "omega" or rbxlegacyversion == "delta-pre-gamma" or rbxlegacyversion == "delta-omega" or rbxlegacyversion == "delta-beta" or rbxlegacyversion == "delta-pre-gamma-beta") then if (rbxlegacyversion >= 8) then
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)
game:GetService("RunService"):Run() game:GetService("RunService"):Run()
@ -655,7 +625,7 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
end end
end end
pcall(function() Player:SetUnder13(false) end) pcall(function() Player:SetUnder13(false) end)
if (rbxlegacyversion == "delta" or rbxlegacyversion == "omega" or rbxlegacyversion == "delta-omega") then if (rbxlegacyversion >= 8) then
if (IconType == "BC") then if (IconType == "BC") then
Player:SetMembershipType(Enum.MembershipType.BuildersClub) Player:SetMembershipType(Enum.MembershipType.BuildersClub)
elseif (IconType == "TBC") then elseif (IconType == "TBC") then
@ -672,9 +642,9 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
pcall(function() Player.Name=PlayerName or "" end) pcall(function() Player.Name=PlayerName or "" end)
pcall(function() Visit:SetUploadUrl("") end) pcall(function() Visit:SetUploadUrl("") end)
game:GetService("Visit") game:GetService("Visit")
if (rbxlegacyversion == "delta") then if (rbxlegacyversion == 8) then
game.CoreGui.RobloxGui.TopLeftControl.Help:Remove() game.CoreGui.RobloxGui.TopLeftControl.Help:Remove()
elseif (rbxlegacyversion == "omega" or rbxlegacyversion == "delta-omega") then elseif (rbxlegacyversion > 8) then
game.CoreGui.RobloxGui.ControlFrame.BottomRightControl.Help:Remove() game.CoreGui.RobloxGui.ControlFrame.BottomRightControl.Help:Remove()
game.CoreGui.RobloxGui.ControlFrame.BottomRightControl.ReportAbuse:Remove() game.CoreGui.RobloxGui.ControlFrame.BottomRightControl.ReportAbuse:Remove()
game.CoreGui.RobloxGui.ControlFrame.BottomRightControl.RecordToggle:Remove() game.CoreGui.RobloxGui.ControlFrame.BottomRightControl.RecordToggle:Remove()
@ -682,9 +652,10 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
game.CoreGui.RobloxGui.ControlFrame.BottomRightControl.ToggleFullScreen:Remove() game.CoreGui.RobloxGui.ControlFrame.BottomRightControl.ToggleFullScreen:Remove()
game.CoreGui.RobloxGui.ControlFrame.BottomLeftControl.TogglePlayMode:Remove() game.CoreGui.RobloxGui.ControlFrame.BottomLeftControl.TogglePlayMode:Remove()
game.CoreGui.RobloxGui.ControlFrame.BottomLeftControl.Exit:Remove() game.CoreGui.RobloxGui.ControlFrame.BottomLeftControl.Exit:Remove()
wait(5) -- we have to wait until the menu gets built, don't we?
Player.PlayerGui.Menu.UserSettingsShield.Settings.SettingsStyle.GameSettingsMenu.FullscreenCheckbox:SetVerb("ToggleFullScreen") Player.PlayerGui.Menu.UserSettingsShield.Settings.SettingsStyle.GameSettingsMenu.FullscreenCheckbox:SetVerb("ToggleFullScreen")
Player.PlayerGui.Menu.UserSettingsShield.Settings.SettingsStyle.GameMainMenu.ScreenshotButton:SetVerb("Screenshot") Player.PlayerGui.Menu.UserSettingsShield.Settings.SettingsStyle.GameMainMenu.ScreenshotButton:SetVerb("Screenshot")
elseif (rbxlegacyversion == 11) then
game.CoreGui.RobloxGui.ControlFrame.BottomRightControl:Remove()
end end
InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,TorsoID,RArmID,LArmID,RLegID,LLegID) InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,TorsoID,RArmID,LArmID,RLegID,LLegID)
else else
@ -762,15 +733,15 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He
end end
function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,TorsoID,RArmID,LArmID,RLegID,LLegID,IconType) function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,TorsoID,RArmID,LArmID,RLegID,LLegID,IconType)
if (rbxlegacyversion == "omega" or rbxlegacyversion == "delta-omega") then if (rbxlegacyversion > 8) then
game:GetService("RunService"):Run() game:GetService("RunService"):Run()
else else
game:GetService("RunService"):run() game:GetService("RunService"):run()
end end
game.Workspace:InsertContent("rbxasset://fonts//libraries.rbxm") game.Workspace:InsertContent("rbxasset://fonts//libraries.rbxm")
if (rbxlegacyversion == "delta") then if (rbxlegacyversion == 8) then
game.CoreGui.RobloxGui.TopLeftControl.Help:Remove() game.CoreGui.RobloxGui.TopLeftControl.Help:Remove()
elseif (rbxlegacyversion == "omega" or rbxlegacyversion == "delta-omega") then elseif (rbxlegacyversion >= 8) then
game.CoreGui.RobloxGui.ControlFrame.BottomRightControl.Help:Remove() game.CoreGui.RobloxGui.ControlFrame.BottomRightControl.Help:Remove()
game.CoreGui.RobloxGui.ControlFrame.BottomRightControl.ReportAbuse:Remove() game.CoreGui.RobloxGui.ControlFrame.BottomRightControl.ReportAbuse:Remove()
game.CoreGui.RobloxGui.ControlFrame.BottomRightControl.RecordToggle:Remove() game.CoreGui.RobloxGui.ControlFrame.BottomRightControl.RecordToggle:Remove()
@ -778,20 +749,18 @@ function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,
game.CoreGui.RobloxGui.ControlFrame.BottomRightControl.ToggleFullScreen:Remove() game.CoreGui.RobloxGui.ControlFrame.BottomRightControl.ToggleFullScreen:Remove()
game.CoreGui.RobloxGui.ControlFrame.BottomLeftControl.TogglePlayMode:Remove() game.CoreGui.RobloxGui.ControlFrame.BottomLeftControl.TogglePlayMode:Remove()
game.CoreGui.RobloxGui.ControlFrame.BottomLeftControl.Exit:Remove() game.CoreGui.RobloxGui.ControlFrame.BottomLeftControl.Exit:Remove()
end elseif (rbxlegacyversion == 11) then
--[[elseif (rbxlegacyversion == "ultra") then
game.CoreGui.RobloxGui.ControlFrame.BottomRightControl:Remove() game.CoreGui.RobloxGui.ControlFrame.BottomRightControl:Remove()
end]] end
local plr = game.Players:CreateLocalPlayer(UserID) local plr = game.Players:CreateLocalPlayer(UserID)
plr.Name = PlayerName plr.Name = PlayerName
plr:LoadCharacter() plr:LoadCharacter()
if (rbxlegacyversion == "omega") then if (rbxlegacyversion >= 9) then
wait(5) -- we have to wait until the menu gets built, don't we?
plr.PlayerGui.Menu.UserSettingsShield.Settings.SettingsStyle.GameSettingsMenu.FullscreenCheckbox:SetVerb("ToggleFullScreen") plr.PlayerGui.Menu.UserSettingsShield.Settings.SettingsStyle.GameSettingsMenu.FullscreenCheckbox:SetVerb("ToggleFullScreen")
plr.PlayerGui.Menu.UserSettingsShield.Settings.SettingsStyle.GameMainMenu.ScreenshotButton:SetVerb("Screenshot") plr.PlayerGui.Menu.UserSettingsShield.Settings.SettingsStyle.GameMainMenu.ScreenshotButton:SetVerb("Screenshot")
end end
pcall(function() plr:SetUnder13(false) end) pcall(function() plr:SetUnder13(false) end)
if (rbxlegacyversion == "delta" or rbxlegacyversion == "omega" or rbxlegacyversion == "delta-omega") then if (rbxlegacyversion >= 8) then
if (IconType == "BC") then if (IconType == "BC") then
plr:SetMembershipType(Enum.MembershipType.BuildersClub) plr:SetMembershipType(Enum.MembershipType.BuildersClub)
elseif (IconType == "TBC") then elseif (IconType == "TBC") then

View File

@ -105,7 +105,161 @@ namespace RBXLegacyLauncher
void tabControl1_SelectedIndexChanged(object sender, EventArgs e) void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
{ {
if (tabControl1.SelectedTab == tabControl1.TabPages["tabPage2"])//your specific tabname if (tabControl1.SelectedTab == tabControl1.TabPages["tabPage1"])
{
if (tabControl2.SelectedTab == tabControl2.TabPages["tabPage6"])//your specific tabname
{
string partdir;
if (SelectedPart == "Head")
{
partdir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\charcustom\\heads";
if (Directory.Exists(partdir))
{
listBox5.Items.Clear();
DirectoryInfo dinfo = new DirectoryInfo(partdir);
FileInfo[] Files = dinfo.GetFiles("*.rbxm");
foreach( FileInfo file in Files )
{
if (file.Name.Equals(String.Empty))
{
continue;
}
listBox5.Items.Add(file.Name);
}
listBox5.SelectedItem = GlobalVars.HeadID;
listBox5.Enabled = true;
Image icon5 = Image.FromFile(partdir + "\\" + GlobalVars.HeadID.Replace(".rbxm", "") + ".png");
pictureBox5.Image = icon5;
}
}
else if (SelectedPart == "Torso")
{
partdir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\charcustom\\bodies\\2";
if (Directory.Exists(partdir))
{
listBox5.Items.Clear();
DirectoryInfo dinfo = new DirectoryInfo(partdir);
FileInfo[] Files = dinfo.GetFiles("*.rbxm");
foreach( FileInfo file in Files )
{
if (file.Name.Equals(String.Empty))
{
continue;
}
listBox5.Items.Add(file.Name);
}
listBox5.SelectedItem = GlobalVars.TorsoID;
listBox5.Enabled = true;
Image icon5 = Image.FromFile(partdir + "\\" + GlobalVars.TorsoID.Replace(".rbxm", "") + ".png");
pictureBox5.Image = icon5;
}
}
else if (SelectedPart == "Right Arm")
{
partdir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\charcustom\\bodies\\3";
if (Directory.Exists(partdir))
{
listBox5.Items.Clear();
DirectoryInfo dinfo = new DirectoryInfo(partdir);
FileInfo[] Files = dinfo.GetFiles("*.rbxm");
foreach( FileInfo file in Files )
{
if (file.Name.Equals(String.Empty))
{
continue;
}
listBox5.Items.Add(file.Name);
}
listBox5.SelectedItem = GlobalVars.RightArmID;
listBox5.Enabled = true;
Image icon5 = Image.FromFile(partdir + "\\" + GlobalVars.RightArmID.Replace(".rbxm", "") + ".png");
pictureBox5.Image = icon5;
}
}
else if (SelectedPart == "Left Arm")
{
partdir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\charcustom\\bodies\\4";
if (Directory.Exists(partdir))
{
listBox5.Items.Clear();
DirectoryInfo dinfo = new DirectoryInfo(partdir);
FileInfo[] Files = dinfo.GetFiles("*.rbxm");
foreach( FileInfo file in Files )
{
if (file.Name.Equals(String.Empty))
{
continue;
}
listBox5.Items.Add(file.Name);
}
listBox5.SelectedItem = GlobalVars.LeftArmID;
listBox5.Enabled = true;
Image icon5 = Image.FromFile(partdir + "\\" + GlobalVars.LeftArmID.Replace(".rbxm", "") + ".png");
pictureBox5.Image = icon5;
}
}
else if (SelectedPart == "Right Leg")
{
partdir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\charcustom\\bodies\\5";
if (Directory.Exists(partdir))
{
listBox5.Items.Clear();
DirectoryInfo dinfo = new DirectoryInfo(partdir);
FileInfo[] Files = dinfo.GetFiles("*.rbxm");
foreach( FileInfo file in Files )
{
if (file.Name.Equals(String.Empty))
{
continue;
}
listBox5.Items.Add(file.Name);
}
listBox5.SelectedItem = GlobalVars.RightLegID;
listBox5.Enabled = true;
Image icon5 = Image.FromFile(partdir + "\\" + GlobalVars.RightLegID.Replace(".rbxm", "") + ".png");
pictureBox5.Image = icon5;
}
}
else if (SelectedPart == "Left Leg")
{
partdir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\charcustom\\bodies\\6";
if (Directory.Exists(partdir))
{
listBox5.Items.Clear();
DirectoryInfo dinfo = new DirectoryInfo(partdir);
FileInfo[] Files = dinfo.GetFiles("*.rbxm");
foreach( FileInfo file in Files )
{
if (file.Name.Equals(String.Empty))
{
continue;
}
listBox5.Items.Add(file.Name);
}
listBox5.SelectedItem = GlobalVars.LeftLegID;
listBox5.Enabled = true;
Image icon5 = Image.FromFile(partdir + "\\" + GlobalVars.LeftLegID.Replace(".rbxm", "") + ".png");
pictureBox5.Image = icon5;
}
}
}
else
{
listBox5.Items.Clear();
}
listBox1.Items.Clear();
listBox2.Items.Clear();
listBox3.Items.Clear();
listBox4.Items.Clear();
}
else if (tabControl1.SelectedTab == tabControl1.TabPages["tabPage2"])//your specific tabname
{ {
string facedir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\charcustom\\faces"; string facedir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\charcustom\\faces";
if (Directory.Exists(facedir)) if (Directory.Exists(facedir))
@ -130,6 +284,7 @@ namespace RBXLegacyLauncher
listBox1.Items.Clear(); listBox1.Items.Clear();
listBox2.Items.Clear(); listBox2.Items.Clear();
listBox3.Items.Clear(); listBox3.Items.Clear();
listBox5.Items.Clear();
} }
else if (tabControl1.SelectedTab == tabControl1.TabPages["tabPage3"])//your specific tabname else if (tabControl1.SelectedTab == tabControl1.TabPages["tabPage3"])//your specific tabname
{ {
@ -169,6 +324,7 @@ namespace RBXLegacyLauncher
} }
listBox4.Items.Clear(); listBox4.Items.Clear();
listBox5.Items.Clear();
} }
else else
{ {