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,22 +96,22 @@ 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()
--stamper --stamper
game:GetService("InsertService"):SetBaseSetsUrl("http://www.roblox.com/Game/Tools/InsertAsset.ashx?nsets=10&type=base") game:GetService("InsertService"):SetBaseSetsUrl("http://www.roblox.com/Game/Tools/InsertAsset.ashx?nsets=10&type=base")
game:GetService("InsertService"):SetUserSetsUrl("http://www.roblox.com/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d") game:GetService("InsertService"):SetUserSetsUrl("http://www.roblox.com/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d")
game:GetService("InsertService"):SetCollectionUrl("http://www.roblox.com/Game/Tools/InsertAsset.ashx?sid=%d") game:GetService("InsertService"):SetCollectionUrl("http://www.roblox.com/Game/Tools/InsertAsset.ashx?sid=%d")
game:GetService("InsertService"):SetAssetUrl("http://www.roblox.com/Asset/?id=%d") game:GetService("InsertService"):SetAssetUrl("http://www.roblox.com/Asset/?id=%d")
game:GetService("InsertService"):SetAssetVersionUrl("http://www.roblox.com/Asset/?assetversionid=%d") game:GetService("InsertService"):SetAssetVersionUrl("http://www.roblox.com/Asset/?assetversionid=%d")
--[[corescripts --[[corescripts
local RobloxGui = game:GetService("CoreGui"):WaitForChild("RobloxGui") local RobloxGui = game:GetService("CoreGui"):WaitForChild("RobloxGui")
local scriptContext = game:GetService("ScriptContext") local scriptContext = game:GetService("ScriptContext")
@ -140,11 +119,11 @@ function SetRBXLegacyVersion(Version)
scriptContext:AddCoreScript("CoreScripts/GameMenu", RobloxGui) scriptContext:AddCoreScript("CoreScripts/GameMenu", RobloxGui)
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,172 +307,162 @@ 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 if (Hat1ID ~= nil) then
if (Hat1ID ~= nil) then newHat.Value = Hat1ID
newHat.Value = Hat1ID newHat.Name = Hat1ID
newHat.Name = Hat1ID else
else newHat.Value = "NoHat.rbxm"
newHat.Value = "NoHat.rbxm" newHat.Name = "NoHat.rbxm"
newHat.Name = "NoHat.rbxm" end
end elseif (i == 2) then
elseif (i == 2) then if (Hat2ID ~= nil) then
if (Hat2ID ~= nil) then newHat.Value = Hat2ID
newHat.Value = Hat2ID newHat.Name = Hat2ID
newHat.Name = Hat2ID else
else newHat.Value = "NoHat.rbxm"
newHat.Value = "NoHat.rbxm" newHat.Name = "NoHat.rbxm"
newHat.Name = "NoHat.rbxm" end
end elseif (i == 3) then
elseif (i == 3) then if (Hat3ID ~= nil) then
if (Hat3ID ~= nil) then newHat.Value = Hat3ID
newHat.Value = Hat3ID newHat.Name = Hat3ID
newHat.Name = Hat3ID else
else newHat.Value = "NoHat.rbxm"
newHat.Value = "NoHat.rbxm" newHat.Name = "NoHat.rbxm"
newHat.Name = "NoHat.rbxm"
end
end end
local typeValue = Instance.new("NumberValue")
typeValue.Name = "CustomizationType"
typeValue.Parent = newHat
typeValue.Value = 2
end end
local typeValue = Instance.new("NumberValue")
typeValue.Name = "CustomizationType"
typeValue.Parent = newHat
typeValue.Value = 2
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 else
else newTShirt.Value = "0"
newTShirt.Value = "0"
end
newTShirt.Name = "T-Shirt"
local typeValue = Instance.new("NumberValue")
typeValue.Name = "CustomizationType"
typeValue.Parent = newTShirt
typeValue.Value = 3
end end
--SHIRTS AND PANTS newTShirt.Name = "T-Shirt"
if (rbxlegacyversion ~= "pre-alpha" or rbxlegacyversion ~= "pre-alpha-ext") then local typeValue = Instance.new("NumberValue")
local newShirt = Instance.new("StringValue",newCharApp) typeValue.Name = "CustomizationType"
if (ShirtID ~= nil or ShirtID ~= "0") then typeValue.Parent = newTShirt
newShirt.Value = ShirtID typeValue.Value = 3
else --SHIRT
newShirt.Value = "0" local newShirt = Instance.new("StringValue",newCharApp)
end if (ShirtID ~= nil or ShirtID ~= "0") then
newShirt.Name = "Shirt" newShirt.Value = ShirtID
local typeValue = Instance.new("NumberValue") else
typeValue.Name = "CustomizationType" newShirt.Value = "0"
typeValue.Parent = newShirt
typeValue.Value = 4
local newPants = Instance.new("StringValue",newCharApp)
if (PantsID ~= nil or PantsID ~= "0") then
newPants.Value = PantsID
else
newPants.Value = "0"
end
newPants.Name = "Pants"
local typeValue = Instance.new("NumberValue")
typeValue.Name = "CustomizationType"
typeValue.Parent = newPants
typeValue.Value = 5
end end
--FACE AND HEADS newShirt.Name = "Shirt"
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 typeValue = Instance.new("NumberValue")
local newFace = Instance.new("StringValue",newCharApp) typeValue.Name = "CustomizationType"
if (FaceID ~= nil) then typeValue.Parent = newShirt
newFace.Value = FaceID typeValue.Value = 4
newFace.Name = FaceID --PANTS
else local newPants = Instance.new("StringValue",newCharApp)
newFace.Value = "DefaultFace.rbxm" if (PantsID ~= nil or PantsID ~= "0") then
newFace.Name = "DefaultFace.rbxm" newPants.Value = PantsID
end else
local typeValue = Instance.new("NumberValue") newPants.Value = "0"
typeValue.Name = "CustomizationType"
typeValue.Parent = newFace
typeValue.Value = 6
local newHead = Instance.new("StringValue",newCharApp)
if (HeadID ~= nil) then
newHead.Value = HeadID
newHead.Name = HeadID
else
newHead.Value = "DefaultHead.rbxm"
newHead.Name = "DefaultHead.rbxm"
end
local typeValue = Instance.new("NumberValue")
typeValue.Name = "CustomizationType"
typeValue.Parent = newHead
typeValue.Value = 7
end end
newPants.Name = "Pants"
local typeValue = Instance.new("NumberValue")
typeValue.Name = "CustomizationType"
typeValue.Parent = newPants
typeValue.Value = 5
--FACE
local newFace = Instance.new("StringValue",newCharApp)
if (FaceID ~= nil) then
newFace.Value = FaceID
newFace.Name = FaceID
else
newFace.Value = "DefaultFace.rbxm"
newFace.Name = "DefaultFace.rbxm"
end
local typeValue = Instance.new("NumberValue")
typeValue.Name = "CustomizationType"
typeValue.Parent = newFace
typeValue.Value = 6
--HEADS
local newHead = Instance.new("StringValue",newCharApp)
if (HeadID ~= nil) then
newHead.Value = HeadID
newHead.Name = HeadID
else
newHead.Value = "DefaultHead.rbxm"
newHead.Name = "DefaultHead.rbxm"
end
local typeValue = Instance.new("NumberValue")
typeValue.Name = "CustomizationType"
typeValue.Parent = newHead
typeValue.Value = 7
--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 if (TorsoID ~= nil) then
if (TorsoID ~= nil) then BodyMesh.Value = TorsoID
BodyMesh.Value = TorsoID BodyMesh.Name = TorsoID
BodyMesh.Name = TorsoID else
else BodyMesh.Value = "DefaultTorso.rbxm"
BodyMesh.Value = "DefaultTorso.rbxm" BodyMesh.Name = "DefaultTorso.rbxm"
BodyMesh.Name = "DefaultTorso.rbxm" end
end elseif (i == 3) then
elseif (i == 3) then if (LArmID ~= nil) then
if (LArmID ~= nil) then BodyMesh.Value = LArmID
BodyMesh.Value = LArmID BodyMesh.Name = LArmID
BodyMesh.Name = LArmID else
else BodyMesh.Value = "DefaultLArm.rbxm"
BodyMesh.Value = "DefaultLArm.rbxm" BodyMesh.Name = "DefaultLArm.rbxm"
BodyMesh.Name = "DefaultLArm.rbxm" end
end elseif (i == 4) then
elseif (i == 4) then if (RArmID ~= nil) then
if (RArmID ~= nil) then BodyMesh.Value = RArmID
BodyMesh.Value = RArmID BodyMesh.Name = RArmID
BodyMesh.Name = RArmID else
else BodyMesh.Value = "DefaultRArm.rbxm"
BodyMesh.Value = "DefaultRArm.rbxm" BodyMesh.Name = "DefaultRArm.rbxm"
BodyMesh.Name = "DefaultRArm.rbxm" end
end elseif (i == 5) then
elseif (i == 5) then if (LLegID ~= nil) then
if (LLegID ~= nil) then BodyMesh.Value = LLegID
BodyMesh.Value = LLegID BodyMesh.Name = LLegID
BodyMesh.Name = LLegID else
else BodyMesh.Value = "DefaultLLeg.rbxm"
BodyMesh.Value = "DefaultLLeg.rbxm" BodyMesh.Name = "DefaultLLeg.rbxm"
BodyMesh.Name = "DefaultLLeg.rbxm" end
end elseif (i == 6) then
elseif (i == 6) then if (RLegID ~= nil) then
if (RLegID ~= nil) then BodyMesh.Value = RLegID
BodyMesh.Value = RLegID BodyMesh.Name = RLegID
BodyMesh.Name = RLegID else
else BodyMesh.Value = "DefaultRLeg.rbxm"
BodyMesh.Value = "DefaultRLeg.rbxm" BodyMesh.Name = "DefaultRLeg.rbxm"
BodyMesh.Name = "DefaultRLeg.rbxm"
end
end end
local indexValue = Instance.new("NumberValue")
indexValue.Name = "MeshIndex"
indexValue.Parent = BodyColor
indexValue.Value = i
local typeValue = Instance.new("NumberValue")
typeValue.Name = "CustomizationType"
typeValue.Parent = BodyColor
typeValue.Value = 8
end end
local indexValue = Instance.new("NumberValue")
indexValue.Name = "MeshIndex"
indexValue.Parent = BodyColor
indexValue.Value = i
local typeValue = Instance.new("NumberValue")
typeValue.Name = "CustomizationType"
typeValue.Parent = BodyColor
typeValue.Value = 8
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
{ {