https:// support for customization, add proper online clothing support. Add https imgur setting.
This commit is contained in:
parent
65abca8d1b
commit
dfbd2c36d9
|
|
@ -13,9 +13,14 @@
|
||||||
<Icon>roblox.png</Icon>
|
<Icon>roblox.png</Icon>
|
||||||
</Provider>
|
</Provider>
|
||||||
<Provider>
|
<Provider>
|
||||||
<Name>Imgur</Name>
|
<Name>Imgur (HTTP)</Name>
|
||||||
<URL>http://i.imgur.com/</URL>
|
<URL>http://i.imgur.com/</URL>
|
||||||
<Icon>imgur.png</Icon>
|
<Icon>imgur.png</Icon>
|
||||||
</Provider>
|
</Provider>
|
||||||
|
<Provider>
|
||||||
|
<Name>Imgur (HTTPS)</Name>
|
||||||
|
<URL>https://i.imgur.com/</URL>
|
||||||
|
<Icon>imgur.png</Icon>
|
||||||
|
</Provider>
|
||||||
</Providers>
|
</Providers>
|
||||||
</ContentProviders>
|
</ContentProviders>
|
||||||
|
|
@ -134,7 +134,7 @@ class CharacterCustomizationShared
|
||||||
}
|
}
|
||||||
|
|
||||||
//face
|
//face
|
||||||
if (GlobalVars.UserCustomization.Face.Contains("http://"))
|
if (GlobalVars.UserCustomization.Face.Contains("http://") || GlobalVars.UserCustomization.Face.Contains("https://"))
|
||||||
{
|
{
|
||||||
Provider faceProvider = OnlineClothing.FindContentProviderByURL(contentProviders, GlobalVars.UserCustomization.Face);
|
Provider faceProvider = OnlineClothing.FindContentProviderByURL(contentProviders, GlobalVars.UserCustomization.Face);
|
||||||
FaceIDBox.Text = GlobalVars.UserCustomization.Face.Replace(faceProvider.URL, "");
|
FaceIDBox.Text = GlobalVars.UserCustomization.Face.Replace(faceProvider.URL, "");
|
||||||
|
|
@ -142,21 +142,21 @@ class CharacterCustomizationShared
|
||||||
}
|
}
|
||||||
|
|
||||||
//clothing
|
//clothing
|
||||||
if (GlobalVars.UserCustomization.TShirt.Contains("http://"))
|
if (GlobalVars.UserCustomization.TShirt.Contains("http://") || GlobalVars.UserCustomization.TShirt.Contains("https://"))
|
||||||
{
|
{
|
||||||
Provider tShirtProvider = OnlineClothing.FindContentProviderByURL(contentProviders, GlobalVars.UserCustomization.TShirt);
|
Provider tShirtProvider = OnlineClothing.FindContentProviderByURL(contentProviders, GlobalVars.UserCustomization.TShirt);
|
||||||
TShirtsIDBox.Text = GlobalVars.UserCustomization.TShirt.Replace(tShirtProvider.URL, "");
|
TShirtsIDBox.Text = GlobalVars.UserCustomization.TShirt.Replace(tShirtProvider.URL, "");
|
||||||
TShirtsTypeBox.SelectedItem = tShirtProvider.Name;
|
TShirtsTypeBox.SelectedItem = tShirtProvider.Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GlobalVars.UserCustomization.Shirt.Contains("http://"))
|
if (GlobalVars.UserCustomization.Shirt.Contains("http://") || GlobalVars.UserCustomization.Shirt.Contains("https://"))
|
||||||
{
|
{
|
||||||
Provider shirtProvider = OnlineClothing.FindContentProviderByURL(contentProviders, GlobalVars.UserCustomization.Shirt);
|
Provider shirtProvider = OnlineClothing.FindContentProviderByURL(contentProviders, GlobalVars.UserCustomization.Shirt);
|
||||||
ShirtsIDBox.Text = GlobalVars.UserCustomization.Shirt.Replace(shirtProvider.URL, "");
|
ShirtsIDBox.Text = GlobalVars.UserCustomization.Shirt.Replace(shirtProvider.URL, "");
|
||||||
ShirtsTypeBox.SelectedItem = shirtProvider.Name;
|
ShirtsTypeBox.SelectedItem = shirtProvider.Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GlobalVars.UserCustomization.Pants.Contains("http://"))
|
if (GlobalVars.UserCustomization.Pants.Contains("http://") || GlobalVars.UserCustomization.Pants.Contains("https://"))
|
||||||
{
|
{
|
||||||
Provider pantsProvider = OnlineClothing.FindContentProviderByURL(contentProviders, GlobalVars.UserCustomization.Pants);
|
Provider pantsProvider = OnlineClothing.FindContentProviderByURL(contentProviders, GlobalVars.UserCustomization.Pants);
|
||||||
PantsIDBox.Text = GlobalVars.UserCustomization.Pants.Replace(pantsProvider.URL, "");
|
PantsIDBox.Text = GlobalVars.UserCustomization.Pants.Replace(pantsProvider.URL, "");
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ using System.Windows.Forms;
|
||||||
|
|
||||||
public static bool IsItemURL(string item)
|
public static bool IsItemURL(string item)
|
||||||
{
|
{
|
||||||
if (item.Contains("http://"))
|
if (item.Contains("http://") || item.Contains("https://"))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -74,24 +74,6 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
charparts[newVal.ColorIndex.Value].BrickColor = newVal.Value
|
charparts[newVal.ColorIndex.Value].BrickColor = newVal.Value
|
||||||
end)
|
end)
|
||||||
elseif (newVal.Name == "T-Shirt") then
|
|
||||||
pcall(function()
|
|
||||||
local newTShirt = "";
|
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
|
||||||
newTShirt = Instance.new("ShirtGraphic")
|
|
||||||
newTShirt.Graphic = newVal.Value
|
|
||||||
newTShirt.Parent = newChar
|
|
||||||
else
|
|
||||||
newTShirt = game.Workspace:insertContent(path.."tshirts/"..newVal.Value)
|
|
||||||
if newTShirt[1] then
|
|
||||||
if newTShirt[1].className == "ShirtGraphic" then
|
|
||||||
newTShirt[1].Parent = newChar
|
|
||||||
else
|
|
||||||
newTShirt[1]:remove()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
elseif (newVal.Name == "Extra") then
|
elseif (newVal.Name == "Extra") then
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newItem = game.Workspace:insertContent(path.."custom/"..newVal.Value)
|
local newItem = game.Workspace:insertContent(path.."custom/"..newVal.Value)
|
||||||
|
|
|
||||||
|
|
@ -74,24 +74,7 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
charparts[newVal.ColorIndex.Value].BrickColor = newVal.Value
|
charparts[newVal.ColorIndex.Value].BrickColor = newVal.Value
|
||||||
end)
|
end)
|
||||||
elseif (newVal.Name == "T-Shirt") then
|
|
||||||
pcall(function()
|
|
||||||
local newTShirt = "";
|
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
|
||||||
newTShirt = Instance.new("ShirtGraphic")
|
|
||||||
newTShirt.Graphic = newVal.Value
|
|
||||||
newTShirt.Parent = newChar
|
|
||||||
else
|
|
||||||
newTShirt = game.Workspace:insertContent(path.."tshirts/"..newVal.Value)
|
|
||||||
if newTShirt[1] then
|
|
||||||
if newTShirt[1].className == "ShirtGraphic" then
|
|
||||||
newTShirt[1].Parent = newChar
|
|
||||||
else
|
|
||||||
newTShirt[1]:remove()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
elseif (newVal.Name == "Extra") then
|
elseif (newVal.Name == "Extra") then
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newItem = game.Workspace:insertContent(path.."custom/"..newVal.Value)
|
local newItem = game.Workspace:insertContent(path.."custom/"..newVal.Value)
|
||||||
|
|
|
||||||
|
|
@ -89,9 +89,28 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newTShirt = "";
|
local newTShirt = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newTShirt = Instance.new("ShirtGraphic")
|
if (pcall(function()
|
||||||
newTShirt.Graphic = newVal.Value
|
newTShirt = game.Workspace:InsertContent(newVal.Value)
|
||||||
newTShirt.Parent = newChar
|
if newTShirt[1] then
|
||||||
|
if newTShirt[1].className == "ShirtGraphic" then
|
||||||
|
newTShirt[1].Parent = newChar
|
||||||
|
local oldTexture = newTShirt[1].Graphic;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newTShirt[1].Graphic = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newTShirt[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newTShirt = Instance.new("ShirtGraphic")
|
||||||
|
newTShirt.Graphic = newVal.Value
|
||||||
|
newTShirt.Parent = newChar
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
||||||
if newTShirt[1] then
|
if newTShirt[1] then
|
||||||
|
|
|
||||||
|
|
@ -89,9 +89,28 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newTShirt = "";
|
local newTShirt = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newTShirt = Instance.new("ShirtGraphic")
|
if (pcall(function()
|
||||||
newTShirt.Graphic = newVal.Value
|
newTShirt = game.Workspace:InsertContent(newVal.Value)
|
||||||
newTShirt.Parent = newChar
|
if newTShirt[1] then
|
||||||
|
if newTShirt[1].className == "ShirtGraphic" then
|
||||||
|
newTShirt[1].Parent = newChar
|
||||||
|
local oldTexture = newTShirt[1].Graphic;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newTShirt[1].Graphic = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newTShirt[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newTShirt = Instance.new("ShirtGraphic")
|
||||||
|
newTShirt.Graphic = newVal.Value
|
||||||
|
newTShirt.Parent = newChar
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
||||||
if newTShirt[1] then
|
if newTShirt[1] then
|
||||||
|
|
|
||||||
|
|
@ -90,9 +90,28 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newTShirt = "";
|
local newTShirt = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newTShirt = Instance.new("ShirtGraphic")
|
if (pcall(function()
|
||||||
newTShirt.Graphic = newVal.Value
|
newTShirt = game.Workspace:InsertContent(newVal.Value)
|
||||||
newTShirt.Parent = newChar
|
if newTShirt[1] then
|
||||||
|
if newTShirt[1].className == "ShirtGraphic" then
|
||||||
|
newTShirt[1].Parent = newChar
|
||||||
|
local oldTexture = newTShirt[1].Graphic;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newTShirt[1].Graphic = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newTShirt[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newTShirt = Instance.new("ShirtGraphic")
|
||||||
|
newTShirt.Graphic = newVal.Value
|
||||||
|
newTShirt.Parent = newChar
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
||||||
if newTShirt[1] then
|
if newTShirt[1] then
|
||||||
|
|
@ -108,9 +127,28 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newShirt = "";
|
local newShirt = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newShirt = Instance.new("Shirt")
|
if (pcall(function()
|
||||||
newShirt.ShirtTemplate = newVal.Value
|
newShirt = game.Workspace:InsertContent(newVal.Value)
|
||||||
newShirt.Parent = newChar
|
if newShirt[1] then
|
||||||
|
if newShirt[1].className == "Shirt" then
|
||||||
|
newShirt[1].Parent = newChar
|
||||||
|
local oldTexture = newShirt[1].ShirtTemplate;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newShirt[1].ShirtTemplate = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newShirt[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newShirt = Instance.new("Shirt")
|
||||||
|
newShirt.ShirtTemplate = newVal.Value
|
||||||
|
newShirt.Parent = newChar
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value)
|
newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value)
|
||||||
if newShirt[1] then
|
if newShirt[1] then
|
||||||
|
|
@ -126,9 +164,28 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newPants = "";
|
local newPants = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newPants = Instance.new("Pants")
|
if (pcall(function()
|
||||||
newPants.PantsTemplate = newVal.Value
|
newPants = game.Workspace:InsertContent(newVal.Value)
|
||||||
newPants.Parent = newChar
|
if newPants[1] then
|
||||||
|
if newPants[1].className == "Pants" then
|
||||||
|
newPants[1].Parent = newChar
|
||||||
|
local oldTexture = newPants[1].PantsTemplate;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newPants[1].PantsTemplate = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newPants[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newPants = Instance.new("Pants")
|
||||||
|
newPants.PantsTemplate = newVal.Value
|
||||||
|
newPants.Parent = newChar
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value)
|
newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value)
|
||||||
if newPants[1] then
|
if newPants[1] then
|
||||||
|
|
|
||||||
|
|
@ -90,9 +90,28 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newTShirt = "";
|
local newTShirt = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newTShirt = Instance.new("ShirtGraphic")
|
if (pcall(function()
|
||||||
newTShirt.Graphic = newVal.Value
|
newTShirt = game.Workspace:InsertContent(newVal.Value)
|
||||||
newTShirt.Parent = newChar
|
if newTShirt[1] then
|
||||||
|
if newTShirt[1].className == "ShirtGraphic" then
|
||||||
|
newTShirt[1].Parent = newChar
|
||||||
|
local oldTexture = newTShirt[1].Graphic;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newTShirt[1].Graphic = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newTShirt[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newTShirt = Instance.new("ShirtGraphic")
|
||||||
|
newTShirt.Graphic = newVal.Value
|
||||||
|
newTShirt.Parent = newChar
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
||||||
if newTShirt[1] then
|
if newTShirt[1] then
|
||||||
|
|
@ -108,9 +127,28 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newShirt = "";
|
local newShirt = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newShirt = Instance.new("Shirt")
|
if (pcall(function()
|
||||||
newShirt.ShirtTemplate = newVal.Value
|
newShirt = game.Workspace:InsertContent(newVal.Value)
|
||||||
newShirt.Parent = newChar
|
if newShirt[1] then
|
||||||
|
if newShirt[1].className == "Shirt" then
|
||||||
|
newShirt[1].Parent = newChar
|
||||||
|
local oldTexture = newShirt[1].ShirtTemplate;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newShirt[1].ShirtTemplate = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newShirt[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newShirt = Instance.new("Shirt")
|
||||||
|
newShirt.ShirtTemplate = newVal.Value
|
||||||
|
newShirt.Parent = newChar
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value)
|
newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value)
|
||||||
if newShirt[1] then
|
if newShirt[1] then
|
||||||
|
|
@ -126,9 +164,28 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newPants = "";
|
local newPants = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newPants = Instance.new("Pants")
|
if (pcall(function()
|
||||||
newPants.PantsTemplate = newVal.Value
|
newPants = game.Workspace:InsertContent(newVal.Value)
|
||||||
newPants.Parent = newChar
|
if newPants[1] then
|
||||||
|
if newPants[1].className == "Pants" then
|
||||||
|
newPants[1].Parent = newChar
|
||||||
|
local oldTexture = newPants[1].PantsTemplate;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newPants[1].PantsTemplate = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newPants[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newPants = Instance.new("Pants")
|
||||||
|
newPants.PantsTemplate = newVal.Value
|
||||||
|
newPants.Parent = newChar
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value)
|
newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value)
|
||||||
if newPants[1] then
|
if newPants[1] then
|
||||||
|
|
@ -144,11 +201,32 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newFace = "";
|
local newFace = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newWaitForChild(charparts[1],"face"):remove()
|
if (pcall(function()
|
||||||
newFace = Instance.new("Decal")
|
newFace = game.Workspace:InsertContent(newVal.Value)
|
||||||
newFace.Texture = newVal.Value
|
if newFace[1] then
|
||||||
newFace.Face = "Front"
|
if newFace[1].className == "Decal" then
|
||||||
newFace.Parent = charparts[1]
|
newWaitForChild(charparts[1],"face"):remove()
|
||||||
|
newFace[1].Parent = charparts[1]
|
||||||
|
newFace[1].Face = "Front"
|
||||||
|
local oldTexture = newFace[1].Texture;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newFace[1].Texture = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newFace[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newWaitForChild(charparts[1],"face"):remove()
|
||||||
|
newFace = Instance.new("Decal")
|
||||||
|
newFace.Texture = newVal.Value
|
||||||
|
newFace.Face = "Front"
|
||||||
|
newFace.Parent = charparts[1]
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newFace = game.Workspace:InsertContent(path.."faces/"..newVal.Value)
|
newFace = game.Workspace:InsertContent(path.."faces/"..newVal.Value)
|
||||||
if newFace[1] then
|
if newFace[1] then
|
||||||
|
|
|
||||||
|
|
@ -90,9 +90,28 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newTShirt = "";
|
local newTShirt = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newTShirt = Instance.new("ShirtGraphic")
|
if (pcall(function()
|
||||||
newTShirt.Graphic = newVal.Value
|
newTShirt = game.Workspace:InsertContent(newVal.Value)
|
||||||
newTShirt.Parent = newChar
|
if newTShirt[1] then
|
||||||
|
if newTShirt[1].className == "ShirtGraphic" then
|
||||||
|
newTShirt[1].Parent = newChar
|
||||||
|
local oldTexture = newTShirt[1].Graphic;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newTShirt[1].Graphic = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newTShirt[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newTShirt = Instance.new("ShirtGraphic")
|
||||||
|
newTShirt.Graphic = newVal.Value
|
||||||
|
newTShirt.Parent = newChar
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
||||||
if newTShirt[1] then
|
if newTShirt[1] then
|
||||||
|
|
@ -108,9 +127,28 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newShirt = "";
|
local newShirt = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newShirt = Instance.new("Shirt")
|
if (pcall(function()
|
||||||
newShirt.ShirtTemplate = newVal.Value
|
newShirt = game.Workspace:InsertContent(newVal.Value)
|
||||||
newShirt.Parent = newChar
|
if newShirt[1] then
|
||||||
|
if newShirt[1].className == "Shirt" then
|
||||||
|
newShirt[1].Parent = newChar
|
||||||
|
local oldTexture = newShirt[1].ShirtTemplate;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newShirt[1].ShirtTemplate = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newShirt[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newShirt = Instance.new("Shirt")
|
||||||
|
newShirt.ShirtTemplate = newVal.Value
|
||||||
|
newShirt.Parent = newChar
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value)
|
newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value)
|
||||||
if newShirt[1] then
|
if newShirt[1] then
|
||||||
|
|
@ -126,9 +164,28 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newPants = "";
|
local newPants = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newPants = Instance.new("Pants")
|
if (pcall(function()
|
||||||
newPants.PantsTemplate = newVal.Value
|
newPants = game.Workspace:InsertContent(newVal.Value)
|
||||||
newPants.Parent = newChar
|
if newPants[1] then
|
||||||
|
if newPants[1].className == "Pants" then
|
||||||
|
newPants[1].Parent = newChar
|
||||||
|
local oldTexture = newPants[1].PantsTemplate;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newPants[1].PantsTemplate = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newPants[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newPants = Instance.new("Pants")
|
||||||
|
newPants.PantsTemplate = newVal.Value
|
||||||
|
newPants.Parent = newChar
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value)
|
newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value)
|
||||||
if newPants[1] then
|
if newPants[1] then
|
||||||
|
|
@ -144,11 +201,32 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newFace = "";
|
local newFace = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newWaitForChild(charparts[1],"face"):remove()
|
if (pcall(function()
|
||||||
newFace = Instance.new("Decal")
|
newFace = game.Workspace:InsertContent(newVal.Value)
|
||||||
newFace.Texture = newVal.Value
|
if newFace[1] then
|
||||||
newFace.Face = "Front"
|
if newFace[1].className == "Decal" then
|
||||||
newFace.Parent = charparts[1]
|
newWaitForChild(charparts[1],"face"):remove()
|
||||||
|
newFace[1].Parent = charparts[1]
|
||||||
|
newFace[1].Face = "Front"
|
||||||
|
local oldTexture = newFace[1].Texture;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newFace[1].Texture = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newFace[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newWaitForChild(charparts[1],"face"):remove()
|
||||||
|
newFace = Instance.new("Decal")
|
||||||
|
newFace.Texture = newVal.Value
|
||||||
|
newFace.Face = "Front"
|
||||||
|
newFace.Parent = charparts[1]
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newFace = game.Workspace:InsertContent(path.."faces/"..newVal.Value)
|
newFace = game.Workspace:InsertContent(path.."faces/"..newVal.Value)
|
||||||
if newFace[1] then
|
if newFace[1] then
|
||||||
|
|
|
||||||
|
|
@ -93,9 +93,28 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newTShirt = "";
|
local newTShirt = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newTShirt = Instance.new("ShirtGraphic")
|
if (pcall(function()
|
||||||
newTShirt.Graphic = newVal.Value
|
newTShirt = game.Workspace:InsertContent(newVal.Value)
|
||||||
newTShirt.Parent = newChar
|
if newTShirt[1] then
|
||||||
|
if newTShirt[1].className == "ShirtGraphic" then
|
||||||
|
newTShirt[1].Parent = newChar
|
||||||
|
local oldTexture = newTShirt[1].Graphic;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newTShirt[1].Graphic = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newTShirt[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newTShirt = Instance.new("ShirtGraphic")
|
||||||
|
newTShirt.Graphic = newVal.Value
|
||||||
|
newTShirt.Parent = newChar
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
||||||
if newTShirt[1] then
|
if newTShirt[1] then
|
||||||
|
|
@ -111,9 +130,28 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newShirt = "";
|
local newShirt = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newShirt = Instance.new("Shirt")
|
if (pcall(function()
|
||||||
newShirt.ShirtTemplate = newVal.Value
|
newShirt = game.Workspace:InsertContent(newVal.Value)
|
||||||
newShirt.Parent = newChar
|
if newShirt[1] then
|
||||||
|
if newShirt[1].className == "Shirt" then
|
||||||
|
newShirt[1].Parent = newChar
|
||||||
|
local oldTexture = newShirt[1].ShirtTemplate;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newShirt[1].ShirtTemplate = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newShirt[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newShirt = Instance.new("Shirt")
|
||||||
|
newShirt.ShirtTemplate = newVal.Value
|
||||||
|
newShirt.Parent = newChar
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value)
|
newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value)
|
||||||
if newShirt[1] then
|
if newShirt[1] then
|
||||||
|
|
@ -129,9 +167,28 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newPants = "";
|
local newPants = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newPants = Instance.new("Pants")
|
if (pcall(function()
|
||||||
newPants.PantsTemplate = newVal.Value
|
newPants = game.Workspace:InsertContent(newVal.Value)
|
||||||
newPants.Parent = newChar
|
if newPants[1] then
|
||||||
|
if newPants[1].className == "Pants" then
|
||||||
|
newPants[1].Parent = newChar
|
||||||
|
local oldTexture = newPants[1].PantsTemplate;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newPants[1].PantsTemplate = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newPants[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newPants = Instance.new("Pants")
|
||||||
|
newPants.PantsTemplate = newVal.Value
|
||||||
|
newPants.Parent = newChar
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value)
|
newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value)
|
||||||
if newPants[1] then
|
if newPants[1] then
|
||||||
|
|
@ -147,11 +204,32 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newFace = "";
|
local newFace = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newWaitForChild(charparts[1],"face"):remove()
|
if (pcall(function()
|
||||||
newFace = Instance.new("Decal")
|
newFace = game.Workspace:InsertContent(newVal.Value)
|
||||||
newFace.Texture = newVal.Value
|
if newFace[1] then
|
||||||
newFace.Face = "Front"
|
if newFace[1].className == "Decal" then
|
||||||
newFace.Parent = charparts[1]
|
newWaitForChild(charparts[1],"face"):remove()
|
||||||
|
newFace[1].Parent = charparts[1]
|
||||||
|
newFace[1].Face = "Front"
|
||||||
|
local oldTexture = newFace[1].Texture;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newFace[1].Texture = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newFace[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newWaitForChild(charparts[1],"face"):remove()
|
||||||
|
newFace = Instance.new("Decal")
|
||||||
|
newFace.Texture = newVal.Value
|
||||||
|
newFace.Face = "Front"
|
||||||
|
newFace.Parent = charparts[1]
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newFace = game.Workspace:InsertContent(path.."faces/"..newVal.Value)
|
newFace = game.Workspace:InsertContent(path.."faces/"..newVal.Value)
|
||||||
if newFace[1] then
|
if newFace[1] then
|
||||||
|
|
|
||||||
|
|
@ -111,9 +111,28 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newTShirt = "";
|
local newTShirt = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newTShirt = Instance.new("ShirtGraphic")
|
if (pcall(function()
|
||||||
newTShirt.Graphic = newVal.Value
|
newTShirt = game.Workspace:InsertContent(newVal.Value)
|
||||||
newTShirt.Parent = newChar
|
if newTShirt[1] then
|
||||||
|
if newTShirt[1].className == "ShirtGraphic" then
|
||||||
|
newTShirt[1].Parent = newChar
|
||||||
|
local oldTexture = newTShirt[1].Graphic;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newTShirt[1].Graphic = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newTShirt[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newTShirt = Instance.new("ShirtGraphic")
|
||||||
|
newTShirt.Graphic = newVal.Value
|
||||||
|
newTShirt.Parent = newChar
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
||||||
if newTShirt[1] then
|
if newTShirt[1] then
|
||||||
|
|
@ -129,9 +148,28 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newShirt = "";
|
local newShirt = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newShirt = Instance.new("Shirt")
|
if (pcall(function()
|
||||||
newShirt.ShirtTemplate = newVal.Value
|
newShirt = game.Workspace:InsertContent(newVal.Value)
|
||||||
newShirt.Parent = newChar
|
if newShirt[1] then
|
||||||
|
if newShirt[1].className == "Shirt" then
|
||||||
|
newShirt[1].Parent = newChar
|
||||||
|
local oldTexture = newShirt[1].ShirtTemplate;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newShirt[1].ShirtTemplate = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newShirt[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newShirt = Instance.new("Shirt")
|
||||||
|
newShirt.ShirtTemplate = newVal.Value
|
||||||
|
newShirt.Parent = newChar
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value)
|
newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value)
|
||||||
if newShirt[1] then
|
if newShirt[1] then
|
||||||
|
|
@ -147,9 +185,28 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newPants = "";
|
local newPants = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newPants = Instance.new("Pants")
|
if (pcall(function()
|
||||||
newPants.PantsTemplate = newVal.Value
|
newPants = game.Workspace:InsertContent(newVal.Value)
|
||||||
newPants.Parent = newChar
|
if newPants[1] then
|
||||||
|
if newPants[1].className == "Pants" then
|
||||||
|
newPants[1].Parent = newChar
|
||||||
|
local oldTexture = newPants[1].PantsTemplate;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newPants[1].PantsTemplate = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newPants[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newPants = Instance.new("Pants")
|
||||||
|
newPants.PantsTemplate = newVal.Value
|
||||||
|
newPants.Parent = newChar
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value)
|
newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value)
|
||||||
if newPants[1] then
|
if newPants[1] then
|
||||||
|
|
@ -165,11 +222,32 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newFace = "";
|
local newFace = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newWaitForChild(charparts[1],"face"):remove()
|
if (pcall(function()
|
||||||
newFace = Instance.new("Decal")
|
newFace = game.Workspace:InsertContent(newVal.Value)
|
||||||
newFace.Texture = newVal.Value
|
if newFace[1] then
|
||||||
newFace.Face = "Front"
|
if newFace[1].className == "Decal" then
|
||||||
newFace.Parent = charparts[1]
|
newWaitForChild(charparts[1],"face"):remove()
|
||||||
|
newFace[1].Parent = charparts[1]
|
||||||
|
newFace[1].Face = "Front"
|
||||||
|
local oldTexture = newFace[1].Texture;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newFace[1].Texture = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newFace[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newWaitForChild(charparts[1],"face"):remove()
|
||||||
|
newFace = Instance.new("Decal")
|
||||||
|
newFace.Texture = newVal.Value
|
||||||
|
newFace.Face = "Front"
|
||||||
|
newFace.Parent = charparts[1]
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newFace = game.Workspace:InsertContent(path.."faces/"..newVal.Value)
|
newFace = game.Workspace:InsertContent(path.."faces/"..newVal.Value)
|
||||||
if newFace[1] then
|
if newFace[1] then
|
||||||
|
|
|
||||||
|
|
@ -102,9 +102,28 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newTShirt = "";
|
local newTShirt = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newTShirt = Instance.new("ShirtGraphic")
|
if (pcall(function()
|
||||||
newTShirt.Graphic = newVal.Value
|
newTShirt = game.Workspace:InsertContent(newVal.Value)
|
||||||
newTShirt.Parent = newChar
|
if newTShirt[1] then
|
||||||
|
if newTShirt[1].className == "ShirtGraphic" then
|
||||||
|
newTShirt[1].Parent = newChar
|
||||||
|
local oldTexture = newTShirt[1].Graphic;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newTShirt[1].Graphic = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newTShirt[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newTShirt = Instance.new("ShirtGraphic")
|
||||||
|
newTShirt.Graphic = newVal.Value
|
||||||
|
newTShirt.Parent = newChar
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
||||||
if newTShirt[1] then
|
if newTShirt[1] then
|
||||||
|
|
@ -120,9 +139,28 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newShirt = "";
|
local newShirt = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newShirt = Instance.new("Shirt")
|
if (pcall(function()
|
||||||
newShirt.ShirtTemplate = newVal.Value
|
newShirt = game.Workspace:InsertContent(newVal.Value)
|
||||||
newShirt.Parent = newChar
|
if newShirt[1] then
|
||||||
|
if newShirt[1].className == "Shirt" then
|
||||||
|
newShirt[1].Parent = newChar
|
||||||
|
local oldTexture = newShirt[1].ShirtTemplate;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newShirt[1].ShirtTemplate = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newShirt[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newShirt = Instance.new("Shirt")
|
||||||
|
newShirt.ShirtTemplate = newVal.Value
|
||||||
|
newShirt.Parent = newChar
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value)
|
newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value)
|
||||||
if newShirt[1] then
|
if newShirt[1] then
|
||||||
|
|
@ -138,9 +176,28 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newPants = "";
|
local newPants = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newPants = Instance.new("Pants")
|
if (pcall(function()
|
||||||
newPants.PantsTemplate = newVal.Value
|
newPants = game.Workspace:InsertContent(newVal.Value)
|
||||||
newPants.Parent = newChar
|
if newPants[1] then
|
||||||
|
if newPants[1].className == "Pants" then
|
||||||
|
newPants[1].Parent = newChar
|
||||||
|
local oldTexture = newPants[1].PantsTemplate;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newPants[1].PantsTemplate = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newPants[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newPants = Instance.new("Pants")
|
||||||
|
newPants.PantsTemplate = newVal.Value
|
||||||
|
newPants.Parent = newChar
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value)
|
newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value)
|
||||||
if newPants[1] then
|
if newPants[1] then
|
||||||
|
|
@ -156,11 +213,32 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newFace = "";
|
local newFace = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newWaitForChild(charparts[1],"face"):remove()
|
if (pcall(function()
|
||||||
newFace = Instance.new("Decal")
|
newFace = game.Workspace:InsertContent(newVal.Value)
|
||||||
newFace.Texture = newVal.Value
|
if newFace[1] then
|
||||||
newFace.Face = "Front"
|
if newFace[1].className == "Decal" then
|
||||||
newFace.Parent = charparts[1]
|
newWaitForChild(charparts[1],"face"):remove()
|
||||||
|
newFace[1].Parent = charparts[1]
|
||||||
|
newFace[1].Face = "Front"
|
||||||
|
local oldTexture = newFace[1].Texture;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newFace[1].Texture = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newFace[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newWaitForChild(charparts[1],"face"):remove()
|
||||||
|
newFace = Instance.new("Decal")
|
||||||
|
newFace.Texture = newVal.Value
|
||||||
|
newFace.Face = "Front"
|
||||||
|
newFace.Parent = charparts[1]
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newFace = game.Workspace:InsertContent(path.."faces/"..newVal.Value)
|
newFace = game.Workspace:InsertContent(path.."faces/"..newVal.Value)
|
||||||
if newFace[1] then
|
if newFace[1] then
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,28 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newTShirt = "";
|
local newTShirt = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newTShirt = Instance.new("ShirtGraphic")
|
if (pcall(function()
|
||||||
newTShirt.Graphic = newVal.Value
|
newTShirt = game.Workspace:InsertContent(newVal.Value)
|
||||||
newTShirt.Parent = newChar
|
if newTShirt[1] then
|
||||||
|
if newTShirt[1].className == "ShirtGraphic" then
|
||||||
|
newTShirt[1].Parent = newChar
|
||||||
|
local oldTexture = newTShirt[1].Graphic;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newTShirt[1].Graphic = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newTShirt[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newTShirt = Instance.new("ShirtGraphic")
|
||||||
|
newTShirt.Graphic = newVal.Value
|
||||||
|
newTShirt.Parent = newChar
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
||||||
if newTShirt[1] then
|
if newTShirt[1] then
|
||||||
|
|
@ -57,9 +76,28 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newShirt = "";
|
local newShirt = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newShirt = Instance.new("Shirt")
|
if (pcall(function()
|
||||||
newShirt.ShirtTemplate = newVal.Value
|
newShirt = game.Workspace:InsertContent(newVal.Value)
|
||||||
newShirt.Parent = newChar
|
if newShirt[1] then
|
||||||
|
if newShirt[1].className == "Shirt" then
|
||||||
|
newShirt[1].Parent = newChar
|
||||||
|
local oldTexture = newShirt[1].ShirtTemplate;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newShirt[1].ShirtTemplate = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newShirt[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newShirt = Instance.new("Shirt")
|
||||||
|
newShirt.ShirtTemplate = newVal.Value
|
||||||
|
newShirt.Parent = newChar
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value)
|
newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value)
|
||||||
if newShirt[1] then
|
if newShirt[1] then
|
||||||
|
|
@ -75,9 +113,28 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newPants = "";
|
local newPants = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newPants = Instance.new("Pants")
|
if (pcall(function()
|
||||||
newPants.PantsTemplate = newVal.Value
|
newPants = game.Workspace:InsertContent(newVal.Value)
|
||||||
newPants.Parent = newChar
|
if newPants[1] then
|
||||||
|
if newPants[1].className == "Pants" then
|
||||||
|
newPants[1].Parent = newChar
|
||||||
|
local oldTexture = newPants[1].PantsTemplate;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newPants[1].PantsTemplate = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newPants[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newPants = Instance.new("Pants")
|
||||||
|
newPants.PantsTemplate = newVal.Value
|
||||||
|
newPants.Parent = newChar
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value)
|
newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value)
|
||||||
if newPants[1] then
|
if newPants[1] then
|
||||||
|
|
@ -93,11 +150,32 @@ function LoadCharacterNew(playerApp,newChar)
|
||||||
pcall(function()
|
pcall(function()
|
||||||
local newFace = "";
|
local newFace = "";
|
||||||
if (string.match(newVal.Value, "http") == "http") then
|
if (string.match(newVal.Value, "http") == "http") then
|
||||||
newWaitForChild(charparts[1],"face"):remove()
|
if (pcall(function()
|
||||||
newFace = Instance.new("Decal")
|
newFace = game.Workspace:InsertContent(newVal.Value)
|
||||||
newFace.Texture = newVal.Value
|
if newFace[1] then
|
||||||
newFace.Face = "Front"
|
if newFace[1].className == "Decal" then
|
||||||
newFace.Parent = charparts[1]
|
newWaitForChild(charparts[1],"face"):remove()
|
||||||
|
newFace[1].Parent = charparts[1]
|
||||||
|
newFace[1].Face = "Front"
|
||||||
|
local oldTexture = newFace[1].Texture;
|
||||||
|
OldURL,OldID = oldTexture:match("(.+)=(.+)")
|
||||||
|
NewURL,NewID = newVal.Value:match("(.+)=(.+)")
|
||||||
|
newFace[1].Texture = NewURL .. '=' .. OldID
|
||||||
|
else
|
||||||
|
newFace[1]:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)) then
|
||||||
|
--nothing
|
||||||
|
print("success");
|
||||||
|
else
|
||||||
|
print("fail");
|
||||||
|
newWaitForChild(charparts[1],"face"):remove()
|
||||||
|
newFace = Instance.new("Decal")
|
||||||
|
newFace.Texture = newVal.Value
|
||||||
|
newFace.Face = "Front"
|
||||||
|
newFace.Parent = charparts[1]
|
||||||
|
end
|
||||||
else
|
else
|
||||||
newFace = game.Workspace:InsertContent(path.."faces/"..newVal.Value)
|
newFace = game.Workspace:InsertContent(path.."faces/"..newVal.Value)
|
||||||
if newFace[1] then
|
if newFace[1] then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue