local Add = script.Parent.Add
local Properties = script.Parent.PropertiesFrame
local Items = script.Parent.ItemsFrame
local Exit = script.Parent.X
local FrameTable = {}
local ScrollingTable = {}
local TextLabelTable = {}
local TextButtonTable = {"n"}
local TextBoxTable = {}
local ImageButtonTable = {}
local ImageLabelTable = {}
local VideoFrameTable = {}
local TestTable = {}
for i,v in pairs(Add:GetChildren()) do
if v:IsA("TextButton") then
v.MouseButton1Click:Connect(function()
local object = Instance.new(v.Name)
if object then
if object:IsA("TextButton") then
object.Size = UDim2.new(0.146, 0,0.065, 0)
elseif object:IsA("TextBox") then
object.Size = UDim2.new(0.146, 0,0.065, 0)
elseif object:IsA("TextLabel") then
object.Size = UDim2.new(0.146, 0,0.065, 0)
elseif object:IsA("ImageButton") then
object.Size = UDim2.new(0.073, 0,0.13, 0)
elseif object:IsA("ImageLabel") then
object.Size = UDim2.new(0.073, 0,0.13, 0)
elseif object:IsA("Frame") then
object.Size = UDim2.new(0.073, 0,0.13, 0)
elseif object:IsA("ScrollingFrame") then
object.Size = UDim2.new(0.073, 0,0.13, 0)
elseif object:IsA("VideoFrame") then
object.Size = UDim2.new(0.073, 0,0.13, 0)
end
object.Parent = Main
object.Visible = true
object.Position = UDim2.new(.5,0,.5,0)
object.BackgroundColor3 = Color3.new(1,0,0)
end
end)
end
end
local SizeFrame = Properties.SizeFrame
local sizexframe = SizeFrame.X
local sizeyframe = SizeFrame.Y
local sizeXoffset = sizexframe.Offset
local sizeXscale = sizexframe.Scale
local sizeYoffset = sizeyframe.Offset
local sizeYscale = sizeyframe.Scale
Main.ChildAdded:Connect(function(object)
print(object.ClassName)
if object:IsA("TextButton") then
print("object is a "..object.ClassName)
for i,v in pairs(TextButtonTable) do
wait(1)
print(TextButtonTable)
if i == nil then
print("nil")
table.insert(TextButtonTable,1,"1")
print(TextButtonTable)
else
if TextButtonTable[1] == "n" then
table.remove(TextButtonTable,1)
table.insert(TextButtonTable,1,i)
else
table.insert(TestTable, i,i)
end
print("not nil")
print(TextButtonTable)
end
end
elseif object:IsA("TextBox") then
elseif object:IsA("TextLabel") then
elseif object:IsA("ImageButton") then
elseif object:IsA("ImageLabel") then
elseif object:IsA("Frame") then
elseif object:IsA("ScrollingFrame") then
elseif object:IsA("VideoFrame") then
end
end)
for i,itemss in pairs(Items:GetChildren()) do
if itemss:IsA("TextButton") then
itemss.MouseButton1Click:Connect(function()
Properties.Visible = true
script.Parent.PropertiesText.Visible = true
local Item = Instance.new("TextButton")
end)
end
end
sizeXoffset.FocusLost:Connect(function(enter)
if enter then
end
end)
--[[game:GetService("RunService").Heartbeat:Connect(function()
if Properties.Visible == false then
else
Add.Size = UDim2.new(0.3, 0,0.9, 0)
Add.Position = UDim2.new(0, 0,0.1, 0)
end
end) --]]