local function colorToHex(color)
    return string.format("%02x%02x%02x", math.floor(color.R * 255), math.floor(color.G * 255), math.floor(color.B * 255))
end

local function patternToDecalURL(patternID)
    -- Convert pattern ID to a URL or use a predefined URL
    return string.format("http://[Log in to view URL]", patternID)
end

-- Create a table to store all remote event calls
local outfitfinal = {}

-- Helper function to add remote events to the table
local function addRemoteEvent(remoteName, args)
    table.insert(outfitfinal, string.format(
        'game:GetService("ReplicatedStorage"):WaitForChild("Dress Up"):WaitForChild("RemoteEvent"):FireServer(%s)',
        table.concat(args, ", ")
    ))
end

-- Helper function to serialize the outfitfinal table into a string
local function serializeTable(tbl)
    return table.concat(tbl, "\n")
end

-- Get the player and their EquippedAccessories folder
local playerName = game.Players.LocalPlayer.Name
local player = workspace:FindFirstChild(playerName)

if player then
    print("Player found: " .. playerName)
    
    local equippedAccessories = player:FindFirstChild("EquippedAccessories")
    if equippedAccessories then
        print("EquippedAccessories folder found for player: " .. playerName)
        
        for _, item in ipairs(equippedAccessories:GetChildren()) do
            -- Print the item name
            print("Item found: " .. item.Name)

            -- Prepare the arguments for the first RemoteEvent (Equip)
            local equipArgs = {
                string.format('"%s"', "Equip"),
                string.format('"%s"', item.Name)
            }

            -- Add the Equip RemoteEvent to the table
            addRemoteEvent("Equip", equipArgs)
            
            -- Find the first folder within the item
            local firstFolder = nil
            for _, child in ipairs(item:GetChildren()) do
                if child:IsA("Folder") then
                    firstFolder = child
                    break
                end
            end
            
            if firstFolder then
                print("Folder found for item: " .. item.Name .. ", Folder name: " .. firstFolder.Name)
                -- Iterate through parts 1 to 5 in the folder
                for partNumber = 1, 5 do
                    local part = firstFolder:FindFirstChild(tostring(partNumber))
                    if part then
                        -- Use the part's Color directly
                        local color = part.Color

                        -- Prepare the arguments for the first RemoteEvent (Color Accessory)
                        local colorArgs = {
                            string.format('"%s"', "Color Accessory"),
                            string.format('"%s"', item.Name),
                            string.format('"%s"', tostring(partNumber)),
                            string.format('Color3.new(%f, %f, %f)', color.R, color.G, color.B)
                        }

                        -- Add the Color Accessory RemoteEvent to the table
                        addRemoteEvent("Color Accessory", colorArgs)

                        -- If the item name contains "hair", fire the RemoteEvent again with hex color
                        if string.find(string.lower(item.Name), "hair") then
                            local hexColor = colorToHex(color)
                            local hexColorArgs = {
                                string.format('"%s"', "ColoringViaTexture"),
                                string.format('"%s"', item.Name),
                                string.format('"%s"', tostring(partNumber)),
                                string.format('"%s"', hexColor)
                            }

                            -- Add the hex color RemoteEvent to the table
                            addRemoteEvent("ColoringViaTexture", hexColorArgs)
                        end
                        
                        -- Apply decal pattern if part number is 1
                        if partNumber == 1 then
                            local patternID = "examplePatternID"  -- Replace with actual pattern ID or logic to get it
                            local decalURL = patternToDecalURL(patternID)
                            
                            local decalArgs = {
                                string.format('"%s"', "Apply Decal"),
                                string.format('"%s"', item.Name),
                                string.format('"%s"', tostring(partNumber)),
                                string.format('"%s"', decalURL)
                            }

                            -- Add the Apply Decal RemoteEvent to the table
                            addRemoteEvent("Apply Decal", decalArgs)
                        end
                    else
                        print("No part found with name: " .. tostring(partNumber) .. " in folder of item: " .. item.Name)
                    end
                end
            else
                warn("No folder found for item: " .. item.Name)
            end
        end
    else
        warn("EquippedAccessories folder not found for player: " .. playerName)
    end

    -- Get the player's head part and change the skintone
    local head = player:FindFirstChild("Head")
    if head then
        local headColor = head.Color

        local skinToneArgs = {
            string.format('"%s"', "Change Skintone"),
            string.format('Color3.new(%f, %f, %f)', headColor.R, headColor.G, headColor.B)
        }

        -- Add the Change Skintone RemoteEvent to the table
        addRemoteEvent("Change Skintone", skinToneArgs)

        -- Get the player's face decal and change its texture
        local face = head:FindFirstChild("face")
        if face and face:IsA("Decal") then
            local faceTexture = face.Texture

            local faceArgs = {
                string.format('"%s"', "Classic Makeup"),
                string.format('"%s"', faceTexture)
            }

            -- Add the Classic Makeup RemoteEvent to the table
            addRemoteEvent("Classic Makeup", faceArgs)
        else
            warn("Face decal not found for player: " .. playerName)
        end
    else
        warn("Head part not found for player: " .. playerName)
    end

    -- Get the Nails accessory and find part '1'
    local nails = player:FindFirstChild("Nails")
    if nails then
        local part1 = nails:FindFirstChild("1")
        if part1 then
            local part1Color = part1.Color

            local nailsColorArgs = {
                string.format('"%s"', "Color Accessory"),
                string.format('"%s"', "Nails"),
                string.format('"%s"', "1"),
                string.format('Color3.new(%f, %f, %f)', part1Color.R, part1Color.G, part1Color.B)
            }

            -- Add the Color Accessory for Nails RemoteEvent to the table
            addRemoteEvent("Color Accessory", nailsColorArgs)
        else
            warn("Part '1' not found in Nails accessory for player: " .. playerName)
        end
    else
        warn("Nails accessory not found for player: " .. playerName)
    end

    -- Serialize the outfitfinal table to a string and copy to clipboard
    local serializedData = serializeTable(outfitfinal)
    setclipboard(serializedData)
    print("Serialized data copied to clipboard.")
else
    warn("Player not found: " .. playerName)
end

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: