Advertisement
VuaxExploits

Untitled

Mar 17th, 2020
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.68 KB | None | 0 0
  1. local library = { windows = 0, flagamnt=1 }
  2. local ui = Instance.new("ScreenGui",game:GetService("CoreGui"))
  3.  
  4. function Create(obj, parent, args)
  5. local Item = Instance.new(obj, parent)
  6. for i, v in pairs(args) do
  7. Item[i] = v
  8. end
  9. return Item
  10. end
  11.  
  12. function library:CreateWindow(text, description, frametext)
  13. local tab = { itemcount = 1, openframe = false, flags = {} }
  14.  
  15. local Title = Create("TextButton", ui, { Size = UDim2.new(0, 190, 0, 32), Text = " " .. text, BackgroundColor3 = Color3.fromRGB(30, 30, 30), BorderSizePixel = 0, TextColor3 = Color3.fromRGB(255, 255, 255), TextSize = 18, Font = Enum.Font.SourceSans, TextXAlignment = "Left", ZIndex = 2, Position = UDim2.new(0, 10 + (library.windows * 200), 0, 10) })
  16. local Description = Create("TextLabel", ui, { Size = UDim2.new(0, 190, 0, 32), Text = description, BackgroundColor3 = Color3.fromRGB(30, 30, 30), BorderSizePixel = 0, TextColor3 = Color3.fromRGB(255, 255, 255), TextSize = 18, Font = Enum.Font.SourceSans, Position = UDim2.new(0, 10 + (library.windows * 200), 0, 10) })
  17. local Frame = Create("Frame", ui, { Size = UDim2.new(0, 0, 0, 0), BorderSizePixel = 0, BackgroundColor3 = Color3.fromRGB(30, 30, 30), Position = UDim2.new(0, 10 + (library.windows * 200), 0, 50), ClipsDescendants = true })
  18. local FrameTitle = Create("TextLabel", Frame, { Size = UDim2.new(0, 190, 0, 32), BorderSizePixel = 0, BackgroundColor3 = Color3.fromRGB(25, 25, 25), TextColor3 = Color3.fromRGB(255, 255, 255), Text = frametext, TextSize = 18, Font = Enum.Font.SourceSans })
  19.  
  20. local num = library.windows
  21.  
  22. Title.MouseEnter:Connect(function()
  23. if tab.openframe == false then
  24. Description:TweenPosition(UDim2.new(0, 10 + (num * 200), 0, 50), "Out", "Quint", 0.3)
  25. end
  26. end)
  27.  
  28. Title.MouseLeave:Connect(function()
  29. Description:TweenPosition(UDim2.new(0, 10 + (num * 200), 0, 10), "Out", "Quint", 0.3)
  30. end)
  31.  
  32. Title.MouseButton1Click:Connect(function()
  33. if tab.openframe == false then
  34. Description:TweenPosition(UDim2.new(0, 10 + (num * 200), 0, 10), "Out", "Quint", 0.3)
  35. Frame:TweenSize(UDim2.new(0, 190, 0, tab.itemcount * 32), "Out", "Quint", 0.3)
  36. tab.openframe = true
  37. else
  38. Frame:TweenSize(UDim2.new(0, 190, 0, 0), "Out", "Quint", 0.3)
  39. tab.openframe = false
  40. end
  41. end)
  42.  
  43. function tab:CreateButton(text, func)
  44. local Btn = Create("TextButton", Frame, { Size = UDim2.new(0, 190, 0, 32), Position = UDim2.new(0, 0, 0, 32 * tab.itemcount), BackgroundColor3 = Color3.fromRGB(20, 20, 20), BorderSizePixel = 0, TextColor3 = Color3.fromRGB(255, 255, 255), Font = Enum.Font.SourceSans, Text = text, TextSize = 18 })
  45. Btn.MouseButton1Click:Connect(func)
  46. tab.itemcount = tab.itemcount + 1
  47. return Btn
  48. end
  49.  
  50. function tab:CreateSection(text)
  51. local sct = Create("TextLabel", Frame, { Size = UDim2.new(0, 190, 0, 32), Position = UDim2.new(0, 0, 0, 32 * tab.itemcount), BackgroundColor3 = Color3.fromRGB(18, 18, 18), BorderSizePixel = 0, TextColor3 = Color3.fromRGB(255, 255, 255), Font = Enum.Font.SourceSans, Text = text, TextSize = 18 })
  52. tab.itemcount = tab.itemcount + 1
  53. return sct
  54. end
  55.  
  56. function tab:CreateLabel(text)
  57. local lbl = Create("TextLabel", Frame, { Size = UDim2.new(0, 190, 0, 32), Position = UDim2.new(0, 0, 0, 32 * tab.itemcount), BackgroundColor3 = Color3.fromRGB(30, 30, 30), BorderSizePixel = 0, TextColor3 = Color3.fromRGB(255, 255, 255), Font = Enum.Font.SourceSans, Text = " " .. text, TextSize = 18, TextXAlignment = "Left" })
  58. tab.itemcount = tab.itemcount + 1
  59. return lbl
  60. end
  61.  
  62. function tab:CreateToggle(text, func)
  63. local tgl = Create("TextButton", Frame, { Size = UDim2.new(0, 32, 0, 32), Position = UDim2.new(0, 160, 0, 32 * tab.itemcount), BackgroundColor3 = Color3.fromRGB(18, 18, 18), BorderSizePixel = 0, TextColor3 = Color3.fromRGB(255, 255, 255), Font = Enum.Font.SourceSans, Text = "", TextSize = 18, ZIndex = 2 })
  64. local label = Create("TextLabel", Frame, { Size = UDim2.new(0, 190, 0, 32), Position = UDim2.new(0, 5, 0, 32 * tab.itemcount), BackgroundColor3 = Color3.fromRGB(30, 30, 30), BorderSizePixel = 0, TextColor3 = Color3.fromRGB(255, 255, 255), Font = Enum.Font.SourceSans, Text = " " .. text, TextSize = 18, TextXAlignment = "Left"})
  65. local num = tab.itemcount
  66. tab.flags[num] = false
  67. tgl.MouseButton1Click:Connect(function()
  68. tab.flags[num] = not tab.flags[num]
  69. if tab.flags[num] == false then
  70. tgl.Text = ""
  71. else
  72. tgl.Text = "✓"
  73. end
  74. func(tab.flags[num])
  75. end)
  76. tab.itemcount = tab.itemcount + 1
  77. return tgl
  78. end
  79.  
  80. library.windows = library.windows + 1
  81. return tab
  82. end
  83.  
  84. return library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement