convert Require (not script just ui)
Key Required

convert Require (not script just ui)

GUI Creator [ not available ]Team_cZerkidd2Team_cZerkidd2 1.3K views 533 executesUpdated Sep 19, 2026
Unrated
00
Lua Script•282 lines (11395 chars)
local LocalPlayer = game:GetService("Players").LocalPlayer

local propsToSkip = {Parent = true, ClassName = true}

local commonProps = {
    "Name", "Visible", "Size", "Position", "Rotation", "AnchorPoint",
    "BackgroundColor3", "BackgroundTransparency", "BorderSizePixel", "BorderColor3",
    "ZIndex", "ClipsDescendants", "LayoutOrder",
    "Text", "TextColor3", "TextTransparency", "TextSize", "TextScaled", "TextWrapped",
    "Font", "TextXAlignment", "TextYAlignment", "ClearTextOnFocus", "MultiLine", "PlaceholderText",
    "Image", "ImageColor3", "ImageTransparency", "ImageRectOffset", "ImageRectSize", "ScaleType",
    "CornerRadius", "Color", "Thickness", "ApplyStrokeMode", "LineJoinMode",
    "CanvasSize", "ScrollBarThickness", "ScrollBarImageColor3",
    "FillDirection", "HorizontalAlignment", "VerticalAlignment", "SortOrder", "Padding",
    "CellSize", "CellPadding"
}

local function serVal(v, ind)
    ind = ind or 0
    local t = typeof(v)
    if t == "string" then return string.format("%q", v)
    elseif t == "number" or t == "boolean" then return tostring(v)
    elseif t == "nil" then return "nil"
    elseif t == "Vector3" then return string.format("Vector3.new(%s,%s,%s)", v.X, v.Y, v.Z)
    elseif t == "Vector2" then return string.format("Vector2.new(%s,%s)", v.X, v.Y)
    elseif t == "CFrame" then
        local c = {v:GetComponents()}
        return string.format("CFrame.new(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)", table.unpack(c))
    elseif t == "Color3" then return string.format("Color3.fromRGB(%d,%d,%d)", math.floor(v.R*255+0.5), math.floor(v.G*255+0.5), math.floor(v.B*255+0.5))
    elseif t == "BrickColor" then return string.format("BrickColor.new(%q)", v.Name)
    elseif t == "UDim" then return string.format("UDim.new(%s,%s)", v.Scale, v.Offset)
    elseif t == "UDim2" then return string.format("UDim2.new(%s,%s,%s,%s)", v.X.Scale, v.X.Offset, v.Y.Scale, v.Y.Offset)
    elseif t == "Rect" then return string.format("Rect.new(%s,%s,%s,%s)", v.Min.X, v.Min.Y, v.Max.X, v.Max.Y)
    elseif t == "NumberRange" then return string.format("NumberRange.new(%s,%s)", v.Min, v.Max)
    elseif t == "NumberSequence" then
        local p = {}
        for _, k in ipairs(v.Keypoints) do
            table.insert(p, string.format("NumberSequenceKeypoint.new(%s,%s,%s)", k.Time, k.Value, k.Envelope))
        end
        return "NumberSequence.new({" .. table.concat(p, ",") .. "})"
    elseif t == "ColorSequence" then
        local p = {}
        for _, k in ipairs(v.Keypoints) do
            table.insert(p, string.format("ColorSequenceKeypoint.new(%s,Color3.new(%s,%s,%s))", k.Time, k.Value.R, k.Value.G, k.Value.B))
        end
        return "ColorSequence.new({" .. table.concat(p, ",") .. "})"
    elseif t == "EnumItem" then return string.format("Enum.%s.%s", tostring(v.EnumType), v.Name)
    elseif t == "Font" then return string.format("Font.new(%q,%s,%s)", v.Family, tostring(v.Weight), tostring(v.Style))
    elseif t == "table" then
        local p = {}
        for k, val in pairs(v) do
            local key
            if type(k) == "string" and k:match("^[%a_][%w_]*$") then key = k .. "="
            elseif type(k) == "number" then key = "[" .. k .. "]="
            else key = "[" .. serVal(k, 0) .. "]=" end
            table.insert(p, key .. serVal(val, ind + 1))
        end
        return "{" .. table.concat(p, ",") .. "}"
    end
    return "nil"
