Back to Scripts
AI Gui2Lua But it so good lol
ScriptBlox
Universal
Free
Game: Universal Script 📌
98
Views
0
Likes
0
Dislikes
Dr_Harkinian
offline
Features
Not mine, gemini create this
Script Code
local Players = game:GetService("Players")
local player = Players.LocalPlayer
-- GUI SETUP
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "BigGuiConverter_V2"
ScreenGui.Parent = player:WaitForChild("PlayerGui")
ScreenGui.ResetOnSpawn = false
local Main = Instance.new("Frame", ScreenGui)
Main.Size = UDim2.new(0, 350, 0, 170)
Main.Position = UDim2.new(0.5, -175, 0.5, -85)
Main.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
local Input = Instance.new("TextBox", Main)
Input.PlaceholderText = "Target ScreenGui Name"
Input.Size = UDim2.new(0.8, 0, 0, 40)
Input.Position = UDim2.new(0.1, 0, 0.25, 0)
Input.Text = ""
local Convert = Instance.new("TextButton", Main)
Convert.Text = "CONVERT"
Convert.Size = UDim2.new(0.8, 0, 0, 45)
Convert.Position = UDim2.new(0.1, 0, 0.6, 0)
Convert.BackgroundColor3 = Color3.fromRGB(0, 120, 255)
Convert.TextColor3 = Color3.new(1, 1, 1)
--- ENGINE ---
local function serialize(varName, obj, prop)
local success, val = pcall(function() return obj[prop] end)
if not success or val == nil then return nil end
if typeof(val) == "UDim2" then
return string.format("%s.%s = UDim2.new(%s, %d, %s, %d)", varName, prop, tostring(val.X.Scale), val.X.Offset, tostring(val.Y.Scale), val.Y.Offset)
elseif typeof(val) == "Color3" then
return string.format("%s.%s = Color3.fromRGB(%d, %d, %d)", varName, prop, math.round(val.R*255), math.round(val.G*255), math.round(val.B*255))
elseif typeof(val) == "string" then
return string.format("%s.%s = %q", varName, prop, val)
elseif typeof(val) == "EnumItem" then
return string.format("%s.%s = %s", varName, prop, tostring(val))
elseif typeof(val) == "number" or typeof(val) == "boolean" then
return string.format("%s.%s = %s", varName, prop, tostring(val))
end
return nil
end
local function convert(target)
local code = {"-- Generated by Gemini\nlocal player = game:GetService('Players').LocalPlayer\nlocal PlayerGui = player:WaitForChild('PlayerGui')"}
local nameCounts = {}
local function scan(obj, parentVar)
local rawName = obj.Name:gsub("%s+", ""):gsub("[^%a%d]", "")
if rawName == "" then rawName = "Element" end
nameCounts[rawName] = (nameCounts[rawName] or 0) + 1
local varName = rawName .. "_" .. nameCounts[rawName]
table.insert(code, string.format("local %s = Instance.new(%q)", varName, obj.ClassName))
table.insert(code, string.format("%s.Name = %q", varName, obj.Name))
table.insert(code, string.format("%s.Parent = %s", varName, parentVar))
-- Added Image-specific properties here
local props = {
"Size", "Position", "Visible", "ZIndex",
"BackgroundColor3", "BackgroundTransparency",
"Image", "ImageTransparency", "ImageColor3", -- Fixed for ImageButtons
"Text", "TextTransparency", "TextColor3", "TextSize"
}
for _, p in ipairs(props) do
local line = serialize(varName, obj, p)
if line then table.insert(code, line) end
end
-- Ensure Text is ALWAYS on top of Images
if obj:IsA("TextLabel") or obj:IsA("TextBox") then
table.insert(code, string.format("%s.ZIndex = %d", varName, (obj.ZIndex + 5)))
end
-- Script Injection for ImageButtons
if obj:IsA("ImageButton") or obj:IsA("TextButton") then
local randomName = ""
for i = 1, 8 do randomName = randomName .. string.char(math.random(97, 122)) end
local scriptBlock = string.format([[
local function %s()
local script = Instance.new("LocalScript", %s)
%s.MouseButton1Click:Connect(function()
print("Clicked: " .. %s.Name)
end)
end
coroutine.wrap(%s)()]], randomName, varName, varName, varName, randomName)
table.insert(code, scriptBlock)
end
table.insert(code, "")
for _, child in ipairs(obj:GetChildren()) do scan(child, varName) end
end
scan(target, "PlayerGui")
setclipboard(table.concat(code, "\n"))
print("✅ Clipboard")
end
Convert.MouseButton1Click:Connect(function()
local t = player.PlayerGui:FindFirstChild(Input.Text) or game:GetService("StarterGui"):FindFirstChild(Input.Text)
if t then convert(t) else warn("GUI not found") end
end)
Comments (0)
Please login to comment
Login with Discord
Loading comments...