Sorry if this is way to long to read but if you have the time could you please check this out and tell me if there is any way to make this take up less of the script because it’s so looooong and seems so tedious. Any replies are appreciated!
if object2.Name == "Melee" or object2.Name == "Melee+" then
if object2.Name == "Melee+" then
Plus = true
end
Image = SidesGUI.Melee.ImageLabel:Clone()
Text = SidesGUI.Melee.TextLabel:Clone()
if object2.Value ~= nil then
if Plus == true then
Text.Text = tostring(object2.Value) .. "+"
Card.SurfaceGui.DieSides:FindFirstChild("Side" .. tostring(object2.Side.Value)).BackgroundColor3 = Color3.fromRGB(36, 110, 189)
else
Text.Text = tostring(object2.Value)
end
end
Plus = false
elseif object2.Name == "Ranged" or object2.Name == "Ranged+" then
if object2.Name == "Ranged+" then
Plus = true
end
Image = SidesGUI.Ranged.ImageLabel:Clone()
Text = SidesGUI.Ranged.TextLabel:Clone()
if object2.Value ~= nil then
if Plus == true then
Text.Text = tostring(object2.Value) .. "+"
Card.SurfaceGui.DieSides:FindFirstChild("Side" .. tostring(object2.Side.Value)).BackgroundColor3 = Color3.fromRGB(36, 110, 189)
else
Text.Text = tostring(object2.Value)
end
end
Plus = false
elseif object2.Name == "Indirect" or object2.Name == "Indirect+" then
if object2.Name == "Indirect+" then
Plus = true
end
Image = SidesGUI.Indirect.ImageLabel:Clone()
Text = SidesGUI.Indirect.TextLabel:Clone()
if object2.Value ~= nil then
if Plus == true then
Text.Text = tostring(object2.Value) .. "+"
Card.SurfaceGui.DieSides:FindFirstChild("Side" .. tostring(object2.Side.Value)).BackgroundColor3 = Color3.fromRGB(36, 110, 189)
else
Text.Text = tostring(object2.Value)
end
end
Plus = false
elseif object2.Name == "ChangeSide" then
Image = SidesGUI.ChangeSide.ImageLabel:Clone()
Text = SidesGUI.ChangeSide.TextLabel:Clone()
if object2.Value ~= nil then
Text.Text = tostring(object2.Value)
end
elseif object2.Name == "Resource" then
Image = SidesGUI.Resource.ImageLabel:Clone()
Text = SidesGUI.Resource.TextLabel:Clone()
if object2.Value ~= nil then
Text.Text = tostring(object2.Value)
end
elseif object2.Name == "Ability" then
Image = SidesGUI.Ability.ImageLabel:Clone()
Text = SidesGUI.Ability.TextLabel:Clone()
if object2.Value ~= nil then
Text.Text = tostring(object2.Value)
end
elseif object2.Name == "Shield" then
Image = SidesGUI.Shield.ImageLabel:Clone()
Text = SidesGUI.Shield.TextLabel:Clone()
if object2.Value ~= nil then
Text.Text = tostring(object2.Value)
end
elseif object2.Name == "Disrupt" then
Image = SidesGUI.Disrupt.ImageLabel:Clone()
Text = SidesGUI.Disrupt.TextLabel:Clone()
if object2.Value ~= nil then
Text.Text = tostring(object2.Value)
end
elseif object2.Name == "Blank" then
Image = SidesGUI.Blank.ImageLabel:Clone()
Text = SidesGUI.Blank.TextLabel:Clone()
if object2.Value ~= nil then
Text.Text = tostring(object2.Value)
end
elseif object2.Name == "Discard" then
Image = SidesGUI.Discard.ImageLabel:Clone()
Text = SidesGUI.Discard.TextLabel:Clone()
if object2.Value ~= nil then
Text.Text = tostring(object2.Value)
end
end
Sorry about the horrible indents, it happens when I copy code sometimes.