end

local classCounters = {}

local function getVarName(inst)
    local className = inst.ClassName
    classCounters[className] = (classCounters[className] or 0) + 1
    local count = classCounters[className]
    if count == 1 then
        return className
    else
        return className .. "_" .. (count - 1)
    end
end

local function isUI(inst)
    return inst:IsA("GuiObject") or inst:IsA("UIComponent") or inst:IsA("UIGridStyleLayout") or inst:IsA("UIConstraint") or inst:IsA("UIBase")
end

local function serInstProps(inst, var)
    local lines = {}
    local propNames = {}
    local propSet = {}

    local ok, list = pcall(function() return inst:GetProperties() end)
    if ok and type(list) == "table" then
        for _, pi in ipairs(list) do
            if not propsToSkip[pi.Name] and pi.CanSave then
                propSet[pi.Name] = true
                table.insert(propNames, pi.Name)
            end
        end
    end

    for _, pName in ipairs(commonProps) do
        if not propSet[pName] and not propsToSkip[pName] then
            local o, _ = pcall(function() return inst[pName] end)
            if o then
                propSet[pName] = true
                table.insert(propNames, pName)
            end
        end
    end

    for _, n in ipairs(propNames) do
        local o, val = pcall(function() return inst[n] end)
        if o and val ~= nil then
            local def = nil
            local o2, di = pcall(function() return Instance.new(inst.ClassName) end)
            if o2 then
                local o3, dv = pcall(function() return di[n] end)
                if o3 then def = dv end
                di:Destroy()
            end
            if def == nil or tostring(val) ~= tostring(def) then
                local o4, s = pcall(serVal, val, 0)
                if o4 then
                    table.insert(lines, var .. "." .. n .. " = " .. s)
                end
            end
        end
    end

    return table.concat(lines, "\n")
end

local function convert(gui)
    classCounters = {}
    local instances = {}
    local map = {}

    local function collect(inst)
        local var = getVarName(inst)
        map[inst] = var
        table.insert(instances, inst)
        for _, ch in ipairs(inst:GetChildren()) do
            if isUI(ch) then
                collect(ch)
            end
        end
    end

    for _, ch in ipairs(gui:GetChildren()) do
        if isUI(ch) then
            collect(ch)
        end
    end

    local codeLines = {}

    table.insert(codeLines, "local UserInputService = game:GetService(\"UserInputService\")")
    table.insert(codeLines, "local ScreenGui = Instance.new(\"ScreenGui\")")
    for _, inst in ipairs(instances) do
        table.insert(codeLines, "local " .. map[inst] .. " = Instance.new(" .. string.format("%q", inst.ClassName) .. ")")
    end

    table.insert(codeLines, "")

    table.insert(codeLines, "ScreenGui.Name = " .. string.format("%q", gui.Name))
    table.insert(codeLines, "ScreenGui.Parent = game:GetService(\"Players\").LocalPlayer:WaitForChild(\"PlayerGui\")")
    table.insert(codeLines, "ScreenGui.ResetOnSpawn = " .. tostring(gui.ResetOnSpawn))
    table.insert(codeLines, "ScreenGui.IgnoreGuiInset = " .. tostring(gui.IgnoreGuiInset))
    table.insert(codeLines, "ScreenGui.DisplayOrder = " .. tostring(gui.DisplayOrder))
    table.insert(codeLines, "ScreenGui.Enabled = " .. tostring(gui.Enabled))
    table.insert(codeLines, "ScreenGui.ZIndexBehavior = " .. serVal(gui.ZIndexBehavior))

    local mainFrameVar = nil

    for _, inst in ipairs(instances) do
        local var = map[inst]
        local parentVar = inst.Parent == gui and "ScreenGui" or map[inst.Parent]
        if parentVar then
            table.insert(codeLines, var .. ".Parent = " .. parentVar)
        end
        if inst.Parent == gui and inst:IsA("GuiObject") and not mainFrameVar then
            mainFrameVar = var
        end
        local pCode = serInstProps(inst, var)
        if pCode ~= "" then
            table.insert(codeLines, pCode)
        end
    end

    if mainFrameVar then
        table.insert(codeLines, "")
        table.insert(codeLines, "local dragging, dragInput, dragStart, startPos")
        table.insert(codeLines, "local function updateDrag(input)")
        table.insert(codeLines, "    local delta = input.Position - dragStart")
        table.insert(codeLines, "    " .. mainFrameVar .. ".Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)")
        table.insert(codeLines, "end")
        table.insert(codeLines, mainFrameVar .. ".InputBegan:Connect(function(input)")
        table.insert(codeLines, "    if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then")
        table.insert(codeLines, "        dragging = true")
        table.insert(codeLines, "        dragStart = input.Position")
        table.insert(codeLines, "        startPos = " .. mainFrameVar .. ".Position")
        table.insert(codeLines, "        input.Changed:Connect(function()")
        table.insert(codeLines, "            if input.UserInputState == Enum.UserInputState.End then")
        table.insert(codeLines, "                dragging = false")
        table.insert(codeLines, "            end")
        table.insert(codeLines, "        end)")
        table.insert(codeLines, "    end")
        table.insert(codeLines, "end)")
        table.insert(codeLines, mainFrameVar .. ".InputChanged:Connect(function(input)")
        table.insert(codeLines, "    if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then")
        table.insert(codeLines, "        dragInput = input")
        table.insert(codeLines, "    end")
        table.insert(codeLines, "end)")
        table.insert(codeLines, "UserInputService.InputChanged:Connect(function(input)")
        table.insert(codeLines, "    if input == dragInput and dragging then")
        table.insert(codeLines, "        updateDrag(input)")
        table.insert(codeLines, "    end")
        table.insert(codeLines, "end)")
    end

    return table.concat(codeLines, "\n")
