Messi33536086

Untitled

Jun 13th, 2025 (edited)
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.57 KB | None | 0 0
  1. local TweenService = game:GetService("TweenService")
  2. local UserInputService = game:GetService("UserInputService")
  3.  
  4. local library = {}
  5.  
  6. function library:CreateWindow(name)
  7. local gui = Instance.new("ScreenGui", game:GetService("CoreGui"))
  8. gui.Name = "MartinUI"
  9.  
  10. local main = Instance.new("Frame", gui)
  11. main.Size = UDim2.new(0, 450, 0, 350)
  12. main.Position = UDim2.new(0.5, -225, 0.5, -175)
  13. main.BackgroundColor3 = Color3.fromRGB(25, 25, 35)
  14. main.BorderSizePixel = 0
  15. main.AnchorPoint = Vector2.new(0.5, 0.5)
  16. main.Active = true
  17. main.Draggable = true
  18.  
  19. local corner = Instance.new("UICorner", main)
  20. corner.CornerRadius = UDim.new(0, 12)
  21.  
  22. local title = Instance.new("TextLabel", main)
  23. title.Size = UDim2.new(1, 0, 0, 40)
  24. title.BackgroundTransparency = 1
  25. title.Text = name or "Martin UI"
  26. title.Font = Enum.Font.GothamBold
  27. title.TextSize = 20
  28. title.TextColor3 = Color3.fromRGB(255, 255, 255)
  29.  
  30. local scrolling = Instance.new("ScrollingFrame", main)
  31. scrolling.Size = UDim2.new(1, -20, 1, -60)
  32. scrolling.Position = UDim2.new(0, 10, 0, 50)
  33. scrolling.BackgroundTransparency = 1
  34. scrolling.CanvasSize = UDim2.new(0, 0, 0, 0)
  35. scrolling.ScrollBarThickness = 6
  36. scrolling.AutomaticCanvasSize = Enum.AutomaticSize.Y
  37. scrolling.ClipsDescendants = true
  38.  
  39. local layout = Instance.new("UIListLayout", scrolling)
  40. layout.Padding = UDim.new(0, 10)
  41. layout.SortOrder = Enum.SortOrder.LayoutOrder
  42.  
  43. local padding = Instance.new("UIPadding", scrolling)
  44. padding.PaddingTop = UDim.new(0, 5)
  45. padding.PaddingBottom = UDim.new(0, 5)
  46. padding.PaddingLeft = UDim.new(0, 5)
  47. padding.PaddingRight = UDim.new(0, 5)
  48.  
  49. function library:CreateButton(text, callback)
  50. local btn = Instance.new("TextButton", scrolling)
  51. btn.Size = UDim2.new(1, -10, 0, 40)
  52. btn.BackgroundColor3 = Color3.fromRGB(40, 40, 60)
  53. btn.Text = text or "Button"
  54. btn.Font = Enum.Font.Gotham
  55. btn.TextSize = 16
  56. btn.TextColor3 = Color3.fromRGB(255, 255, 255)
  57.  
  58. Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 8)
  59.  
  60. btn.MouseEnter:Connect(function()
  61. TweenService:Create(btn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(60, 60, 90)}):Play()
  62. end)
  63.  
  64. btn.MouseLeave:Connect(function()
  65. TweenService:Create(btn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(40, 40, 60)}):Play()
  66. end)
  67.  
  68. btn.MouseButton1Click:Connect(function()
  69. TweenService:Create(btn, TweenInfo.new(0.05), {TextSize = 14}):Play()
  70. task.wait(0.05)
  71. TweenService:Create(btn, TweenInfo.new(0.1), {TextSize = 16}):Play()
  72. pcall(callback)
  73. end)
  74. end
  75.  
  76. return library
  77. end
  78.  
  79. return library
Advertisement
Add Comment
Please, Sign In to add comment