Messi33536086

Untitled

Nov 12th, 2025 (edited)
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.92 KB | None | 0 0
  1.  
  2.  
  3. local HirimiUI = {}
  4. HirimiUI.__index = HirimiUI
  5.  
  6. local TweenService = game:GetService("TweenService")
  7. local UserInputService = game:GetService("UserInputService")
  8. local RunService = game:GetService("RunService")
  9.  
  10. local tweenInfo = TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
  11.  
  12. -- Helper function for Tween
  13. local function tween(obj, props)
  14. TweenService:Create(obj, tweenInfo, props):Play()
  15. end
  16.  
  17. function HirimiUI:CreateWindow(title)
  18. local self = setmetatable({}, HirimiUI)
  19.  
  20. -- ScreenGui
  21. self.ScreenGui = Instance.new("ScreenGui")
  22. self.ScreenGui.Name = "HirimiUI"
  23. self.ScreenGui.Parent = game.CoreGui
  24. self.ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  25.  
  26. -- DropShadowHolder
  27. self.DropShadowHolder = Instance.new("Frame")
  28. self.DropShadowHolder.Name = "DropShadowHolder"
  29. self.DropShadowHolder.Size = UDim2.new(0, 455, 0, 350)
  30. self.DropShadowHolder.Position = UDim2.new(0.5, 0, 0.5, 0)
  31. self.DropShadowHolder.AnchorPoint = Vector2.new(0.5, 0.5)
  32. self.DropShadowHolder.BackgroundTransparency = 1
  33. self.DropShadowHolder.ZIndex = 1
  34. self.DropShadowHolder.Parent = self.ScreenGui
  35.  
  36. -- DropShadow
  37. local DropShadow = Instance.new("ImageLabel")
  38. DropShadow.Name = "DropShadow"
  39. DropShadow.Image = "rbxassetid://6015897843"
  40. DropShadow.ImageColor3 = Color3.fromRGB(0, 0, 0)
  41. DropShadow.ImageTransparency = 0.6
  42. DropShadow.ScaleType = Enum.ScaleType.Slice
  43. DropShadow.SliceCenter = Rect.new(49, 49, 450, 450)
  44. DropShadow.AnchorPoint = Vector2.new(0.5, 0.5)
  45. DropShadow.Position = UDim2.new(0.5, 0, 0.5, 0)
  46. DropShadow.Size = UDim2.new(1, 50, 1, 50)
  47. DropShadow.BackgroundTransparency = 1
  48. DropShadow.ZIndex = 1
  49. DropShadow.Parent = self.DropShadowHolder
  50.  
  51. -- MainFrame
  52. self.MainFrame = Instance.new("Frame")
  53. self.MainFrame.Name = "MainWindow"
  54. self.MainFrame.Size = UDim2.new(0, 455, 0, 350)
  55. self.MainFrame.Position = UDim2.new(0.5, 0, 0.5, 0)
  56. self.MainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  57. self.MainFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  58. self.MainFrame.BorderSizePixel = 0
  59. self.MainFrame.ClipsDescendants = true
  60. self.MainFrame.ZIndex = 2
  61. self.MainFrame.Parent = self.ScreenGui
  62.  
  63. local UICorner = Instance.new("UICorner")
  64. UICorner.CornerRadius = UDim.new(0, 12)
  65. UICorner.Parent = self.MainFrame
  66.  
  67. local UIGradient = Instance.new("UIGradient")
  68. UIGradient.Color = ColorSequence.new{
  69. ColorSequenceKeypoint.new(0, Color3.fromRGB(30, 30, 30)),
  70. ColorSequenceKeypoint.new(1, Color3.fromRGB(15, 15, 15))
  71. }
  72. UIGradient.Rotation = 90
  73. UIGradient.Parent = self.MainFrame
  74.  
  75. -- TitleBar
  76. self.TitleBar = Instance.new("Frame")
  77. self.TitleBar.Size = UDim2.new(1, 0, 0, 40)
  78. self.TitleBar.BackgroundColor3 = Color3.fromRGB(15, 15, 15)
  79. self.TitleBar.BorderSizePixel = 0
  80. self.TitleBar.ZIndex = 3
  81. self.TitleBar.Parent = self.MainFrame
  82.  
  83. local Title = Instance.new("TextLabel")
  84. Title.Text = title or "Hirimi UI"
  85. Title.Font = Enum.Font.GothamBold
  86. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  87. Title.TextSize = 16
  88. Title.BackgroundTransparency = 1
  89. Title.Size = UDim2.new(1, -80, 1, 0)
  90. Title.Position = UDim2.new(0, 15, 0, 0)
  91. Title.TextXAlignment = Enum.TextXAlignment.Left
  92. Title.ZIndex = 4
  93. Title.Parent = self.TitleBar
  94.  
  95. -- Minimize Button
  96. self.MinimizeButton = Instance.new("TextButton")
  97. self.MinimizeButton.Text = "-"
  98. self.MinimizeButton.Font = Enum.Font.GothamBold
  99. self.MinimizeButton.TextColor3 = Color3.fromRGB(255, 255, 0)
  100. self.MinimizeButton.TextSize = 20
  101. self.MinimizeButton.BackgroundTransparency = 1
  102. self.MinimizeButton.Size = UDim2.new(0, 40, 1, 0)
  103. self.MinimizeButton.Position = UDim2.new(1, -80, 0, 0)
  104. self.MinimizeButton.ZIndex = 4
  105. self.MinimizeButton.Parent = self.TitleBar
  106.  
  107. self.Minimized = false
  108. self.MinimizeButton.MouseButton1Click:Connect(function()
  109. self:ToggleMinimize()
  110. end)
  111.  
  112. -- Close Button
  113. local CloseButton = Instance.new("TextButton")
  114. CloseButton.Text = "×"
  115. CloseButton.Font = Enum.Font.GothamBold
  116. CloseButton.TextColor3 = Color3.fromRGB(255, 100, 100)
  117. CloseButton.TextSize = 20
  118. CloseButton.BackgroundTransparency = 1
  119. CloseButton.Size = UDim2.new(0, 40, 1, 0)
  120. CloseButton.Position = UDim2.new(1, -40, 0, 0)
  121. CloseButton.ZIndex = 4
  122. CloseButton.Parent = self.TitleBar
  123.  
  124. CloseButton.MouseButton1Click:Connect(function()
  125. self.ScreenGui:Destroy()
  126. end)
  127.  
  128. CloseButton.MouseEnter:Connect(function()
  129. CloseButton.TextColor3 = Color3.fromRGB(255, 50, 50)
  130. end)
  131. CloseButton.MouseLeave:Connect(function()
  132. CloseButton.TextColor3 = Color3.fromRGB(255, 100, 100)
  133. end)
  134.  
  135. -- Tab Container
  136. self.TabContainer = Instance.new("Frame")
  137. self.TabContainer.Size = UDim2.new(1, 0, 0, 40)
  138. self.TabContainer.Position = UDim2.new(0, 0, 0, 40)
  139. self.TabContainer.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  140. self.TabContainer.BorderSizePixel = 0
  141. self.TabContainer.ZIndex = 3
  142. self.TabContainer.Parent = self.MainFrame
  143.  
  144. self.TabLayout = Instance.new("UIListLayout")
  145. self.TabLayout.FillDirection = Enum.FillDirection.Horizontal
  146. self.TabLayout.SortOrder = Enum.SortOrder.LayoutOrder
  147. self.TabLayout.Padding = UDim.new(0, 5)
  148. self.TabLayout.Parent = self.TabContainer
  149.  
  150. -- Content Frame
  151. self.ContentFrame = Instance.new("Frame")
  152. self.ContentFrame.Size = UDim2.new(1, 0, 1, -80)
  153. self.ContentFrame.Position = UDim2.new(0, 0, 0, 80)
  154. self.ContentFrame.BackgroundTransparency = 1
  155. self.ContentFrame.ZIndex = 3
  156. self.ContentFrame.Parent = self.MainFrame
  157.  
  158. self.Tabs = {}
  159. self.CurrentTab = nil
  160.  
  161. -- Draggable
  162. self.Dragging = false
  163. self.DragStart = nil
  164. self.StartPos = nil
  165.  
  166. self.TitleBar.InputBegan:Connect(function(input)
  167. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  168. self.Dragging = true
  169. self.DragStart = input.Position
  170. self.StartPos = self.MainFrame.Position
  171. tween(self.MainFrame, {Size = UDim2.new(0, 460, 0, 355)})
  172. end
  173. end)
  174.  
  175. self.TitleBar.InputEnded:Connect(function(input)
  176. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  177. self.Dragging = false
  178. tween(self.MainFrame, {Size = UDim2.new(0, 455, 0, 350)})
  179. end
  180. end)
  181.  
  182. UserInputService.InputChanged:Connect(function(input)
  183. if self.Dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
  184. local delta = input.Position - self.DragStart
  185. local newPos = UDim2.new(self.StartPos.X.Scale, self.StartPos.X.Offset + delta.X, self.StartPos.Y.Scale, self.StartPos.Y.Offset + delta.Y)
  186. self.MainFrame.Position = newPos
  187. self.DropShadowHolder.Position = newPos
  188. end
  189. end)
  190.  
  191. -- Notification Holder
  192. self.NotificationHolder = Instance.new("Frame")
  193. self.NotificationHolder.Size = UDim2.new(0, 300, 1, 0)
  194. self.NotificationHolder.Position = UDim2.new(1, -310, 0, 0)
  195. self.NotificationHolder.BackgroundTransparency = 1
  196. self.NotificationHolder.ZIndex = 10
  197. self.NotificationHolder.Parent = self.ScreenGui
  198.  
  199. local UIListLayout = Instance.new("UIListLayout")
  200. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  201. UIListLayout.VerticalAlignment = Enum.VerticalAlignment.Bottom
  202. UIListLayout.Padding = UDim.new(0, 10)
  203. UIListLayout.Parent = self.NotificationHolder
  204.  
  205. return self
  206. end
  207.  
  208. function HirimiUI:ToggleMinimize()
  209. self.Minimized = not self.Minimized
  210. if self.Minimized then
  211. tween(self.MainFrame, {Size = UDim2.new(0, 455, 0, 40)})
  212. self.TabContainer.Visible = false
  213. self.ContentFrame.Visible = false
  214. self.MinimizeButton.Text = "+"
  215. else
  216. tween(self.MainFrame, {Size = UDim2.new(0, 455, 0, 350)})
  217. self.TabContainer.Visible = true
  218. self.ContentFrame.Visible = true
  219. self.MinimizeButton.Text = "-"
  220. end
  221. tween(self.DropShadowHolder, {Size = self.MainFrame.Size})
  222. end
  223.  
  224. function HirimiUI:CreateTab(name)
  225. local TabButton = Instance.new("TextButton")
  226. TabButton.Text = name
  227. TabButton.Font = Enum.Font.Gotham
  228. TabButton.TextColor3 = Color3.fromRGB(200, 200, 200)
  229. TabButton.TextSize = 14
  230. TabButton.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
  231. TabButton.Size = UDim2.new(0, 100, 1, 0)
  232. TabButton.AutoButtonColor = false
  233. TabButton.ZIndex = 4
  234. TabButton.Parent = self.TabContainer
  235.  
  236. local UICorner = Instance.new("UICorner")
  237. UICorner.CornerRadius = UDim.new(0, 6)
  238. UICorner.Parent = TabButton
  239.  
  240. local TabContent = Instance.new("ScrollingFrame")
  241. TabContent.Size = UDim2.new(1, 0, 1, 0)
  242. TabContent.BackgroundTransparency = 1
  243. TabContent.BorderSizePixel = 0
  244. TabContent.ScrollBarThickness = 4
  245. TabContent.Visible = false
  246. TabContent.ZIndex = 4
  247. TabContent.Parent = self.ContentFrame
  248.  
  249. local UIListLayout = Instance.new("UIListLayout")
  250. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  251. UIListLayout.Padding = UDim.new(0, 5)
  252. UIListLayout.Parent = TabContent
  253.  
  254. local UIPadding = Instance.new("UIPadding")
  255. UIPadding.PaddingTop = UDim.new(0, 10)
  256. UIPadding.PaddingLeft = UDim.new(0, 10)
  257. UIPadding.PaddingRight = UDim.new(0, 10)
  258. UIPadding.Parent = TabContent
  259.  
  260. TabButton.MouseButton1Click:Connect(function()
  261. for _, tab in pairs(self.Tabs) do
  262. tab.Content.Visible = false
  263. tween(tab.Button, {BackgroundColor3 = Color3.fromRGB(35, 35, 35), TextColor3 = Color3.fromRGB(200, 200, 200)})
  264. end
  265. TabContent.Visible = true
  266. tween(TabButton, {BackgroundColor3 = Color3.fromRGB(50, 50, 50), TextColor3 = Color3.fromRGB(255, 255, 255)})
  267. self.CurrentTab = TabContent
  268. end)
  269.  
  270. table.insert(self.Tabs, {Button = TabButton, Content = TabContent})
  271.  
  272. if #self.Tabs == 1 then
  273. TabButton:SimulateClick() -- Open first tab by default
  274. end
  275.  
  276. local Tab = {}
  277. Tab.__index = Tab
  278.  
  279. function Tab:CreateButton(text, callback)
  280. local Button = Instance.new("TextButton")
  281. Button.Text = text
  282. Button.Font = Enum.Font.Gotham
  283. Button.TextColor3 = Color3.fromRGB(255, 255, 255)
  284. Button.TextSize = 14
  285. Button.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  286. Button.Size = UDim2.new(1, 0, 0, 30)
  287. Button.ZIndex = 5
  288. Button.Parent = TabContent
  289.  
  290. local UICorner = Instance.new("UICorner")
  291. UICorner.CornerRadius = UDim.new(0, 6)
  292. UICorner.Parent = Button
  293.  
  294. Button.MouseEnter:Connect(function()
  295. tween(Button, {BackgroundColor3 = Color3.fromRGB(60, 60, 60)})
  296. end)
  297. Button.MouseLeave:Connect(function()
  298. tween(Button, {BackgroundColor3 = Color3.fromRGB(40, 40, 40)})
  299. end)
  300. Button.MouseButton1Click:Connect(function()
  301. tween(Button, {Size = UDim2.new(1, 0, 0, 28)})
  302. wait(0.1)
  303. tween(Button, {Size = UDim2.new(1, 0, 0, 30)})
  304. callback()
  305. end)
  306. end
  307.  
  308. function Tab:CreateToggle(text, default, callback)
  309. local ToggleFrame = Instance.new("Frame")
  310. ToggleFrame.Size = UDim2.new(1, 0, 0, 30)
  311. ToggleFrame.BackgroundTransparency = 1
  312. ToggleFrame.ZIndex = 5
  313. ToggleFrame.Parent = TabContent
  314.  
  315. local Label = Instance.new("TextLabel")
  316. Label.Text = text
  317. Label.Font = Enum.Font.Gotham
  318. Label.TextColor3 = Color3.fromRGB(255, 255, 255)
  319. Label.TextSize = 14
  320. Label.BackgroundTransparency = 1
  321. Label.Size = UDim2.new(1, -50, 1, 0)
  322. Label.TextXAlignment = Enum.TextXAlignment.Left
  323. Label.Parent = ToggleFrame
  324.  
  325. local ToggleButton = Instance.new("Frame")
  326. ToggleButton.Size = UDim2.new(0, 40, 0, 20)
  327. ToggleButton.Position = UDim2.new(1, -40, 0.5, -10)
  328. ToggleButton.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  329. ToggleButton.Parent = ToggleFrame
  330.  
  331. local UICorner = Instance.new("UICorner")
  332. UICorner.CornerRadius = UDim.new(0, 10)
  333. UICorner.Parent = ToggleButton
  334.  
  335. local Knob = Instance.new("Frame")
  336. Knob.Size = UDim2.new(0, 20, 1, 0)
  337. Knob.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
  338. Knob.Parent = ToggleButton
  339.  
  340. local UICornerKnob = Instance.new("UICorner")
  341. UICornerKnob.CornerRadius = UDim.new(0, 10)
  342. UICornerKnob.Parent = Knob
  343.  
  344. local enabled = default
  345. if enabled then
  346. Knob.Position = UDim2.new(0.5, 0, 0, 0)
  347. ToggleButton.BackgroundColor3 = Color3.fromRGB(100, 150, 255)
  348. end
  349.  
  350. ToggleFrame.InputBegan:Connect(function(input)
  351. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  352. enabled = not enabled
  353. callback(enabled)
  354. if enabled then
  355. tween(Knob, {Position = UDim2.new(0.5, 0, 0, 0)})
  356. tween(ToggleButton, {BackgroundColor3 = Color3.fromRGB(100, 150, 255)})
  357. else
  358. tween(Knob, {Position = UDim2.new(0, 0, 0, 0)})
  359. tween(ToggleButton, {BackgroundColor3 = Color3.fromRGB(40, 40, 40)})
  360. end
  361. end
  362. end)
  363. end
  364.  
  365. function Tab:CreateDropdown(text, options, callback)
  366. local DropdownFrame = Instance.new("Frame")
  367. DropdownFrame.Size = UDim2.new(1, 0, 0, 30)
  368. DropdownFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  369. DropdownFrame.ZIndex = 5
  370. DropdownFrame.Parent = TabContent
  371.  
  372. local UICorner = Instance.new("UICorner")
  373. UICorner.CornerRadius = UDim.new(0, 6)
  374. UICorner.Parent = DropdownFrame
  375.  
  376. local Label = Instance.new("TextLabel")
  377. Label.Text = text
  378. Label.Font = Enum.Font.Gotham
  379. Label.TextColor3 = Color3.fromRGB(200, 200, 200)
  380. Label.TextSize = 14
  381. Label.BackgroundTransparency = 1
  382. Label.Size = UDim2.new(1, -30, 1, 0)
  383. Label.Position = UDim2.new(0, 10, 0, 0)
  384. Label.TextXAlignment = Enum.TextXAlignment.Left
  385. Label.Parent = DropdownFrame
  386.  
  387. local Arrow = Instance.new("TextLabel")
  388. Arrow.Text = "▼"
  389. Arrow.Font = Enum.Font.Gotham
  390. Arrow.TextColor3 = Color3.fromRGB(200, 200, 200)
  391. Arrow.TextSize = 14
  392. Arrow.BackgroundTransparency = 1
  393. Arrow.Size = UDim2.new(0, 30, 1, 0)
  394. Arrow.Position = UDim2.new(1, -30, 0, 0)
  395. Arrow.Parent = DropdownFrame
  396.  
  397. local OptionList = Instance.new("Frame")
  398. OptionList.Size = UDim2.new(1, 0, 0, 0)
  399. OptionList.Position = UDim2.new(0, 0, 1, 0)
  400. OptionList.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  401. OptionList.Visible = false
  402. OptionList.ClipsDescendants = true
  403. OptionList.ZIndex = 6
  404. OptionList.Parent = DropdownFrame
  405.  
  406. local UIListLayout = Instance.new("UIListLayout")
  407. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  408. UIListLayout.Parent = OptionList
  409.  
  410. local UICornerList = Instance.new("UICorner")
  411. UICornerList.CornerRadius = UDim.new(0, 6)
  412. UICornerList.Parent = OptionList
  413.  
  414. for _, opt in pairs(options) do
  415. local OptButton = Instance.new("TextButton")
  416. OptButton.Text = opt
  417. OptButton.Font = Enum.Font.Gotham
  418. OptButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  419. OptButton.TextSize = 14
  420. OptButton.BackgroundTransparency = 1
  421. OptButton.Size = UDim2.new(1, 0, 0, 30)
  422. OptButton.ZIndex = 7
  423. OptButton.Parent = OptionList
  424.  
  425. OptButton.MouseButton1Click:Connect(function()
  426. Label.Text = text .. ": " .. opt
  427. callback(opt)
  428. tween(OptionList, {Size = UDim2.new(1, 0, 0, 0)})
  429. OptionList.Visible = false
  430. end)
  431.  
  432. OptButton.MouseEnter:Connect(function()
  433. tween(OptButton, {BackgroundTransparency = 0.8})
  434. end)
  435. OptButton.MouseLeave:Connect(function()
  436. tween(OptButton, {BackgroundTransparency = 1})
  437. end)
  438. end
  439.  
  440. DropdownFrame.InputBegan:Connect(function(input)
  441. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  442. if OptionList.Visible then
  443. tween(OptionList, {Size = UDim2.new(1, 0, 0, 0)})
  444. OptionList.Visible = false
  445. else
  446. OptionList.Size = UDim2.new(1, 0, 0, #options * 30)
  447. OptionList.Visible = true
  448. tween(OptionList, {Size = UDim2.new(1, 0, 0, #options * 30)})
  449. end
  450. end
  451. end)
  452. end
  453.  
  454. function Tab:CreateSlider(text, min, max, default, callback)
  455. local SliderFrame = Instance.new("Frame")
  456. SliderFrame.Size = UDim2.new(1, 0, 0, 50)
  457. SliderFrame.BackgroundTransparency = 1
  458. SliderFrame.ZIndex = 5
  459. SliderFrame.Parent = TabContent
  460.  
  461. local Label = Instance.new("TextLabel")
  462. Label.Text = text .. ": " .. default
  463. Label.Font = Enum.Font.Gotham
  464. Label.TextColor3 = Color3.fromRGB(255, 255, 255)
  465. Label.TextSize = 14
  466. Label.BackgroundTransparency = 1
  467. Label.Size = UDim2.new(1, 0, 0, 20)
  468. Label.Parent = SliderFrame
  469.  
  470. local SliderBar = Instance.new("Frame")
  471. SliderBar.Size = UDim2.new(1, 0, 0, 10)
  472. SliderBar.Position = UDim2.new(0, 0, 0, 25)
  473. SliderBar.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  474. SliderBar.Parent = SliderFrame
  475.  
  476. local UICorner = Instance.new("UICorner")
  477. UICorner.CornerRadius = UDim.new(0, 5)
  478. UICorner.Parent = SliderBar
  479.  
  480. local Fill = Instance.new("Frame")
  481. Fill.Size = UDim2.new((default - min) / (max - min), 0, 1, 0)
  482. Fill.BackgroundColor3 = Color3.fromRGB(100, 150, 255)
  483. Fill.Parent = SliderBar
  484.  
  485. local UICornerFill = Instance.new("UICorner")
  486. UICornerFill.CornerRadius = UDim.new(0, 5)
  487. UICornerFill.Parent = Fill
  488.  
  489. local Dragging = false
  490.  
  491. SliderBar.InputBegan:Connect(function(input)
  492. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  493. Dragging = true
  494. end
  495. end)
  496.  
  497. SliderBar.InputEnded:Connect(function(input)
  498. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  499. Dragging = false
  500. end
  501. end)
  502.  
  503. UserInputService.InputChanged:Connect(function(input)
  504. if Dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
  505. local relativeX = math.clamp((input.Position.X - SliderBar.AbsolutePosition.X) / SliderBar.AbsoluteSize.X, 0, 1)
  506. local value = math.floor(min + relativeX * (max - min))
  507. Fill.Size = UDim2.new(relativeX, 0, 1, 0)
  508. Label.Text = text .. ": " .. value
  509. callback(value)
  510. end
  511. end)
  512. end
  513.  
  514. function Tab:CreateText(text)
  515. local TextLabel = Instance.new("TextLabel")
  516. TextLabel.Text = text
  517. TextLabel.Font = Enum.Font.Gotham
  518. TextLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
  519. TextLabel.TextSize = 14
  520. TextLabel.BackgroundTransparency = 1
  521. TextLabel.Size = UDim2.new(1, 0, 0, 20)
  522. TextLabel.TextWrapped = true
  523. TextLabel.ZIndex = 5
  524. TextLabel.Parent = TabContent
  525. end
  526.  
  527. return Tab
  528. end
  529.  
  530. function HirimiUI:CreateNotification(title, desc, duration)
  531. local NotifFrame = Instance.new("Frame")
  532. NotifFrame.Size = UDim2.new(1, 0, 0, 60)
  533. NotifFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  534. NotifFrame.BorderSizePixel = 0
  535. NotifFrame.ZIndex = 11
  536. NotifFrame.Parent = self.NotificationHolder
  537.  
  538. local UICorner = Instance.new("UICorner")
  539. UICorner.CornerRadius = UDim.new(0, 8)
  540. UICorner.Parent = NotifFrame
  541.  
  542. local Title = Instance.new("TextLabel")
  543. Title.Text = title
  544. Title.Font = Enum.Font.GothamBold
  545. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  546. Title.TextSize = 14
  547. Title.BackgroundTransparency = 1
  548. Title.Size = UDim2.new(1, -10, 0, 20)
  549. Title.Position = UDim2.new(0, 10, 0, 5)
  550. Title.Parent = NotifFrame
  551.  
  552. local Desc = Instance.new("TextLabel")
  553. Desc.Text = desc
  554. Desc.Font = Enum.Font.Gotham
  555. Desc.TextColor3 = Color3.fromRGB(200, 200, 200)
  556. Desc.TextSize = 12
  557. Desc.BackgroundTransparency = 1
  558. Desc.Size = UDim2.new(1, -10, 0, 30)
  559. Desc.Position = UDim2.new(0, 10, 0, 25)
  560. Desc.Parent = NotifFrame
  561.  
  562. NotifFrame.Position = UDim2.new(0, 300, 0, 0) -- Start off-screen
  563. tween(NotifFrame, {Position = UDim2.new(0, 0, 0, 0)})
  564.  
  565. task.delay(duration or 3, function()
  566. tween(NotifFrame, {Position = UDim2.new(0, 300, 0, 0)})
  567. wait(0.3)
  568. NotifFrame:Destroy()
  569. end)
  570. end
  571.  
  572. return HirimiUI
Advertisement
Add Comment
Please, Sign In to add comment