end

local function copy(text)
    if setclipboard then setclipboard(text); return true end
    if toclipboard then toclipboard(text); return true end
    return false
end

local gui = Instance.new("ScreenGui")
gui.Name = "SCConv"
gui.ResetOnSpawn = false
gui.Parent = LocalPlayer:WaitForChild("PlayerGui")

local f = Instance.new("Frame")
f.Size = UDim2.new(0, 300, 0, 60)
f.Position = UDim2.new(0.5, -150, 0.5, -30)
f.BackgroundColor3 = Color3.fromRGB(30, 30, 35)
f.BorderSizePixel = 0
f.Active = true
f.Draggable = true
f.Parent = gui

Instance.new("UICorner", f).CornerRadius = UDim.new(0, 8)

local b = Instance.new("TextButton")
b.Size = UDim2.new(1, -20, 1, -20)
b.Position = UDim2.new(0, 10, 0, 10)
b.BackgroundColor3 = Color3.fromRGB(60, 140, 90)
b.BorderSizePixel = 0
b.Text = "Convert SC Clipboard"
b.TextColor3 = Color3.fromRGB(255, 255, 255)
b.Font = Enum.Font.GothamBold
b.TextSize = 14
b.Parent = f

Instance.new("UICorner", b).CornerRadius = UDim.new(0, 6)

b.MouseButton1Click:Connect(function()
    local pg = LocalPlayer:WaitForChild("PlayerGui")
    local target = nil
    for _, ch in ipairs(pg:GetChildren()) do
        if ch:IsA("ScreenGui") and ch ~= gui then
            target = ch
        end
    end
    if not target then
        b.Text = "Tidak ada ScreenGui!"
        task.wait(2)
        b.Text = "Convert SC Clipboard"
        return
    end
    local ok, res = pcall(convert, target)
    if not ok then
        b.Text = "Gagal: " .. tostring(res):sub(1, 20)
        task.wait(2)
        b.Text = "Convert SC Clipboard"
        return
    end
    if copy(res) then
        b.Text = "Tersalin ke clipboard!"
        gui:Destroy()
    else
        b.Text = "Clipboard gagal"
        task.wait(2)
        b.Text = "Convert SC Clipboard"
    end
end)

Features & Information

By Indonesia exploiter

Community Comments (2)

ksa_king37ksa_king37Sep 19, 2026

مش شغال يسطا

Dave83891Dave83891Sep 20, 2026

the game is dead

More Scripts for GUI Creator [ not available ]