Advertisement
Zynee

ui

Jan 26th, 2025
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.90 KB | None | 0 0
  1. for i, v in pairs(game.CoreGui:GetChildren()) do
  2.     if v.Name == "UiLib" then
  3.         v:Destroy()
  4.     end
  5. end
  6.  
  7. local UiLib = Instance.new("ScreenGui")
  8. UiLib.Name = "UiLib"
  9. UiLib.Parent = game.CoreGui
  10. UiLib.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  11.  
  12. local function getNextWindowPos()
  13.     local biggest = 0
  14.     local ok = nil
  15.     for i, v in pairs(UiLib:GetChildren()) do
  16.         if v.Position.X.Offset > biggest then
  17.             biggest = v.Position.X.Offset
  18.             ok = v
  19.         end
  20.     end
  21.     if biggest == 0 then
  22.         biggest = biggest + 15
  23.     else
  24.         biggest = biggest + ok.Size.X.Offset + 10
  25.     end
  26.     return biggest
  27. end
  28.  
  29. local Library = {}
  30.  
  31. function Library:Window(title)
  32.     local Top = Instance.new("Frame")
  33.     local UICorner = Instance.new("UICorner")
  34.     local Container = Instance.new("Frame")
  35.     local UIListLayout_2 = Instance.new("UIListLayout")
  36.     local Line = Instance.new("Frame")
  37.     local Title = Instance.new("TextLabel")
  38.     local Minimize = Instance.new("ImageButton")
  39.  
  40.     Top.Name = "Top"
  41.     Top.Parent = UiLib
  42.     Top.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  43.     Top.BorderSizePixel = 0
  44.     Top.Position = UDim2.new(0, getNextWindowPos(), 0.01, 0)
  45.     Top.Size = UDim2.new(0, 204, 0, 28)
  46.     Top.Active = true
  47.     Top.Draggable = true
  48.  
  49.     UICorner.CornerRadius = UDim.new(0, 4)
  50.     UICorner.Parent = Top
  51.  
  52.     Container.Name = "Container"
  53.     Container.Parent = Top
  54.     Container.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  55.     Container.BackgroundTransparency = 1.000
  56.     Container.ClipsDescendants = true
  57.     Container.Position = UDim2.new(0, 0, 1, 0)
  58.     Container.Size = UDim2.new(0, 204, 0, 800)
  59.  
  60.     UIListLayout_2.Parent = Container
  61.     UIListLayout_2.HorizontalAlignment = Enum.HorizontalAlignment.Center
  62.     UIListLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
  63.  
  64.     Line.Name = "Line"
  65.     Line.Parent = Top
  66.     Line.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  67.     Line.BorderSizePixel = 0
  68.     Line.Position = UDim2.new(0, 0, 0.892857134, 0)
  69.     Line.Size = UDim2.new(0, 204, 0, 3)
  70.  
  71.     Title.Name = "Title"
  72.     Title.Parent = Top
  73.     Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  74.     Title.BackgroundTransparency = 1.000
  75.     Title.Position = UDim2.new(0.0245098043, 0, 0.142857149, 0)
  76.     Title.Size = UDim2.new(0, 174, 0, 20)
  77.     Title.Font = Enum.Font.GothamSemibold
  78.     Title.Text = title
  79.     Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  80.     Title.TextScaled = true
  81.     Title.TextSize = 14.000
  82.     Title.TextWrapped = true
  83.     Title.TextXAlignment = Enum.TextXAlignment.Left
  84.  
  85.     Minimize.Name = "Minimize"
  86.     Minimize.Parent = Top
  87.     Minimize.BackgroundTransparency = 1.000
  88.     Minimize.Position = UDim2.new(0.877451003, 0, 0, 0)
  89.     Minimize.Rotation = 90.000
  90.     Minimize.Size = UDim2.new(0, 25, 0, 25)
  91.     Minimize.ZIndex = 2
  92.     Minimize.Image = "rbxassetid://3926307971"
  93.     Minimize.ImageColor3 = Color3.fromRGB(0, 255, 102)
  94.     Minimize.ImageRectOffset = Vector2.new(764, 244)
  95.     Minimize.ImageRectSize = Vector2.new(36, 36)
  96.  
  97.     local function UZVNGAL_fake_script()
  98.         local script = Instance.new('Script', Minimize)
  99.         script.Parent.MouseButton1Click:Connect(function()
  100.             if script.Parent.Parent.Container.Size == UDim2.new(0, 204, 0, 800) then
  101.                 game:GetService("TweenService"):Create(script.Parent, TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Rotation = 180}):Play()
  102.                 game:GetService("TweenService"):Create(script.Parent, TweenInfo.new(0.25), {ImageColor3 = Color3.fromRGB(255, 0, 68)}):Play()
  103.                 script.Parent.Parent.Container:TweenSize(UDim2.new(0, 204, 0, 0), "InOut", "Sine", 0.25, true)
  104.                 wait(0.1)
  105.                 script.Parent.Parent.Line.Visible = false
  106.             else
  107.                 game:GetService("TweenService"):Create(script.Parent, TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Rotation = 90}):Play()
  108.                 game:GetService("TweenService"):Create(script.Parent, TweenInfo.new(0.25), {ImageColor3 = Color3.fromRGB(0, 255, 102)}):Play()
  109.                 script.Parent.Parent.Container:TweenSize(UDim2.new(0, 204, 0, 800), "InOut", "Sine", 0.2, true)
  110.                 script.Parent.Parent.Line.Visible = true
  111.             end
  112.         end)
  113.     end
  114.     coroutine.wrap(UZVNGAL_fake_script)()
  115.  
  116.     local Lib = {}
  117.  
  118.     function Lib:Button(name, callback)
  119.         local ButtonContainer = Instance.new("Frame")
  120.         local Button = Instance.new("TextButton")
  121.         local ButtonAni = Instance.new("Frame")
  122.         local UICorner_2 = Instance.new("UICorner")
  123.         local UIListLayout = Instance.new("UIListLayout")
  124.         local ButtonName = Instance.new("TextLabel")
  125.  
  126.         ButtonContainer.Name = "ButtonContainer"
  127.         ButtonContainer.Parent = Container
  128.         ButtonContainer.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  129.         ButtonContainer.BorderSizePixel = 0
  130.         ButtonContainer.Size = UDim2.new(0, 204, 0, 28)
  131.  
  132.         Button.Name = "Button"
  133.         Button.Parent = ButtonContainer
  134.         Button.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  135.         Button.BackgroundTransparency = 1.000
  136.         Button.Size = UDim2.new(0, 204, 0, 28)
  137.         Button.Font = Enum.Font.SourceSans
  138.         Button.Text = ""
  139.         Button.TextColor3 = Color3.fromRGB(0, 0, 0)
  140.         Button.TextSize = 14.000
  141.         Button.MouseButton1Click:Connect(function()
  142.             callback()
  143.         end)
  144.  
  145.         ButtonAni.Name = "ButtonAni"
  146.         ButtonAni.Parent = Button
  147.         ButtonAni.BackgroundColor3 = Color3.fromRGB(0, 255, 102)
  148.         ButtonAni.Position = UDim2.new(0.0245098043, 0, 0.0714285746, 0)
  149.  
  150.         UICorner_2.CornerRadius = UDim.new(0, 4)
  151.         UICorner_2.Parent = ButtonAni
  152.  
  153.         UIListLayout.Parent = Button
  154.         UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  155.         UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  156.         UIListLayout.VerticalAlignment = Enum.VerticalAlignment.Center
  157.  
  158.         ButtonName.Name = "ButtonName"
  159.         ButtonName.Parent = ButtonContainer
  160.         ButtonName.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  161.         ButtonName.BackgroundTransparency = 1.000
  162.         ButtonName.Position = UDim2.new(0.0245098043, 0, 0.142857149, 0)
  163.         ButtonName.Size = UDim2.new(0, 194, 0, 20)
  164.         ButtonName.ZIndex = 3
  165.         ButtonName.Font = Enum.Font.GothamSemibold
  166.         ButtonName.Text = name
  167.         ButtonName.TextColor3 = Color3.fromRGB(255, 255, 255)
  168.         ButtonName.TextScaled = true
  169.         ButtonName.TextSize = 14.000
  170.         ButtonName.TextWrapped = true
  171.  
  172.         local function ZNVYM_fake_script()
  173.             local script = Instance.new('Script', Button)
  174.             script.Parent.MouseButton1Click:Connect(function()
  175.                 script.Parent.ButtonAni:TweenSize(UDim2.new(0, 194, 0, 24), 'InOut', "Sine", 0.3, true)
  176.                 wait(0.45)
  177.                 script.Parent.ButtonAni:TweenSize(UDim2.new(0, 0, 0, 0), "InOut", "Sine", 0.3, true)
  178.             end)
  179.         end
  180.         coroutine.wrap(ZNVYM_fake_script)()
  181.     end
  182.  
  183.     function Lib:Textbox(name, placeholderText, callback)
  184.     local TextboxContainer = Instance.new("Frame")
  185.     local TextboxLabel = Instance.new("TextLabel")
  186.     local Textbox = Instance.new("TextBox")
  187.     local UICorner = Instance.new("UICorner")
  188.  
  189.     TextboxContainer.Name = "TextboxContainer"
  190.     TextboxContainer.Parent = Container
  191.     TextboxContainer.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  192.     TextboxContainer.BorderSizePixel = 0
  193.     TextboxContainer.Size = UDim2.new(0, 204, 0, 50) -- Updated size
  194.  
  195.     TextboxLabel.Name = "TextboxLabel"
  196.     TextboxLabel.Parent = TextboxContainer
  197.     TextboxLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  198.     TextboxLabel.BackgroundTransparency = 1.000
  199.     TextboxLabel.Position = UDim2.new(0.0245098043, 0, 0.1, 0)
  200.     TextboxLabel.Size = UDim2.new(0, 150, 0, 20)
  201.     TextboxLabel.Font = Enum.Font.GothamSemibold
  202.     TextboxLabel.Text = name
  203.     TextboxLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  204.     TextboxLabel.TextScaled = true
  205.     TextboxLabel.TextSize = 14.000
  206.     TextboxLabel.TextWrapped = true
  207.     TextboxLabel.TextXAlignment = Enum.TextXAlignment.Left
  208.  
  209.     Textbox.Name = "Textbox"
  210.     Textbox.Parent = TextboxContainer
  211.     Textbox.BackgroundColor3 = Color3.fromRGB(39, 39, 39)
  212.     Textbox.Position = UDim2.new(0.75, 0, 0.1, 0)
  213.     Textbox.Size = UDim2.new(0, 50, 0, 20)
  214.     Textbox.Font = Enum.Font.SourceSans
  215.     Textbox.Text = ""
  216.     Textbox.TextColor3 = Color3.fromRGB(255, 255, 255)
  217.     Textbox.TextSize = 17.000
  218.     Textbox.PlaceholderText = placeholderText
  219.  
  220.     UICorner.CornerRadius = UDim.new(0, 4)
  221.     UICorner.Parent = Textbox
  222.  
  223.     Textbox:GetPropertyChangedSignal("Text"):Connect(function()
  224.         if callback then
  225.             callback(Textbox.Text)
  226.         end
  227.     end)
  228. end
  229.  
  230.     return Lib
  231. end
  232.  
  233. return Library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement