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>
|
||||
</Provider>
|
||||
<Provider>
|
||||
<Name>Imgur</Name>
|
||||
<Name>Imgur (HTTP)</Name>
|
||||
<URL>http://i.imgur.com/</URL>
|
||||
<Icon>imgur.png</Icon>
|
||||
</Provider>
|
||||
<Provider>
|
||||
<Name>Imgur (HTTPS)</Name>
|
||||
<URL>https://i.imgur.com/</URL>
|
||||
<Icon>imgur.png</Icon>
|
||||
</Provider>
|
||||
</Providers>
|
||||
</ContentProviders>
|
||||
|
|
@ -134,7 +134,7 @@ class CharacterCustomizationShared
|
|||
}
|
||||
|
||||
//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);
|
||||
FaceIDBox.Text = GlobalVars.UserCustomization.Face.Replace(faceProvider.URL, "");
|
||||
|
|
@ -142,21 +142,21 @@ class CharacterCustomizationShared
|
|||
}
|
||||
|
||||
//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);
|
||||
TShirtsIDBox.Text = GlobalVars.UserCustomization.TShirt.Replace(tShirtProvider.URL, "");
|
||||
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);
|
||||
ShirtsIDBox.Text = GlobalVars.UserCustomization.Shirt.Replace(shirtProvider.URL, "");
|
||||
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);
|
||||
PantsIDBox.Text = GlobalVars.UserCustomization.Pants.Replace(pantsProvider.URL, "");
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ using System.Windows.Forms;
|
|||
|
||||
public static bool IsItemURL(string item)
|
||||
{
|
||||
if (item.Contains("http://"))
|
||||
if (item.Contains("http://") || item.Contains("https://"))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -74,24 +74,6 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
charparts[newVal.ColorIndex.Value].BrickColor = newVal.Value
|
||||
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
|
||||
pcall(function()
|
||||
local newItem = game.Workspace:insertContent(path.."custom/"..newVal.Value)
|
||||
|
|
|
|||
|
|
@ -74,24 +74,7 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
charparts[newVal.ColorIndex.Value].BrickColor = newVal.Value
|
||||
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
|
||||
pcall(function()
|
||||
local newItem = game.Workspace:insertContent(path.."custom/"..newVal.Value)
|
||||
|
|
|
|||
|
|
@ -89,9 +89,28 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newTShirt = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newTShirt = Instance.new("ShirtGraphic")
|
||||
newTShirt.Graphic = newVal.Value
|
||||
newTShirt.Parent = newChar
|
||||
if (pcall(function()
|
||||
newTShirt = game.Workspace:InsertContent(newVal.Value)
|
||||
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
|
||||
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
||||
if newTShirt[1] then
|
||||
|
|
|
|||
|
|
@ -89,9 +89,28 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newTShirt = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newTShirt = Instance.new("ShirtGraphic")
|
||||
newTShirt.Graphic = newVal.Value
|
||||
newTShirt.Parent = newChar
|
||||
if (pcall(function()
|
||||
newTShirt = game.Workspace:InsertContent(newVal.Value)
|
||||
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
|
||||
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
||||
if newTShirt[1] then
|
||||
|
|
|
|||
|
|
@ -90,9 +90,28 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newTShirt = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newTShirt = Instance.new("ShirtGraphic")
|
||||
newTShirt.Graphic = newVal.Value
|
||||
newTShirt.Parent = newChar
|
||||
if (pcall(function()
|
||||
newTShirt = game.Workspace:InsertContent(newVal.Value)
|
||||
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
|
||||
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
||||
if newTShirt[1] then
|
||||
|
|
@ -108,9 +127,28 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newShirt = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newShirt = Instance.new("Shirt")
|
||||
newShirt.ShirtTemplate = newVal.Value
|
||||
newShirt.Parent = newChar
|
||||
if (pcall(function()
|
||||
newShirt = game.Workspace:InsertContent(newVal.Value)
|
||||
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
|
||||
newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value)
|
||||
if newShirt[1] then
|
||||
|
|
@ -126,9 +164,28 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newPants = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newPants = Instance.new("Pants")
|
||||
newPants.PantsTemplate = newVal.Value
|
||||
newPants.Parent = newChar
|
||||
if (pcall(function()
|
||||
newPants = game.Workspace:InsertContent(newVal.Value)
|
||||
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
|
||||
newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value)
|
||||
if newPants[1] then
|
||||
|
|
|
|||
|
|
@ -90,9 +90,28 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newTShirt = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newTShirt = Instance.new("ShirtGraphic")
|
||||
newTShirt.Graphic = newVal.Value
|
||||
newTShirt.Parent = newChar
|
||||
if (pcall(function()
|
||||
newTShirt = game.Workspace:InsertContent(newVal.Value)
|
||||
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
|
||||
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
||||
if newTShirt[1] then
|
||||
|
|
@ -108,9 +127,28 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newShirt = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newShirt = Instance.new("Shirt")
|
||||
newShirt.ShirtTemplate = newVal.Value
|
||||
newShirt.Parent = newChar
|
||||
if (pcall(function()
|
||||
newShirt = game.Workspace:InsertContent(newVal.Value)
|
||||
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
|
||||
newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value)
|
||||
if newShirt[1] then
|
||||
|
|
@ -126,9 +164,28 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newPants = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newPants = Instance.new("Pants")
|
||||
newPants.PantsTemplate = newVal.Value
|
||||
newPants.Parent = newChar
|
||||
if (pcall(function()
|
||||
newPants = game.Workspace:InsertContent(newVal.Value)
|
||||
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
|
||||
newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value)
|
||||
if newPants[1] then
|
||||
|
|
@ -144,11 +201,32 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newFace = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newWaitForChild(charparts[1],"face"):remove()
|
||||
newFace = Instance.new("Decal")
|
||||
newFace.Texture = newVal.Value
|
||||
newFace.Face = "Front"
|
||||
newFace.Parent = charparts[1]
|
||||
if (pcall(function()
|
||||
newFace = game.Workspace:InsertContent(newVal.Value)
|
||||
if newFace[1] then
|
||||
if newFace[1].className == "Decal" then
|
||||
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
|
||||
newFace = game.Workspace:InsertContent(path.."faces/"..newVal.Value)
|
||||
if newFace[1] then
|
||||
|
|
|
|||
|
|
@ -90,9 +90,28 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newTShirt = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newTShirt = Instance.new("ShirtGraphic")
|
||||
newTShirt.Graphic = newVal.Value
|
||||
newTShirt.Parent = newChar
|
||||
if (pcall(function()
|
||||
newTShirt = game.Workspace:InsertContent(newVal.Value)
|
||||
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
|
||||
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
||||
if newTShirt[1] then
|
||||
|
|
@ -108,9 +127,28 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newShirt = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newShirt = Instance.new("Shirt")
|
||||
newShirt.ShirtTemplate = newVal.Value
|
||||
newShirt.Parent = newChar
|
||||
if (pcall(function()
|
||||
newShirt = game.Workspace:InsertContent(newVal.Value)
|
||||
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
|
||||
newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value)
|
||||
if newShirt[1] then
|
||||
|
|
@ -126,9 +164,28 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newPants = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newPants = Instance.new("Pants")
|
||||
newPants.PantsTemplate = newVal.Value
|
||||
newPants.Parent = newChar
|
||||
if (pcall(function()
|
||||
newPants = game.Workspace:InsertContent(newVal.Value)
|
||||
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
|
||||
newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value)
|
||||
if newPants[1] then
|
||||
|
|
@ -144,11 +201,32 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newFace = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newWaitForChild(charparts[1],"face"):remove()
|
||||
newFace = Instance.new("Decal")
|
||||
newFace.Texture = newVal.Value
|
||||
newFace.Face = "Front"
|
||||
newFace.Parent = charparts[1]
|
||||
if (pcall(function()
|
||||
newFace = game.Workspace:InsertContent(newVal.Value)
|
||||
if newFace[1] then
|
||||
if newFace[1].className == "Decal" then
|
||||
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
|
||||
newFace = game.Workspace:InsertContent(path.."faces/"..newVal.Value)
|
||||
if newFace[1] then
|
||||
|
|
|
|||
|
|
@ -93,9 +93,28 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newTShirt = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newTShirt = Instance.new("ShirtGraphic")
|
||||
newTShirt.Graphic = newVal.Value
|
||||
newTShirt.Parent = newChar
|
||||
if (pcall(function()
|
||||
newTShirt = game.Workspace:InsertContent(newVal.Value)
|
||||
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
|
||||
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
||||
if newTShirt[1] then
|
||||
|
|
@ -111,9 +130,28 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newShirt = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newShirt = Instance.new("Shirt")
|
||||
newShirt.ShirtTemplate = newVal.Value
|
||||
newShirt.Parent = newChar
|
||||
if (pcall(function()
|
||||
newShirt = game.Workspace:InsertContent(newVal.Value)
|
||||
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
|
||||
newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value)
|
||||
if newShirt[1] then
|
||||
|
|
@ -129,9 +167,28 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newPants = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newPants = Instance.new("Pants")
|
||||
newPants.PantsTemplate = newVal.Value
|
||||
newPants.Parent = newChar
|
||||
if (pcall(function()
|
||||
newPants = game.Workspace:InsertContent(newVal.Value)
|
||||
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
|
||||
newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value)
|
||||
if newPants[1] then
|
||||
|
|
@ -147,11 +204,32 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newFace = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newWaitForChild(charparts[1],"face"):remove()
|
||||
newFace = Instance.new("Decal")
|
||||
newFace.Texture = newVal.Value
|
||||
newFace.Face = "Front"
|
||||
newFace.Parent = charparts[1]
|
||||
if (pcall(function()
|
||||
newFace = game.Workspace:InsertContent(newVal.Value)
|
||||
if newFace[1] then
|
||||
if newFace[1].className == "Decal" then
|
||||
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
|
||||
newFace = game.Workspace:InsertContent(path.."faces/"..newVal.Value)
|
||||
if newFace[1] then
|
||||
|
|
|
|||
|
|
@ -111,9 +111,28 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newTShirt = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newTShirt = Instance.new("ShirtGraphic")
|
||||
newTShirt.Graphic = newVal.Value
|
||||
newTShirt.Parent = newChar
|
||||
if (pcall(function()
|
||||
newTShirt = game.Workspace:InsertContent(newVal.Value)
|
||||
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
|
||||
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
||||
if newTShirt[1] then
|
||||
|
|
@ -129,9 +148,28 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newShirt = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newShirt = Instance.new("Shirt")
|
||||
newShirt.ShirtTemplate = newVal.Value
|
||||
newShirt.Parent = newChar
|
||||
if (pcall(function()
|
||||
newShirt = game.Workspace:InsertContent(newVal.Value)
|
||||
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
|
||||
newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value)
|
||||
if newShirt[1] then
|
||||
|
|
@ -147,9 +185,28 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newPants = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newPants = Instance.new("Pants")
|
||||
newPants.PantsTemplate = newVal.Value
|
||||
newPants.Parent = newChar
|
||||
if (pcall(function()
|
||||
newPants = game.Workspace:InsertContent(newVal.Value)
|
||||
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
|
||||
newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value)
|
||||
if newPants[1] then
|
||||
|
|
@ -165,11 +222,32 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newFace = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newWaitForChild(charparts[1],"face"):remove()
|
||||
newFace = Instance.new("Decal")
|
||||
newFace.Texture = newVal.Value
|
||||
newFace.Face = "Front"
|
||||
newFace.Parent = charparts[1]
|
||||
if (pcall(function()
|
||||
newFace = game.Workspace:InsertContent(newVal.Value)
|
||||
if newFace[1] then
|
||||
if newFace[1].className == "Decal" then
|
||||
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
|
||||
newFace = game.Workspace:InsertContent(path.."faces/"..newVal.Value)
|
||||
if newFace[1] then
|
||||
|
|
|
|||
|
|
@ -102,9 +102,28 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newTShirt = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newTShirt = Instance.new("ShirtGraphic")
|
||||
newTShirt.Graphic = newVal.Value
|
||||
newTShirt.Parent = newChar
|
||||
if (pcall(function()
|
||||
newTShirt = game.Workspace:InsertContent(newVal.Value)
|
||||
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
|
||||
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
||||
if newTShirt[1] then
|
||||
|
|
@ -120,9 +139,28 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newShirt = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newShirt = Instance.new("Shirt")
|
||||
newShirt.ShirtTemplate = newVal.Value
|
||||
newShirt.Parent = newChar
|
||||
if (pcall(function()
|
||||
newShirt = game.Workspace:InsertContent(newVal.Value)
|
||||
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
|
||||
newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value)
|
||||
if newShirt[1] then
|
||||
|
|
@ -138,9 +176,28 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newPants = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newPants = Instance.new("Pants")
|
||||
newPants.PantsTemplate = newVal.Value
|
||||
newPants.Parent = newChar
|
||||
if (pcall(function()
|
||||
newPants = game.Workspace:InsertContent(newVal.Value)
|
||||
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
|
||||
newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value)
|
||||
if newPants[1] then
|
||||
|
|
@ -156,11 +213,32 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newFace = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newWaitForChild(charparts[1],"face"):remove()
|
||||
newFace = Instance.new("Decal")
|
||||
newFace.Texture = newVal.Value
|
||||
newFace.Face = "Front"
|
||||
newFace.Parent = charparts[1]
|
||||
if (pcall(function()
|
||||
newFace = game.Workspace:InsertContent(newVal.Value)
|
||||
if newFace[1] then
|
||||
if newFace[1].className == "Decal" then
|
||||
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
|
||||
newFace = game.Workspace:InsertContent(path.."faces/"..newVal.Value)
|
||||
if newFace[1] then
|
||||
|
|
|
|||
|
|
@ -39,9 +39,28 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newTShirt = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newTShirt = Instance.new("ShirtGraphic")
|
||||
newTShirt.Graphic = newVal.Value
|
||||
newTShirt.Parent = newChar
|
||||
if (pcall(function()
|
||||
newTShirt = game.Workspace:InsertContent(newVal.Value)
|
||||
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
|
||||
newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
|
||||
if newTShirt[1] then
|
||||
|
|
@ -57,9 +76,28 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newShirt = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newShirt = Instance.new("Shirt")
|
||||
newShirt.ShirtTemplate = newVal.Value
|
||||
newShirt.Parent = newChar
|
||||
if (pcall(function()
|
||||
newShirt = game.Workspace:InsertContent(newVal.Value)
|
||||
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
|
||||
newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value)
|
||||
if newShirt[1] then
|
||||
|
|
@ -75,9 +113,28 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newPants = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newPants = Instance.new("Pants")
|
||||
newPants.PantsTemplate = newVal.Value
|
||||
newPants.Parent = newChar
|
||||
if (pcall(function()
|
||||
newPants = game.Workspace:InsertContent(newVal.Value)
|
||||
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
|
||||
newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value)
|
||||
if newPants[1] then
|
||||
|
|
@ -93,11 +150,32 @@ function LoadCharacterNew(playerApp,newChar)
|
|||
pcall(function()
|
||||
local newFace = "";
|
||||
if (string.match(newVal.Value, "http") == "http") then
|
||||
newWaitForChild(charparts[1],"face"):remove()
|
||||
newFace = Instance.new("Decal")
|
||||
newFace.Texture = newVal.Value
|
||||
newFace.Face = "Front"
|
||||
newFace.Parent = charparts[1]
|
||||
if (pcall(function()
|
||||
newFace = game.Workspace:InsertContent(newVal.Value)
|
||||
if newFace[1] then
|
||||
if newFace[1].className == "Decal" then
|
||||
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
|
||||
newFace = game.Workspace:InsertContent(path.."faces/"..newVal.Value)
|
||||
if newFace[1] then
|
||||
|
|
|
|||
Loading…
Reference in New Issue