Messi33536086

Untitled

Nov 7th, 2025
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.17 KB | None | 0 0
  1. local PulseTECH = {}
  2. PulseTECH.__index = PulseTECH
  3.  
  4. -- Services
  5. local TweenService = game:GetService("TweenService")
  6. local UserInputService = game:GetService("UserInputService")
  7. local RunService = game:GetService("RunService")
  8.  
  9. -- Utility Functions
  10. local function CreateTween(object, properties, duration, style, direction)
  11. local tweenInfo = TweenInfo.new(duration or 0.3, style or Enum.EasingStyle.Quad, direction or Enum.EasingDirection.Out)
  12. local tween = TweenService:Create(object, tweenInfo, properties)
  13. return tween
  14. end
  15.  
  16. local function MakeDraggable(frame, dragHandle)
  17. local dragging = false
  18. local dragInput, mousePos, framePos
  19.  
  20. dragHandle = dragHandle or frame
  21.  
  22. dragHandle.InputBegan:Connect(function(input)
  23. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  24. dragging = true
  25. mousePos = input.Position
  26. framePos = frame.Position
  27.  
  28. input.Changed:Connect(function()
  29. if input.UserInputState == Enum.UserInputState.End then
  30. dragging = false
  31. end
  32. end)
  33. end
  34. end)
  35.  
  36. dragHandle.InputChanged:Connect(function(input)
  37. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  38. dragInput = input
  39. end
  40. end)
  41.  
  42. UserInputService.InputChanged:Connect(function(input)
  43. if input == dragInput and dragging then
  44. local delta = input.Position - mousePos
  45. local newPos = UDim2.new(
  46. framePos.X.Scale,
  47. framePos.X.Offset + delta.X,
  48. framePos.Y.Scale,
  49. framePos.Y.Offset + delta.Y
  50. )
  51. CreateTween(frame, {Position = newPos}, 0.1):Play()
  52. end
  53. end)
  54. end
  55.  
  56. -- Main Library Constructor
  57. function PulseTECH.new(title)
  58. local Library = {}
  59.  
  60. -- Create ScreenGui
  61. local ScreenGui = Instance.new("ScreenGui")
  62. ScreenGui.Name = "PulseTECH"
  63. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  64. ScreenGui.ResetOnSpawn = false
  65. ScreenGui.Parent = game:GetService("CoreGui")
  66.  
  67. -- Main Frame
  68. local MainFrame = Instance.new("Frame")
  69. MainFrame.Name = "MainFrame"
  70. MainFrame.Size = UDim2.new(0, 550, 0, 400)
  71. MainFrame.Position = UDim2.new(0.5, -275, 0.5, -200)
  72. MainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 28)
  73. MainFrame.BorderSizePixel = 0
  74. MainFrame.Parent = ScreenGui
  75.  
  76. local MainCorner = Instance.new("UICorner")
  77. MainCorner.CornerRadius = UDim.new(0, 12)
  78. MainCorner.Parent = MainFrame
  79.  
  80. local MainShadow = Instance.new("ImageLabel")
  81. MainShadow.Name = "Shadow"
  82. MainShadow.Size = UDim2.new(1, 30, 1, 30)
  83. MainShadow.Position = UDim2.new(0, -15, 0, -15)
  84. MainShadow.BackgroundTransparency = 1
  85. MainShadow.Image = "rbxasset://textures/ui/GuiImagePlaceholder.png"
  86. MainShadow.ImageColor3 = Color3.fromRGB(0, 0, 0)
  87. MainShadow.ImageTransparency = 0.7
  88. MainShadow.ZIndex = 0
  89. MainShadow.Parent = MainFrame
  90.  
  91. -- Header
  92. local Header = Instance.new("Frame")
  93. Header.Name = "Header"
  94. Header.Size = UDim2.new(1, 0, 0, 50)
  95. Header.BackgroundColor3 = Color3.fromRGB(20, 20, 23)
  96. Header.BorderSizePixel = 0
  97. Header.Parent = MainFrame
  98.  
  99. local HeaderCorner = Instance.new("UICorner")
  100. HeaderCorner.CornerRadius = UDim.new(0, 12)
  101. HeaderCorner.Parent = Header
  102.  
  103. local HeaderCover = Instance.new("Frame")
  104. HeaderCover.Size = UDim2.new(1, 0, 0, 12)
  105. HeaderCover.Position = UDim2.new(0, 0, 1, -12)
  106. HeaderCover.BackgroundColor3 = Color3.fromRGB(20, 20, 23)
  107. HeaderCover.BorderSizePixel = 0
  108. HeaderCover.Parent = Header
  109.  
  110. local Title = Instance.new("TextLabel")
  111. Title.Name = "Title"
  112. Title.Size = UDim2.new(1, -20, 1, 0)
  113. Title.Position = UDim2.new(0, 20, 0, 0)
  114. Title.BackgroundTransparency = 1
  115. Title.Text = title or "PulseTECH"
  116. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  117. Title.TextSize = 18
  118. Title.Font = Enum.Font.GothamBold
  119. Title.TextXAlignment = Enum.TextXAlignment.Left
  120. Title.Parent = Header
  121.  
  122. -- Close Button
  123. local CloseButton = Instance.new("TextButton")
  124. CloseButton.Name = "CloseButton"
  125. CloseButton.Size = UDim2.new(0, 30, 0, 30)
  126. CloseButton.Position = UDim2.new(1, -40, 0, 10)
  127. CloseButton.BackgroundColor3 = Color3.fromRGB(35, 35, 38)
  128. CloseButton.Text = "×"
  129. CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  130. CloseButton.TextSize = 24
  131. CloseButton.Font = Enum.Font.GothamBold
  132. CloseButton.BorderSizePixel = 0
  133. CloseButton.Parent = Header
  134.  
  135. local CloseCorner = Instance.new("UICorner")
  136. CloseCorner.CornerRadius = UDim.new(0, 6)
  137. CloseCorner.Parent = CloseButton
  138.  
  139. CloseButton.MouseEnter:Connect(function()
  140. CreateTween(CloseButton, {BackgroundColor3 = Color3.fromRGB(255, 60, 60)}, 0.2):Play()
  141. end)
  142.  
  143. CloseButton.MouseLeave:Connect(function()
  144. CreateTween(CloseButton, {BackgroundColor3 = Color3.fromRGB(35, 35, 38)}, 0.2):Play()
  145. end)
  146.  
  147. CloseButton.MouseButton1Click:Connect(function()
  148. CreateTween(MainFrame, {Size = UDim2.new(0, 0, 0, 0)}, 0.3, Enum.EasingStyle.Back, Enum.EasingDirection.In):Play()
  149. wait(0.3)
  150. ScreenGui:Destroy()
  151. end)
  152.  
  153. -- Content Container
  154. local Container = Instance.new("ScrollingFrame")
  155. Container.Name = "Container"
  156. Container.Size = UDim2.new(1, -20, 1, -70)
  157. Container.Position = UDim2.new(0, 10, 0, 60)
  158. Container.BackgroundTransparency = 1
  159. Container.BorderSizePixel = 0
  160. Container.ScrollBarThickness = 4
  161. Container.ScrollBarImageColor3 = Color3.fromRGB(80, 80, 85)
  162. Container.CanvasSize = UDim2.new(0, 0, 0, 0)
  163. Container.Parent = MainFrame
  164.  
  165. local ContainerLayout = Instance.new("UIListLayout")
  166. ContainerLayout.Padding = UDim.new(0, 10)
  167. ContainerLayout.SortOrder = Enum.SortOrder.LayoutOrder
  168. ContainerLayout.Parent = Container
  169.  
  170. ContainerLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
  171. Container.CanvasSize = UDim2.new(0, 0, 0, ContainerLayout.AbsoluteContentSize.Y + 10)
  172. end)
  173.  
  174. -- Make draggable
  175. MakeDraggable(MainFrame, Header)
  176.  
  177. -- Library Methods
  178. function Library:AddButton(text, callback)
  179. local Button = Instance.new("TextButton")
  180. Button.Name = "Button"
  181. Button.Size = UDim2.new(1, -10, 0, 40)
  182. Button.BackgroundColor3 = Color3.fromRGB(35, 35, 38)
  183. Button.Text = text
  184. Button.TextColor3 = Color3.fromRGB(255, 255, 255)
  185. Button.TextSize = 14
  186. Button.Font = Enum.Font.Gotham
  187. Button.BorderSizePixel = 0
  188. Button.Parent = Container
  189.  
  190. local ButtonCorner = Instance.new("UICorner")
  191. ButtonCorner.CornerRadius = UDim.new(0, 8)
  192. ButtonCorner.Parent = Button
  193.  
  194. Button.MouseEnter:Connect(function()
  195. CreateTween(Button, {BackgroundColor3 = Color3.fromRGB(45, 45, 48)}, 0.2):Play()
  196. end)
  197.  
  198. Button.MouseLeave:Connect(function()
  199. CreateTween(Button, {BackgroundColor3 = Color3.fromRGB(35, 35, 38)}, 0.2):Play()
  200. end)
  201.  
  202. Button.MouseButton1Click:Connect(function()
  203. CreateTween(Button, {BackgroundColor3 = Color3.fromRGB(60, 60, 65)}, 0.1):Play()
  204. wait(0.1)
  205. CreateTween(Button, {BackgroundColor3 = Color3.fromRGB(45, 45, 48)}, 0.1):Play()
  206. if callback then callback() end
  207. end)
  208.  
  209. return Button
  210. end
  211.  
  212. function Library:AddToggle(text, default, callback)
  213. local ToggleFrame = Instance.new("Frame")
  214. ToggleFrame.Name = "ToggleFrame"
  215. ToggleFrame.Size = UDim2.new(1, -10, 0, 40)
  216. ToggleFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 38)
  217. ToggleFrame.BorderSizePixel = 0
  218. ToggleFrame.Parent = Container
  219.  
  220. local ToggleCorner = Instance.new("UICorner")
  221. ToggleCorner.CornerRadius = UDim.new(0, 8)
  222. ToggleCorner.Parent = ToggleFrame
  223.  
  224. local ToggleLabel = Instance.new("TextLabel")
  225. ToggleLabel.Size = UDim2.new(1, -60, 1, 0)
  226. ToggleLabel.Position = UDim2.new(0, 15, 0, 0)
  227. ToggleLabel.BackgroundTransparency = 1
  228. ToggleLabel.Text = text
  229. ToggleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  230. ToggleLabel.TextSize = 14
  231. ToggleLabel.Font = Enum.Font.Gotham
  232. ToggleLabel.TextXAlignment = Enum.TextXAlignment.Left
  233. ToggleLabel.Parent = ToggleFrame
  234.  
  235. local ToggleButton = Instance.new("TextButton")
  236. ToggleButton.Size = UDim2.new(0, 45, 0, 24)
  237. ToggleButton.Position = UDim2.new(1, -55, 0.5, -12)
  238. ToggleButton.BackgroundColor3 = default and Color3.fromRGB(100, 150, 255) or Color3.fromRGB(60, 60, 65)
  239. ToggleButton.Text = ""
  240. ToggleButton.BorderSizePixel = 0
  241. ToggleButton.Parent = ToggleFrame
  242.  
  243. local ToggleButtonCorner = Instance.new("UICorner")
  244. ToggleButtonCorner.CornerRadius = UDim.new(1, 0)
  245. ToggleButtonCorner.Parent = ToggleButton
  246.  
  247. local ToggleCircle = Instance.new("Frame")
  248. ToggleCircle.Size = UDim2.new(0, 18, 0, 18)
  249. ToggleCircle.Position = default and UDim2.new(1, -21, 0.5, -9) or UDim2.new(0, 3, 0.5, -9)
  250. ToggleCircle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  251. ToggleCircle.BorderSizePixel = 0
  252. ToggleCircle.Parent = ToggleButton
  253.  
  254. local CircleCorner = Instance.new("UICorner")
  255. CircleCorner.CornerRadius = UDim.new(1, 0)
  256. CircleCorner.Parent = ToggleCircle
  257.  
  258. local toggled = default
  259.  
  260. ToggleButton.MouseButton1Click:Connect(function()
  261. toggled = not toggled
  262.  
  263. if toggled then
  264. CreateTween(ToggleButton, {BackgroundColor3 = Color3.fromRGB(100, 150, 255)}, 0.3):Play()
  265. CreateTween(ToggleCircle, {Position = UDim2.new(1, -21, 0.5, -9)}, 0.3):Play()
  266. else
  267. CreateTween(ToggleButton, {BackgroundColor3 = Color3.fromRGB(60, 60, 65)}, 0.3):Play()
  268. CreateTween(ToggleCircle, {Position = UDim2.new(0, 3, 0.5, -9)}, 0.3):Play()
  269. end
  270.  
  271. if callback then callback(toggled) end
  272. end)
  273.  
  274. return ToggleFrame
  275. end
  276.  
  277. function Library:AddSlider(text, min, max, default, callback)
  278. local SliderFrame = Instance.new("Frame")
  279. SliderFrame.Name = "SliderFrame"
  280. SliderFrame.Size = UDim2.new(1, -10, 0, 55)
  281. SliderFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 38)
  282. SliderFrame.BorderSizePixel = 0
  283. SliderFrame.Parent = Container
  284.  
  285. local SliderCorner = Instance.new("UICorner")
  286. SliderCorner.CornerRadius = UDim.new(0, 8)
  287. SliderCorner.Parent = SliderFrame
  288.  
  289. local SliderLabel = Instance.new("TextLabel")
  290. SliderLabel.Size = UDim2.new(1, -30, 0, 20)
  291. SliderLabel.Position = UDim2.new(0, 15, 0, 5)
  292. SliderLabel.BackgroundTransparency = 1
  293. SliderLabel.Text = text
  294. SliderLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  295. SliderLabel.TextSize = 14
  296. SliderLabel.Font = Enum.Font.Gotham
  297. SliderLabel.TextXAlignment = Enum.TextXAlignment.Left
  298. SliderLabel.Parent = SliderFrame
  299.  
  300. local SliderValue = Instance.new("TextLabel")
  301. SliderValue.Size = UDim2.new(0, 40, 0, 20)
  302. SliderValue.Position = UDim2.new(1, -50, 0, 5)
  303. SliderValue.BackgroundTransparency = 1
  304. SliderValue.Text = tostring(default)
  305. SliderValue.TextColor3 = Color3.fromRGB(100, 150, 255)
  306. SliderValue.TextSize = 14
  307. SliderValue.Font = Enum.Font.GothamBold
  308. SliderValue.TextXAlignment = Enum.TextXAlignment.Right
  309. SliderValue.Parent = SliderFrame
  310.  
  311. local SliderBackground = Instance.new("Frame")
  312. SliderBackground.Size = UDim2.new(1, -30, 0, 6)
  313. SliderBackground.Position = UDim2.new(0, 15, 1, -15)
  314. SliderBackground.BackgroundColor3 = Color3.fromRGB(60, 60, 65)
  315. SliderBackground.BorderSizePixel = 0
  316. SliderBackground.Parent = SliderFrame
  317.  
  318. local SliderBGCorner = Instance.new("UICorner")
  319. SliderBGCorner.CornerRadius = UDim.new(1, 0)
  320. SliderBGCorner.Parent = SliderBackground
  321.  
  322. local SliderFill = Instance.new("Frame")
  323. SliderFill.Size = UDim2.new((default - min) / (max - min), 0, 1, 0)
  324. SliderFill.BackgroundColor3 = Color3.fromRGB(100, 150, 255)
  325. SliderFill.BorderSizePixel = 0
  326. SliderFill.Parent = SliderBackground
  327.  
  328. local SliderFillCorner = Instance.new("UICorner")
  329. SliderFillCorner.CornerRadius = UDim.new(1, 0)
  330. SliderFillCorner.Parent = SliderFill
  331.  
  332. local dragging = false
  333.  
  334. local function UpdateSlider(input)
  335. local pos = math.clamp((input.Position.X - SliderBackground.AbsolutePosition.X) / SliderBackground.AbsoluteSize.X, 0, 1)
  336. local value = math.floor(min + (max - min) * pos)
  337.  
  338. SliderFill.Size = UDim2.new(pos, 0, 1, 0)
  339. SliderValue.Text = tostring(value)
  340.  
  341. if callback then callback(value) end
  342. end
  343.  
  344. SliderBackground.InputBegan:Connect(function(input)
  345. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  346. dragging = true
  347. UpdateSlider(input)
  348. end
  349. end)
  350.  
  351. SliderBackground.InputEnded:Connect(function(input)
  352. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  353. dragging = false
  354. end
  355. end)
  356.  
  357. UserInputService.InputChanged:Connect(function(input)
  358. if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
  359. UpdateSlider(input)
  360. end
  361. end)
  362.  
  363. return SliderFrame
  364. end
  365.  
  366. function Library:AddTextBox(text, placeholder, callback)
  367. local TextBoxFrame = Instance.new("Frame")
  368. TextBoxFrame.Name = "TextBoxFrame"
  369. TextBoxFrame.Size = UDim2.new(1, -10, 0, 70)
  370. TextBoxFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 38)
  371. TextBoxFrame.BorderSizePixel = 0
  372. TextBoxFrame.Parent = Container
  373.  
  374. local TextBoxCorner = Instance.new("UICorner")
  375. TextBoxCorner.CornerRadius = UDim.new(0, 8)
  376. TextBoxCorner.Parent = TextBoxFrame
  377.  
  378. local TextBoxLabel = Instance.new("TextLabel")
  379. TextBoxLabel.Size = UDim2.new(1, -30, 0, 20)
  380. TextBoxLabel.Position = UDim2.new(0, 15, 0, 8)
  381. TextBoxLabel.BackgroundTransparency = 1
  382. TextBoxLabel.Text = text
  383. TextBoxLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  384. TextBoxLabel.TextSize = 14
  385. TextBoxLabel.Font = Enum.Font.Gotham
  386. TextBoxLabel.TextXAlignment = Enum.TextXAlignment.Left
  387. TextBoxLabel.Parent = TextBoxFrame
  388.  
  389. local TextBox = Instance.new("TextBox")
  390. TextBox.Size = UDim2.new(1, -30, 0, 32)
  391. TextBox.Position = UDim2.new(0, 15, 0, 32)
  392. TextBox.BackgroundColor3 = Color3.fromRGB(45, 45, 48)
  393. TextBox.PlaceholderText = placeholder or ""
  394. TextBox.PlaceholderColor3 = Color3.fromRGB(120, 120, 125)
  395. TextBox.Text = ""
  396. TextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  397. TextBox.TextSize = 13
  398. TextBox.Font = Enum.Font.Gotham
  399. TextBox.BorderSizePixel = 0
  400. TextBox.ClearTextOnFocus = false
  401. TextBox.Parent = TextBoxFrame
  402.  
  403. local TextBoxInputCorner = Instance.new("UICorner")
  404. TextBoxInputCorner.CornerRadius = UDim.new(0, 6)
  405. TextBoxInputCorner.Parent = TextBox
  406.  
  407. local TextBoxPadding = Instance.new("UIPadding")
  408. TextBoxPadding.PaddingLeft = UDim.new(0, 10)
  409. TextBoxPadding.PaddingRight = UDim.new(0, 10)
  410. TextBoxPadding.Parent = TextBox
  411.  
  412. TextBox.Focused:Connect(function()
  413. CreateTween(TextBox, {BackgroundColor3 = Color3.fromRGB(55, 55, 58)}, 0.2):Play()
  414. end)
  415.  
  416. TextBox.FocusLost:Connect(function(enter)
  417. CreateTween(TextBox, {BackgroundColor3 = Color3.fromRGB(45, 45, 48)}, 0.2):Play()
  418. if enter and callback then
  419. callback(TextBox.Text)
  420. end
  421. end)
  422.  
  423. return TextBox
  424. end
  425.  
  426. function Library:AddDropdown(text, options, callback)
  427. local DropdownFrame = Instance.new("Frame")
  428. DropdownFrame.Name = "DropdownFrame"
  429. DropdownFrame.Size = UDim2.new(1, -10, 0, 40)
  430. DropdownFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 38)
  431. DropdownFrame.BorderSizePixel = 0
  432. DropdownFrame.ClipsDescendants = true
  433. DropdownFrame.Parent = Container
  434.  
  435. local DropdownCorner = Instance.new("UICorner")
  436. DropdownCorner.CornerRadius = UDim.new(0, 8)
  437. DropdownCorner.Parent = DropdownFrame
  438.  
  439. local DropdownButton = Instance.new("TextButton")
  440. DropdownButton.Size = UDim2.new(1, 0, 0, 40)
  441. DropdownButton.BackgroundTransparency = 1
  442. DropdownButton.Text = ""
  443. DropdownButton.Parent = DropdownFrame
  444.  
  445. local DropdownLabel = Instance.new("TextLabel")
  446. DropdownLabel.Size = UDim2.new(1, -60, 0, 40)
  447. DropdownLabel.Position = UDim2.new(0, 15, 0, 0)
  448. DropdownLabel.BackgroundTransparency = 1
  449. DropdownLabel.Text = text
  450. DropdownLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  451. DropdownLabel.TextSize = 14
  452. DropdownLabel.Font = Enum.Font.Gotham
  453. DropdownLabel.TextXAlignment = Enum.TextXAlignment.Left
  454. DropdownLabel.Parent = DropdownFrame
  455.  
  456. local DropdownIcon = Instance.new("TextLabel")
  457. DropdownIcon.Size = UDim2.new(0, 20, 0, 40)
  458. DropdownIcon.Position = UDim2.new(1, -35, 0, 0)
  459. DropdownIcon.BackgroundTransparency = 1
  460. DropdownIcon.Text = "▼"
  461. DropdownIcon.TextColor3 = Color3.fromRGB(150, 150, 155)
  462. DropdownIcon.TextSize = 12
  463. DropdownIcon.Font = Enum.Font.Gotham
  464. DropdownIcon.Parent = DropdownFrame
  465.  
  466. local OptionsContainer = Instance.new("Frame")
  467. OptionsContainer.Size = UDim2.new(1, -20, 0, 0)
  468. OptionsContainer.Position = UDim2.new(0, 10, 0, 45)
  469. OptionsContainer.BackgroundTransparency = 1
  470. OptionsContainer.Parent = DropdownFrame
  471.  
  472. local OptionsLayout = Instance.new("UIListLayout")
  473. OptionsLayout.Padding = UDim.new(0, 2)
  474. OptionsLayout.Parent = OptionsContainer
  475.  
  476. local isOpen = false
  477.  
  478. for _, option in ipairs(options) do
  479. local OptionButton = Instance.new("TextButton")
  480. OptionButton.Size = UDim2.new(1, 0, 0, 32)
  481. OptionButton.BackgroundColor3 = Color3.fromRGB(45, 45, 48)
  482. OptionButton.Text = option
  483. OptionButton.TextColor3 = Color3.fromRGB(200, 200, 205)
  484. OptionButton.TextSize = 13
  485. OptionButton.Font = Enum.Font.Gotham
  486. OptionButton.BorderSizePixel = 0
  487. OptionButton.Parent = OptionsContainer
  488.  
  489. local OptionCorner = Instance.new("UICorner")
  490. OptionCorner.CornerRadius = UDim.new(0, 6)
  491. OptionCorner.Parent = OptionButton
  492.  
  493. OptionButton.MouseEnter:Connect(function()
  494. CreateTween(OptionButton, {BackgroundColor3 = Color3.fromRGB(60, 60, 65)}, 0.2):Play()
  495. end)
  496.  
  497. OptionButton.MouseLeave:Connect(function()
  498. CreateTween(OptionButton, {BackgroundColor3 = Color3.fromRGB(45, 45, 48)}, 0.2):Play()
  499. end)
  500.  
  501. OptionButton.MouseButton1Click:Connect(function()
  502. if callback then callback(option) end
  503. DropdownLabel.Text = text .. ": " .. option
  504.  
  505. isOpen = false
  506. CreateTween(DropdownFrame, {Size = UDim2.new(1, -10, 0, 40)}, 0.3):Play()
  507. CreateTween(DropdownIcon, {Rotation = 0}, 0.3):Play()
  508. end)
  509. end
  510.  
  511. DropdownButton.MouseButton1Click:Connect(function()
  512. isOpen = not isOpen
  513.  
  514. if isOpen then
  515. local contentHeight = #options * 34 + 45
  516. CreateTween(DropdownFrame, {Size = UDim2.new(1, -10, 0, contentHeight)}, 0.3):Play()
  517. CreateTween(DropdownIcon, {Rotation = 180}, 0.3):Play()
  518. else
  519. CreateTween(DropdownFrame, {Size = UDim2.new(1, -10, 0, 40)}, 0.3):Play()
  520. CreateTween(DropdownIcon, {Rotation = 0}, 0.3):Play()
  521. end
  522. end)
  523.  
  524. return DropdownFrame
  525. end
  526.  
  527. function Library:Notify(title, message, duration)
  528. duration = duration or 3
  529.  
  530. local NotificationFrame = Instance.new("Frame")
  531. NotificationFrame.Size = UDim2.new(0, 300, 0, 0)
  532. NotificationFrame.Position = UDim2.new(1, -320, 1, 20)
  533. NotificationFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 33)
  534. NotificationFrame.BorderSizePixel = 0
  535. NotificationFrame.Parent = ScreenGui
  536.  
  537. local NotifCorner = Instance.new("UICorner")
  538. NotifCorner.CornerRadius = UDim.new(0, 10)
  539. NotifCorner.Parent = NotificationFrame
  540.  
  541. local NotifTitle = Instance.new("TextLabel")
  542. NotifTitle.Size = UDim2.new(1, -20, 0, 25)
  543. NotifTitle.Position = UDim2.new(0, 10, 0, 8)
  544. NotifTitle.BackgroundTransparency = 1
  545. NotifTitle.Text = title
  546. NotifTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
  547. NotifTitle.TextSize = 15
  548. NotifTitle.Font = Enum.Font.GothamBold
  549. NotifTitle.TextXAlignment = Enum.TextXAlignment.Left
  550. NotifTitle.Parent = NotificationFrame
  551.  
  552. local NotifMessage = Instance.new("TextLabel")
  553. NotifMessage.Size = UDim2.new(1, -20, 0, 50)
  554. NotifMessage.Position = UDim2.new(0, 10, 0, 30)
  555. NotifMessage.BackgroundTransparency = 1
  556. NotifMessage.Text = message
  557. NotifMessage.TextColor3 = Color3.fromRGB(200, 200, 205)
  558. NotifMessage.TextSize = 13
  559. NotifMessage.Font = Enum.Font.Gotham
  560. NotifMessage.TextXAlignment = Enum.TextXAlignment.Left
  561. NotifMessage.TextYAlignment = Enum.TextYAlignment.Top
  562. NotifMessage.TextWrapped = true
  563. NotifMessage.Parent = NotificationFrame
  564.  
  565. local targetHeight = 85
  566. CreateTween(NotificationFrame, {Size = UDim2.new(0, 300, 0, targetHeight), Position = UDim2.new(1, -320, 1, -targetHeight - 20)}, 0.4, Enum.EasingStyle.Back):Play()
  567.  
  568. wait(duration)
  569.  
  570. CreateTween(NotificationFrame, {Position = UDim2.new(1, 20, 1, -targetHeight - 20)}, 0.3):Play()
  571. wait(0.3)
  572. NotificationFrame:Destroy()
  573. end
  574.  
  575. return Library
  576. end
  577.  
  578. return PulseTECH
Advertisement
Add Comment
Please, Sign In to add comment