1. local function mys_custom_ui(config, tabIconsOrdered)
  2. local _uis = game:GetService("UserInputService")
  3. local _cg = game:GetService("CoreGui")
  4. local _run = game:GetService("RunService")
  5. local TweenService = game:GetService("TweenService")
  6. local Lighting = game:GetService("Lighting")
  7. local Players = game:GetService("Players")
  8. local config = _G.config
  9.  
  10. local _visible = config.startVisible
  11. local oldBlur = Lighting:FindFirstChild("mys_customUIBlur")
  12. if oldBlur then
  13. oldBlur:Destroy()
  14. end
  15. local _blurEffect = Instance.new("BlurEffect")
  16. _blurEffect.Name = "mys_customUIBlur"
  17. _blurEffect.Size = _visible and 24 or 0
  18. _blurEffect.Parent = Lighting
  19. for _, existingUI in ipairs(_cg:GetChildren()) do
  20. if existingUI:IsA("ScreenGui") and existingUI.Name == "mys_custom_ui" then
  21. existingUI:Destroy()
  22. end
  23. end
  24.  
  25. local _coregui = Instance.new("ScreenGui")
  26. _coregui.Name = "mys_custom_ui"
  27. _coregui.DisplayOrder = 9999
  28. _coregui.ResetOnSpawn = false
  29. _coregui.IgnoreGuiInset = true
  30. _coregui.Parent = _cg
  31.  
  32. local _blurFrame = Instance.new("Frame")
  33. _blurFrame.Size = UDim2.new(1, 0, 1, 0)
  34. _blurFrame.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  35. _blurFrame.BackgroundTransparency = 1
  36. _blurFrame.BorderSizePixel = 0
  37. _blurFrame.ZIndex = 0
  38. _blurFrame.Visible = _visible
  39. _blurFrame.Parent = _coregui
  40.  
  41. local _stars = {}
  42. local _holder = Instance.new("Frame")
  43. _holder.Size = UDim2.new(1, 0, 1, 0)
  44. _holder.BackgroundTransparency = 1
  45. _holder.ClipsDescendants = true
  46. _holder.ZIndex = 0
  47. _holder.Parent = _blurFrame
  48.  
  49. for i = 1, config.MAX_STARS do
  50. local star = Instance.new("Frame")
  51. star.Size = UDim2.new(0, 3, 0, 3)
  52. local x, y = math.random(), math.random()
  53. local direction = Vector2.new(1, 1).Unit * config.STAR_MOVE_SPEED
  54. star.Position = UDim2.new(x, 0, y, 0)
  55. star.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  56. star.BackgroundTransparency = 0
  57. star.BorderSizePixel = 0
  58. star.ZIndex = 1
  59. star.Visible = true
  60. star.Parent = _holder
  61. table.insert(
  62. _stars,
  63. {
  64. frame = star,
  65. pos = Vector2.new(x, y),
  66. direction = direction,
  67. sparkleOffset = math.random() * math.pi * 2
  68. }
  69. )
  70. end
  71.  
  72. _run.RenderStepped:Connect(
  73. function(deltaTime)
  74. for _, star in ipairs(_stars) do
  75. if star.frame.Visible then
  76. star.pos = star.pos + star.direction * deltaTime
  77. if star.pos.X < 0 or star.pos.X > 1 or star.pos.Y < 0 or star.pos.Y > 1 then
  78. star.pos = Vector2.new(math.random(), math.random())
  79. star.direction = Vector2.new(1, 1).Unit * config.STAR_MOVE_SPEED
  80. star.sparkleOffset = math.random() * math.pi * 2
  81. end
  82. local sparkle = math.abs(math.sin(tick() * config.STAR_SPARKLE_SPEED + star.sparkleOffset))
  83. star.frame.BackgroundTransparency = 0.1 + sparkle * 0.7
  84. star.frame.Position = UDim2.new(star.pos.X, 0, star.pos.Y, 0)
  85. end
  86. end
  87. end
  88. )
  89.  
  90. local _uiContainer = Instance.new("Folder")
  91. _uiContainer.Name = "UIContainer"
  92. _uiContainer.Parent = _coregui
  93.  
  94. local _gui = Instance.new("ScreenGui")
  95. _gui.Name = "mys_custom_ui"
  96. _gui.Parent = _uiContainer
  97. _gui.ResetOnSpawn = false
  98. _gui.DisplayOrder = 9999
  99.  
  100. local _mf = Instance.new("Frame")
  101. _mf.Size = config.mainframesize
  102. _mf.Position = config.mainframepos
  103. _mf.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  104. _mf.BorderSizePixel = 0
  105. _mf.Visible = _visible
  106. _mf.BackgroundTransparency = 1
  107. _mf.Parent = _gui
  108.  
  109. local _crnr = Instance.new("UICorner")
  110. _crnr.CornerRadius = UDim.new(0, 6)
  111. _crnr.Parent = _mf
  112.  
  113. local _top = Instance.new("Frame")
  114. _top.Size = UDim2.new(1, 0, 0, 30)
  115. _top.BackgroundTransparency = 1
  116. _top.BorderSizePixel = 0
  117. _top.Parent = _mf
  118.  
  119. local _tbcrnr = Instance.new("UICorner")
  120. _tbcrnr.CornerRadius = UDim.new(0, 12)
  121. _tbcrnr.Parent = _top
  122.  
  123. local _title = Instance.new("TextLabel")
  124. _title.Size = UDim2.new(0, 0, 1, 0)
  125. _title.Position = UDim2.new(0, 10, 0, 0)
  126. _title.BackgroundTransparency = 1
  127. _title.RichText = true
  128. _title.TextTransparency = 1
  129. _title.Font = Enum.Font.GothamBold
  130. _title.TextSize = 18
  131. _title.TextXAlignment = Enum.TextXAlignment.Left
  132. _title.Parent = _top
  133. local function colorToRGB(color)
  134. return math.floor(color.R * 255),
  135. math.floor(color.G * 255),
  136. math.floor(color.B * 255)
  137. end
  138. local r1, g1, b1 = colorToRGB(config.accentcolor)
  139. local r2, g2, b2 = colorToRGB(config.accentcolorSecondary)
  140. _title.Text = string.format(
  141. '<font color="rgb(%d,%d,%d)">%s</font><font color="rgb(%d,%d,%d)">%s</font>',
  142. r1, g1, b1,
  143. config.title or "unknown",
  144. r2, g2, b2,
  145. config.titleExtension or ".client [CANNOT FIND TITLE]"
  146. )
  147.  
  148. local _version = Instance.new("TextLabel")
  149. _version.Size = UDim2.new(0, 0, 1, 0)
  150. _version.Position = config.pos
  151. _version.BackgroundTransparency = 1
  152. _version.Text = config.version
  153. _version.TextColor3 = config.accentcolor
  154. _version.TextTransparency = 1
  155. _version.Font = Enum.Font.GothamBold
  156. _version.TextSize = 14
  157. _version.TextXAlignment = Enum.TextXAlignment.Left
  158. _version.Parent = _top
  159. local connection
  160. connection = _run.Heartbeat:Connect(function()
  161. _version.Position = UDim2.new(0, 550, 0.15, 0)
  162. connection:Disconnect()
  163. end)
  164.  
  165. local _divider = Instance.new("Frame")
  166. _divider.Size = UDim2.new(0.85, 0, 0, 1)
  167. _divider.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
  168. _divider.BackgroundTransparency = 1
  169. _divider.BorderSizePixel = 0
  170. _divider.Parent = _mf
  171.  
  172. task.defer(
  173. function()
  174. local _pw = _mf.AbsoluteSize.X
  175. local _dw = _divider.AbsoluteSize.X
  176. _cx = (_pw - _dw) / 2
  177. _divider.Position = UDim2.new(0, _cx, 0, 35)
  178. end
  179. )
  180.  
  181. local _scrlfrm = Instance.new("ScrollingFrame")
  182. _scrlfrm.Name = "Content"
  183. _scrlfrm.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  184. _scrlfrm.BorderSizePixel = 0
  185. _scrlfrm.BackgroundTransparency = 1
  186. _scrlfrm.CanvasSize = UDim2.new(0, 0, 0, 0)
  187. _scrlfrm.ScrollBarThickness = 6
  188. _scrlfrm.ScrollBarImageColor3 = Color3.fromRGB(100, 100, 100)
  189. _scrlfrm.Parent = _mf
  190. _scrlfrm.AutomaticCanvasSize = Enum.AutomaticSize.Y
  191. _scrlfrm.ClipsDescendants = true
  192.  
  193. local _scrlcrnr = Instance.new("UICorner")
  194. _scrlcrnr.CornerRadius = UDim.new(0, 8)
  195. _scrlcrnr.Parent = _scrlfrm
  196.  
  197. task.defer(
  198. function()
  199. local _dy = _divider.Position.Y.Offset + _divider.Size.Y.Offset
  200. local _ah = _mf.AbsoluteSize.Y - _dy - 10
  201. _scrlfrm.Position = UDim2.new(0, 10, 0, _dy + 10)
  202. _scrlfrm.Size = UDim2.new(1, -20, 0, _ah)
  203. end
  204. )
  205.  
  206. local _topBar = Instance.new("Frame")
  207. _topBar.Size = UDim2.new(0, 235, 0, 40)
  208. _topBar.Position = UDim2.new(0.5, -150, 0, 20)
  209. _topBar.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  210. _topBar.BorderSizePixel = 0
  211. _topBar.Visible = _visible
  212. _topBar.BackgroundTransparency = 1
  213. _topBar.Parent = _uiContainer
  214.  
  215. local _strokeBar = Instance.new("UIStroke")
  216. _strokeBar.Color = Color3.fromRGB(100, 100, 100)
  217. _strokeBar.Thickness = 0.6
  218. _strokeBar.Transparency = 1
  219. _strokeBar.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  220. _strokeBar.Parent = _topBar
  221.  
  222. local _topBarCorner = Instance.new("UICorner")
  223. _topBarCorner.CornerRadius = UDim.new(0, 4)
  224. _topBarCorner.Parent = _topBar
  225. local r1, g1, b1 = colorToRGB(config.accentcolor)
  226. local r2, g2, b2 = colorToRGB(config.accentcolorSecondary)
  227. local _watermarktextcfg = string.format(
  228. '<font color="rgb(%d,%d,%d)">%s</font><font color="rgb(%d,%d,%d)">%s</font>',
  229. r1, g1, b1, config.watermark or "unknown",
  230. r2, g2, b2, config.watermarkExtension or ".client"
  231. )
  232. local _watermark = Instance.new("Frame")
  233. _watermark.Size = UDim2.new(0, 93, 0, 40)
  234. _watermark.Position = UDim2.new(0, 1780, 0, 25)
  235. _watermark.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  236. _watermark.BorderSizePixel = 0
  237. _watermark.BackgroundTransparency = 0
  238. _watermark.Parent = _uiContainer
  239. local _watermarkStroke = Instance.new("UIStroke")
  240. _watermarkStroke.Color = Color3.fromRGB(100, 100, 100)
  241. _watermarkStroke.Thickness = 0.6
  242. _watermarkStroke.Transparency = 1
  243. _watermarkStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  244. _watermarkStroke.Parent = _watermark
  245. local _watermarkCorner = Instance.new("UICorner")
  246. _watermarkCorner.CornerRadius = UDim.new(0, 4)
  247. _watermarkCorner.Parent = _watermark
  248. local _watermarklabel = Instance.new("TextLabel")
  249. _watermarklabel.Size = UDim2.new(0, 0, 1, 0)
  250. _watermarklabel.Text = _watermarktextcfg
  251. _watermarklabel.Position = UDim2.new(0, 10, 0, 0)
  252. _watermarklabel.BackgroundTransparency = 1
  253. _watermarklabel.TextColor3 = Color3.new(1, 1, 1)
  254. _watermarklabel.TextTransparency = 0
  255. _watermarklabel.Font = Enum.Font.GothamBold
  256. _watermarklabel.TextSize = 16
  257. _watermarklabel.TextXAlignment = Enum.TextXAlignment.Left
  258. _watermarklabel.RichText = true
  259. _watermarklabel.Parent = _watermark
  260. local _watermarkDragging = false
  261. local _watermarkDragStart
  262. local _watermarkStartPos
  263. local _watermarkDragInput
  264. local _watermarkTargetPos = _watermark.Position
  265. local _watermarkLerpSpeed = 0.05
  266. _watermark.InputBegan:Connect(function(input)
  267. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  268. _watermarkDragging = true
  269. _watermarkDragStart = input.Position
  270. _watermarkStartPos = _watermark.Position
  271. end
  272. end)
  273. _watermark.InputChanged:Connect(function(input)
  274. if input.UserInputType == Enum.UserInputType.MouseMovement then
  275. _watermarkDragInput = input
  276. end
  277. end)
  278. _watermark.InputEnded:Connect(function(input)
  279. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  280. _watermarkDragging = false
  281. end
  282. end)
  283. _run.RenderStepped:Connect(function()
  284. if _watermarkDragging and _watermarkDragInput then
  285. local delta = _watermarkDragInput.Position - _watermarkDragStart
  286. _watermarkTargetPos = _watermarkStartPos + UDim2.new(0, delta.X, 0, delta.Y)
  287. end
  288. _watermark.Position = _watermark.Position:Lerp(_watermarkTargetPos, _watermarkLerpSpeed)
  289. end)
  290. local exec = "Unknown"
  291. if identifyexecutor then
  292. local name, version = identifyexecutor()
  293. exec = version and (name .. " " .. version) or name
  294. elseif getexecutorname then
  295. exec = getexecutorname()
  296. end
  297. local _executorbox = Instance.new("Frame")
  298. _executorbox.Size = UDim2.new(0, 125, 0, 40)
  299. _executorbox.Position = UDim2.new(0, 430, 0, 20)
  300. _executorbox.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  301. _executorbox.BorderSizePixel = 0
  302. _executorbox.Visible = _visible
  303. _executorbox.BackgroundTransparency = 1
  304. _executorbox.Parent = _uiContainer
  305. local _executorboxStroke = Instance.new("UIStroke")
  306. _executorboxStroke.Color = Color3.fromRGB(100, 100, 100)
  307. _executorboxStroke.Thickness = 0.6
  308. _executorboxStroke.Transparency = 1
  309. _executorboxStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  310. _executorboxStroke.Parent = _executorbox
  311.  
  312. local _executorboxCorner = Instance.new("UICorner")
  313. _executorboxCorner.CornerRadius = UDim.new(0, 4)
  314. _executorboxCorner.Parent = _executorbox
  315. local _executorboxlabel = Instance.new("TextLabel")
  316. _executorboxlabel.Size = UDim2.new(0, 0, 1, 0)
  317. _executorboxlabel.Text = exec
  318. _executorboxlabel.Position = UDim2.new(0, 10, 0, 0)
  319. _executorboxlabel.BackgroundTransparency = 1
  320. _executorboxlabel.TextColor3 = config.accentcolor
  321. _executorboxlabel.BorderSizePixel = 0
  322. _executorboxlabel.TextTransparency = 0
  323. _executorboxlabel.Font = Enum.Font.GothamBold
  324. _executorboxlabel.TextSize = 16
  325. _executorboxlabel.TextXAlignment = Enum.TextXAlignment.Left
  326. _executorboxlabel.Parent = _executorbox
  327. local _executorboxDragging = false
  328. local _executorboxDragStart
  329. local _executorboxStartPos
  330. local _executorboxDragInput
  331. local _executorboxTargetPos = _executorbox.Position
  332. local _executorboxLerpSpeed = 0.05
  333. _executorbox.InputBegan:Connect(function(input)
  334. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  335. _executorboxDragging = true
  336. _executorboxDragStart = input.Position
  337. _executorboxStartPos = _executorbox.Position
  338. end
  339. end)
  340. _executorbox.InputChanged:Connect(function(input)
  341. if input.UserInputType == Enum.UserInputType.MouseMovement then
  342. _executorboxDragInput = input
  343. end
  344. end)
  345. _executorbox.InputEnded:Connect(function(input)
  346. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  347. _executorboxDragging = false
  348. end
  349. end)
  350. _run.RenderStepped:Connect(function()
  351. if _executorboxDragging and _executorboxDragInput then
  352. local delta = _executorboxDragInput.Position - _executorboxDragStart
  353. _executorboxTargetPos = _executorboxStartPos + UDim2.new(0, delta.X, 0, delta.Y)
  354. end
  355. _executorbox.Position = _executorbox.Position:Lerp(_executorboxTargetPos, _executorboxLerpSpeed)
  356. end)
  357.  
  358. local _fpsbox = Instance.new("Frame")
  359. _fpsbox.Size = UDim2.new(0, 45, 0, 40)
  360. _fpsbox.Position = UDim2.new(0, 70, 0, 20)
  361. _fpsbox.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  362. _fpsbox.BorderSizePixel = 0
  363. _fpsbox.Visible = _visible
  364. _fpsbox.BackgroundTransparency = 1
  365. _fpsbox.Parent = _uiContainer
  366. local _fpsboxStroke = Instance.new("UIStroke")
  367. _fpsboxStroke.Color = Color3.fromRGB(100, 100, 100)
  368. _fpsboxStroke.Thickness = 0.6
  369. _fpsboxStroke.Transparency = 1
  370. _fpsboxStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  371. _fpsboxStroke.Parent = _fpsbox
  372.  
  373. local _fpsboxCorner = Instance.new("UICorner")
  374. _fpsboxCorner.CornerRadius = UDim.new(0, 4)
  375. _fpsboxCorner.Parent = _fpsbox
  376. local _fpslabel = Instance.new("TextLabel")
  377. _fpslabel.Size = UDim2.new(0, 0, 1, 0)
  378. _fpslabel.Position = UDim2.new(0, 10, 0, 0)
  379. _fpslabel.BackgroundTransparency = 1
  380. _fpslabel.TextColor3 = config.accentcolor
  381. _fpslabel.BorderSizePixel = 0
  382. _fpslabel.TextTransparency = 0
  383. _fpslabel.Font = Enum.Font.GothamBold
  384. _fpslabel.TextSize = 16
  385. _fpslabel.TextXAlignment = Enum.TextXAlignment.Left
  386. _fpslabel.Parent = _fpsbox
  387. local updateInterval = 0.1
  388. local accumulatedTime = 0
  389. local _fpsDragging = false
  390. local _fpsDragStart
  391. local _fpsStartPos
  392. local _fpsDragInput
  393. local _fpsTargetPos = _fpsbox.Position
  394. local lerpSpeed = 0.05
  395. _run.RenderStepped:Connect(function(deltaTime)
  396. accumulatedTime = accumulatedTime + deltaTime
  397. if accumulatedTime >= updateInterval then
  398. local fps = 1 / deltaTime
  399. _fpslabel.Text = tostring(math.floor(fps))
  400. accumulatedTime = 0
  401. end
  402. end)
  403. _fpsbox.InputBegan:Connect(function(input)
  404. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  405. _fpsDragging = true
  406. _fpsDragStart = input.Position
  407. _fpsStartPos = _fpsbox.Position
  408. end
  409. end)
  410. _fpsbox.InputChanged:Connect(function(input)
  411. if input.UserInputType == Enum.UserInputType.MouseMovement then
  412. _fpsDragInput = input
  413. end
  414. end)
  415. _fpsbox.InputEnded:Connect(function(input)
  416. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  417. _fpsDragging = false
  418. end
  419. end)
  420. _run.RenderStepped:Connect(function()
  421. if _fpsDragging and _fpsDragInput then
  422. local delta = _fpsDragInput.Position - _fpsDragStart
  423. _fpsTargetPos = _fpsStartPos + UDim2.new(0, delta.X, 0, delta.Y)
  424. end
  425. _fpsbox.Position = _fpsbox.Position:Lerp(_fpsTargetPos, lerpSpeed)
  426. end)
  427. local _leftBar = Instance.new("Frame")
  428. _leftBar.Size = UDim2.new(0, 235, 0, 40)
  429. _leftBar.Position = UDim2.new(0, 20, 0, 20)
  430. _leftBar.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  431. _leftBar.BorderSizePixel = 0
  432. _leftBar.Visible = _visible
  433. _leftBar.BackgroundTransparency = 1
  434. _leftBar.Parent = _uiContainer
  435.  
  436. local _leftBarStroke = Instance.new("UIStroke")
  437. _leftBarStroke.Color = Color3.fromRGB(100, 100, 100)
  438. _leftBarStroke.Thickness = 0.6
  439. _leftBarStroke.Transparency = 1
  440. _leftBarStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  441. _leftBarStroke.Parent = _leftBar
  442.  
  443. local _leftBarCorner = Instance.new("UICorner")
  444. _leftBarCorner.CornerRadius = UDim.new(0, 4)
  445. _leftBarCorner.Parent = _leftBar
  446.  
  447. local _usernameLabel = Instance.new("TextLabel")
  448. _usernameLabel.Size = UDim2.new(0, 0, 1, 0)
  449. _usernameLabel.Position = UDim2.new(0, 10, 0, 0)
  450. _usernameLabel.BackgroundTransparency = 1
  451. _usernameLabel.Text = Players.LocalPlayer.DisplayName
  452. _usernameLabel.TextColor3 = config.accentcolor
  453. _usernameLabel.BorderSizePixel = 0
  454. _usernameLabel.TextTransparency = 1
  455. _usernameLabel.Font = Enum.Font.GothamBold
  456. _usernameLabel.TextSize = 16
  457. _usernameLabel.TextXAlignment = Enum.TextXAlignment.Left
  458. _usernameLabel.Parent = _leftBar
  459. local baseLeftX = 20
  460. local baseLeftWidth = 235
  461. local offset = _leftBar.Size.X.Offset - baseLeftWidth
  462. local startX = baseLeftX + _leftBar.Size.X.Offset + 10
  463. _fpsbox.Position = UDim2.new(0, startX + offset, 0, 20)
  464. _executorbox.Position = UDim2.new(0, startX + _fpsbox.Size.X.Offset + 20 + offset, 0, 20)
  465. local _timebox = Instance.new("Frame")
  466. _timebox.Size = UDim2.new(0, 65, 0, 40)
  467. _timebox.Position = UDim2.new(0, 20, 0, 65)
  468. _timebox.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  469. _timebox.BorderSizePixel = 0
  470. _timebox.Visible = _visible
  471. _timebox.BackgroundTransparency = 1
  472. _timebox.Parent = _uiContainer
  473. local _timeboxStroke = Instance.new("UIStroke")
  474. _timeboxStroke.Color = Color3.fromRGB(100, 100, 100)
  475. _timeboxStroke.Thickness = 0.6
  476. _timeboxStroke.Transparency = 1
  477. _timeboxStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  478. _timeboxStroke.Parent = _timebox
  479. local _timeboxCorner = Instance.new("UICorner")
  480. _timeboxCorner.CornerRadius = UDim.new(0, 4)
  481. _timeboxCorner.Parent = _timebox
  482. local _timeboxlabel = Instance.new("TextLabel")
  483. _timeboxlabel.Size = UDim2.new(1, -20, 1, 0)
  484. _timeboxlabel.Position = UDim2.new(0, 10, 0, 0)
  485. _timeboxlabel.BackgroundTransparency = 1
  486. _timeboxlabel.TextColor3 = config.accentcolor
  487. _timeboxlabel.TextTransparency = 0
  488. _timeboxlabel.Font = Enum.Font.GothamBold
  489. _timeboxlabel.TextSize = 16
  490. _timeboxlabel.TextXAlignment = Enum.TextXAlignment.Left
  491. _timeboxlabel.Parent = _timebox
  492. local function updateTime()
  493. local currentTime = os.date("*t")
  494. local hour = currentTime.hour
  495. local minute = currentTime.min
  496. local ampm = hour >= 12 and "PM" or "AM"
  497. if hour == 0 then
  498. hour = 12
  499. elseif hour > 12 then
  500. hour = hour - 12
  501. end
  502. _timeboxlabel.BackgroundTransparency = 1
  503. _timeboxlabel.Text = string.format("%d:%02d %s", hour, minute, ampm)
  504. end
  505. updateTime()
  506. task.spawn(function()
  507. while true do
  508. updateTime()
  509. task.wait()
  510. end
  511. end)
  512. local _timeboxDragging = false
  513. local _timeboxDragStart
  514. local _timeboxStartPos
  515. local _timeboxDragInput
  516. local _timeboxTargetPos = _timebox.Position
  517. local _timeboxLerpSpeed = 0.05
  518. _timebox.InputBegan:Connect(function(input)
  519. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  520. _timeboxDragging = true
  521. _timeboxDragStart = input.Position
  522. _timeboxStartPos = _timebox.Position
  523. end
  524. end)
  525. _timebox.InputChanged:Connect(function(input)
  526. if input.UserInputType == Enum.UserInputType.MouseMovement then
  527. _timeboxDragInput = input
  528. end
  529. end)
  530. _timebox.InputEnded:Connect(function(input)
  531. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  532. _timeboxDragging = false
  533. end
  534. end)
  535. _run.RenderStepped:Connect(function()
  536. if _timeboxDragging and _timeboxDragInput then
  537. local delta = _timeboxDragInput.Position - _timeboxDragStart
  538. _timeboxTargetPos = _timeboxStartPos + UDim2.new(0, delta.X, 0, delta.Y)
  539. end
  540. _timebox.Position = _timebox.Position:Lerp(_timeboxTargetPos, _timeboxLerpSpeed)
  541. end)
  542.  
  543. local _iconList = Instance.new("UIListLayout")
  544. _iconList.FillDirection = Enum.FillDirection.Horizontal
  545. _iconList.HorizontalAlignment = Enum.HorizontalAlignment.Center
  546. _iconList.VerticalAlignment = Enum.VerticalAlignment.Center
  547. _iconList.Padding = UDim.new(0, 6)
  548. _iconList.Parent = _topBar
  549.  
  550. local function loadIcons(url)
  551. local success, result = pcall(function()
  552. return game:HttpGet(url, true)
  553. end)
  554. if not success then
  555. return {}
  556. elseif not result then
  557. return {}
  558. end
  559. local chunk, err = loadstring(result)
  560. if not chunk then
  561. return {}
  562. end
  563. local ok, data = pcall(chunk)
  564. if not ok then
  565. return {}
  566. elseif not data then
  567. return {}
  568. end
  569. return data
  570. end
  571.  
  572.  
  573. local function getIcon(name)
  574. if not Icons or not Icons["48px"] then
  575. return nil
  576. end
  577. name = string.match(string.lower(name), "^%s*(.-)%s*$") or ""
  578. local r = Icons["48px"][name]
  579. if not r then
  580. return nil
  581. end
  582. local id, sizeTbl, offsetTbl = r[1], r[2], r[3]
  583. if type(id) ~= "number" or type(sizeTbl) ~= "table" or type(offsetTbl) ~= "table" then
  584. return nil
  585. end
  586. return {
  587. id = id,
  588. imageRectSize = Vector2.new(sizeTbl[1], sizeTbl[2]),
  589. imageRectOffset = Vector2.new(offsetTbl[1], offsetTbl[2])
  590. }
  591. end
  592.  
  593. local function getAssetUri(id)
  594. if type(id) ~= "number" then
  595. return "rbxassetid://0"
  596. end
  597. return "rbxassetid://" .. id
  598. end
  599.  
  600. local originalColor = config.accentcolor
  601. local hoverColor = Color3.new(
  602. math.clamp(originalColor.R + 0.2, 0, 1),
  603. math.clamp(originalColor.G + 0.2, 0, 1),
  604. math.clamp(originalColor.B + 0.2, 0, 1)
  605. )
  606.  
  607. local iconButtons = {}
  608. local tabFrames = {}
  609. local currentTab = nil
  610. local centerPos = UDim2.new(0.5, 0, 0.5, 0)
  611.  
  612. local function createIconButton(iconName, tabName)
  613. local icon = getIcon(iconName)
  614. if not icon then
  615. return nil
  616. end
  617.  
  618. local btn = Instance.new("ImageButton")
  619. btn.Size = UDim2.new(0, 30, 0, 30)
  620. btn.BackgroundTransparency = 1
  621. btn.AutoButtonColor = false
  622. btn.AnchorPoint = Vector2.new(0.5, 0.5)
  623.  
  624. local iconImg = Instance.new("ImageLabel")
  625. iconImg.Size = UDim2.new(0, 20, 0, 20)
  626. iconImg.Position = UDim2.new(0.5, -10, 0.5, -10)
  627. iconImg.BackgroundTransparency = 1
  628. iconImg.Image = getAssetUri(icon.id)
  629. iconImg.ImageRectSize = icon.imageRectSize
  630. iconImg.ImageRectOffset = icon.imageRectOffset
  631. iconImg.ImageColor3 = originalColor
  632. iconImg.ImageTransparency = 1
  633. iconImg.Parent = btn
  634.  
  635. local _bCrnr = Instance.new("UICorner")
  636. _bCrnr.CornerRadius = UDim.new(0, 4)
  637. _bCrnr.Parent = btn
  638.  
  639. local _stroke = Instance.new("UIStroke")
  640. _stroke.Color = Color3.fromRGB(40, 40, 40)
  641. _stroke.Thickness = 1
  642. _stroke.Transparency = 1
  643. _stroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  644. _stroke.Parent = btn
  645.  
  646. local sound = Instance.new("Sound")
  647. sound.SoundId = config.buttonSoundId
  648. sound.Volume = 0.5
  649. sound.Parent = btn
  650.  
  651. btn.MouseEnter:Connect(function()
  652. iconImg.ImageColor3 = hoverColor
  653. end)
  654.  
  655. btn.MouseLeave:Connect(function()
  656. if currentTab ~= btn then
  657. iconImg.ImageColor3 = originalColor
  658. end
  659. end)
  660.  
  661. btn.Parent = _topBar
  662. btn.Position = centerPos
  663.  
  664. local tabFrame = Instance.new("Frame")
  665. tabFrame.Name = tabName
  666. tabFrame.Size = UDim2.new(1, -20, 0, 0)
  667. tabFrame.AutomaticSize = Enum.AutomaticSize.Y
  668. tabFrame.BackgroundTransparency = 1
  669. tabFrame.Visible = false
  670. tabFrame.Parent = _scrlfrm
  671.  
  672. local columns = Instance.new("Frame")
  673. columns.Name = "Columns"
  674. columns.Size = UDim2.new(1, 0, 1, 0)
  675. columns.BackgroundTransparency = 1
  676. columns.Parent = tabFrame
  677.  
  678. local leftColumn = Instance.new("Frame")
  679. leftColumn.Name = "Left"
  680. leftColumn.Size = UDim2.new(0.48, 0, 1, 0)
  681. leftColumn.Position = UDim2.new(0, 0, 0, 0)
  682. leftColumn.BackgroundTransparency = 1
  683. leftColumn.Parent = columns
  684.  
  685. local leftList = Instance.new("UIListLayout")
  686. leftList.SortOrder = Enum.SortOrder.LayoutOrder
  687. leftList.Padding = UDim.new(0, 8)
  688. leftList.Parent = leftColumn
  689.  
  690. local leftPad = Instance.new("UIPadding")
  691. leftPad.PaddingTop = UDim.new(0, 10)
  692. leftPad.PaddingBottom = UDim.new(0, 10)
  693. leftPad.PaddingLeft = UDim.new(0, 10)
  694. leftPad.PaddingRight = UDim.new(0, 10)
  695. leftPad.Parent = leftColumn
  696.  
  697. local rightColumn = Instance.new("Frame")
  698. rightColumn.Name = "Right"
  699. rightColumn.Size = UDim2.new(0.48, 0, 1, 0)
  700. rightColumn.Position = UDim2.new(0.52, 0, 0, 0)
  701. rightColumn.BackgroundTransparency = 1
  702. rightColumn.Parent = columns
  703.  
  704. local rightList = Instance.new("UIListLayout")
  705. rightList.SortOrder = Enum.SortOrder.LayoutOrder
  706. rightList.Padding = UDim.new(0, 8)
  707. rightList.Parent = rightColumn
  708.  
  709. local rightPad = Instance.new("UIPadding")
  710. rightPad.PaddingTop = UDim.new(0, 10)
  711. rightPad.PaddingBottom = UDim.new(0, 10)
  712. rightPad.PaddingLeft = UDim.new(0, 10)
  713. rightPad.PaddingRight = UDim.new(0, 10)
  714. rightPad.Parent = rightColumn
  715.  
  716. table.insert(iconButtons, btn)
  717. table.insert(tabFrames, tabFrame)
  718.  
  719. btn.Activated:Connect(function()
  720. if currentTab ~= btn then
  721. sound:Play()
  722. if currentTab then
  723. local prevIconImg = currentTab:FindFirstChildOfClass("ImageLabel")
  724. if prevIconImg then
  725. prevIconImg.ImageColor3 = originalColor
  726. end
  727. local prevIndex = table.find(iconButtons, currentTab)
  728. if prevIndex then
  729. tabFrames[prevIndex].Visible = false
  730. end
  731. end
  732. currentTab = btn
  733. iconImg.ImageColor3 = hoverColor
  734. local thisIndex = table.find(iconButtons, btn)
  735. if thisIndex then
  736. tabFrames[thisIndex].Visible = true
  737. end
  738. end
  739. end)
  740.  
  741. return btn
  742. end
  743.  
  744. function playAnimations(fadeIn)
  745. if fadeIn then
  746. _blurFrame.BackgroundTransparency = 1
  747. _topBar.BackgroundTransparency = 1
  748. _strokeBar.Transparency = 1
  749. _timebox.BackgroundTransparency = 1
  750. _timeboxStroke.Transparency = 1
  751. _timeboxlabel.TextTransparency = 1
  752. _executorbox.BackgroundTransparency = 1
  753. _executorboxStroke.Transparency = 1
  754. _executorboxlabel.TextTransparency = 1
  755. _fpsbox.BackgroundTransparency = 1
  756. _fpsboxStroke.Transparency = 1
  757. _fpslabel.TextTransparency = 1
  758. _leftBar.BackgroundTransparency = 1
  759. _leftBarStroke.Transparency = 1
  760. _usernameLabel.TextTransparency = 1
  761. _scrlfrm.BackgroundTransparency = 1
  762. _mf.BackgroundTransparency = 1
  763. _title.TextTransparency = 1
  764. _version.TextTransparency = 1
  765. _divider.BackgroundTransparency = 1
  766. _blurEffect.Size = 0
  767. _iconList.Parent = nil
  768.  
  769. for i, btn in ipairs(iconButtons) do
  770. btn.AnchorPoint = Vector2.new(0.5, 0.5)
  771. btn.Position = centerPos
  772. local iconImg = btn:FindFirstChildOfClass("ImageLabel")
  773. local stroke = btn:FindFirstChildOfClass("UIStroke")
  774. if iconImg then
  775. iconImg.ImageTransparency = 1
  776. end
  777. if stroke then
  778. stroke.Transparency = 1
  779. end
  780. end
  781.  
  782. TweenService:Create(
  783. _blurEffect,
  784. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  785. {Size = 24}
  786. ):Play()
  787.  
  788. TweenService:Create(
  789. _blurFrame,
  790. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  791. {BackgroundTransparency = 0.5}
  792. ):Play()
  793.  
  794. task.wait(0.3)
  795.  
  796. TweenService:Create(
  797. _topBar,
  798. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  799. {BackgroundTransparency = 0}
  800. ):Play()
  801.  
  802. TweenService:Create(
  803. _strokeBar,
  804. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  805. {Transparency = 0}
  806. ):Play()
  807.  
  808. task.wait(0.3)
  809.  
  810. local buttonAnimationTime = 0
  811. for i, btn in ipairs(iconButtons) do
  812. local iconImg = btn:FindFirstChildOfClass("ImageLabel")
  813. local stroke = btn:FindFirstChildOfClass("UIStroke")
  814. local sound = btn:FindFirstChildOfClass("Sound")
  815. local targetPos = UDim2.new(0, 28 + (i - 1) * (30 + 6), 0.5, 0)
  816. local tween = TweenService:Create(
  817. btn,
  818. TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
  819. {Position = targetPos}
  820. )
  821. if iconImg then
  822. TweenService:Create(
  823. iconImg,
  824. TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
  825. {ImageTransparency = 0}
  826. ):Play()
  827. end
  828. if stroke then
  829. TweenService:Create(
  830. stroke,
  831. TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
  832. {Transparency = 0}
  833. ):Play()
  834. end
  835. if sound then
  836. tween.Completed:Connect(function()
  837. sound:Play()
  838. end)
  839. end
  840. tween:Play()
  841. task.wait(0.1)
  842. buttonAnimationTime = buttonAnimationTime + 0.1
  843. end
  844.  
  845. task.wait(0.2)
  846.  
  847. local mfTween = TweenService:Create(
  848. _mf,
  849. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  850. {BackgroundTransparency = 0}
  851. )
  852.  
  853. mfTween.Completed:Connect(function()
  854. local ti = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
  855.  
  856. function fadeInChildren(obj)
  857. if obj:IsA("Frame") or obj:IsA("ScrollingFrame") then
  858. if obj.Name == "Content" then
  859. obj.BackgroundTransparency = 1
  860. return
  861. end
  862.  
  863. if obj.Name == "Content" and obj.Parent.Name ~= "ScrollingFrame" then
  864. obj.BackgroundTransparency = 1
  865. return
  866. end
  867.  
  868. if obj.Name == "Content" then
  869. obj.BackgroundTransparency = 1
  870. return
  871. end
  872.  
  873. if obj.Name == "Left" or obj.Name == "Right" or obj.Name == "Columns" then
  874. obj.BackgroundTransparency = 1
  875. end
  876.  
  877. if obj.BackgroundTransparency == 1 and not obj:GetAttribute("NoFade") then
  878. TweenService:Create(obj, ti, {BackgroundTransparency = 0}):Play()
  879. end
  880. end
  881.  
  882. if obj:IsA("TextLabel") or obj:IsA("TextButton") then
  883. if obj.TextTransparency == 1 and not obj:GetAttribute("NoFade") then
  884. TweenService:Create(obj, ti, {TextTransparency = 0}):Play()
  885. end
  886. end
  887.  
  888. if obj:IsA("ImageLabel") or obj:IsA("ImageButton") then
  889. if obj.ImageTransparency == 1 and not obj:GetAttribute("NoFade") then
  890. TweenService:Create(obj, ti, {ImageTransparency = 0}):Play()
  891. end
  892. end
  893.  
  894. if obj:IsA("UIStroke") then
  895. if obj.Transparency == 1 and not obj:GetAttribute("NoFade") then
  896. TweenService:Create(obj, ti, {Transparency = 0.5}):Play()
  897. end
  898. end
  899.  
  900. for _, child in ipairs(obj:GetChildren()) do
  901. fadeInChildren(child)
  902. end
  903. end
  904.  
  905. fadeInChildren(_scrlfrm)
  906. end)
  907.  
  908. mfTween:Play()
  909.  
  910. local titleTween = TweenService:Create(
  911. _title,
  912. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  913. {TextTransparency = 0}
  914. )
  915. titleTween.Completed:Connect(function()
  916. local nameWidth = _usernameLabel.TextBounds.X
  917. _leftBar.Size = UDim2.new(0, nameWidth + 20, 0, 40)
  918. end)
  919. titleTween.Completed:Connect(function()
  920. local executorWidth = _executorboxlabel.TextBounds.X
  921. _executorbox.Size = UDim2.new(0, executorWidth + 20, 0, 40)
  922. end)
  923. titleTween.Completed:Connect(function()
  924. local executorWidth = _timeboxlabel.TextBounds.X
  925. _timebox.Size = UDim2.new(0, executorWidth + 20, 0, 40)
  926. end)
  927. titleTween:Play()
  928.  
  929. TweenService:Create(
  930. _version,
  931. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  932. {TextTransparency = 0.25}
  933. ):Play()
  934.  
  935. TweenService:Create(
  936. _divider,
  937. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  938. {BackgroundTransparency = 0}
  939. ):Play()
  940.  
  941. task.wait(buttonAnimationTime)
  942. TweenService:Create(
  943. _timebox,
  944. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  945. {BackgroundTransparency = 0}
  946. ):Play()
  947. TweenService:Create(
  948. _timeboxStroke,
  949. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  950. {Transparency = 0}
  951. ):Play()
  952. TweenService:Create(
  953. _timeboxlabel,
  954. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  955. {TextTransparency = 0}
  956. ):Play()
  957. TweenService:Create(
  958. _executorbox,
  959. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  960. {BackgroundTransparency = 0}
  961. ):Play()
  962. TweenService:Create(
  963. _executorboxStroke,
  964. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  965. {Transparency = 0}
  966. ):Play()
  967. TweenService:Create(
  968. _executorboxlabel,
  969. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  970. {BackgroundTransparency = 0}
  971. ):Play()
  972. TweenService:Create(
  973. _fpsbox,
  974. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  975. {BackgroundTransparency = 0}
  976. ):Play()
  977. TweenService:Create(
  978. _fpsboxStroke,
  979. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  980. {Transparency = 0}
  981. ):Play()
  982. TweenService:Create(
  983. _fpslabel,
  984. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  985. {BackgroundTransparency = 0}
  986. ):Play()
  987.  
  988. TweenService:Create(
  989. _leftBar,
  990. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  991. {BackgroundTransparency = 0}
  992. ):Play()
  993.  
  994. TweenService:Create(
  995. _leftBarStroke,
  996. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  997. {Transparency = 0}
  998. ):Play()
  999.  
  1000. TweenService:Create(
  1001. _usernameLabel,
  1002. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  1003. {TextTransparency = 0}
  1004. ):Play()
  1005.  
  1006. task.delay(0.5, function()
  1007. _mf.BackgroundTransparency = 0
  1008. _title.TextTransparency = 0
  1009. _version.TextTransparency = 0.25
  1010. _divider.BackgroundTransparency = 0
  1011. _timebox.BackgroundTransparency = 0
  1012. _timeboxStroke.Transparency = 0
  1013. _timeboxlabel.TextTransparency = 0
  1014. _executorbox.BackgroundTransparency = 0
  1015. _executorboxStroke.Transparency = 0
  1016. _executorboxlabel.TextTransparency = 0
  1017. _fpsbox.BackgroundTransparency = 0
  1018. _fpsboxStroke.Transparency = 0
  1019. _fpslabel.TextTransparency = 0
  1020. _leftBar.BackgroundTransparency = 0
  1021. _leftBarStroke.Transparency = 0
  1022. _usernameLabel.TextTransparency = 0
  1023. _iconList.Parent = _topBar
  1024. for _, btn in ipairs(iconButtons) do
  1025. btn.Position = UDim2.new(0, 0, 0, 0)
  1026. btn.AnchorPoint = Vector2.new(0, 0)
  1027. end
  1028. end)
  1029. else
  1030. TweenService:Create(
  1031. _blurEffect,
  1032. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  1033. {Size = 0}
  1034. ):Play()
  1035.  
  1036. TweenService:Create(
  1037. _blurFrame,
  1038. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  1039. {BackgroundTransparency = 1}
  1040. ):Play()
  1041.  
  1042. TweenService:Create(
  1043. _topBar,
  1044. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  1045. {BackgroundTransparency = 1}
  1046. ):Play()
  1047.  
  1048. TweenService:Create(
  1049. _strokeBar,
  1050. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  1051. {Transparency = 1}
  1052. ):Play()
  1053. TweenService:Create(
  1054. _timebox,
  1055. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  1056. {BackgroundTransparency = 1}
  1057. ):Play()
  1058. TweenService:Create(
  1059. _timeboxStroke,
  1060. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  1061. {Transparency = 1}
  1062. ):Play()
  1063. TweenService:Create(
  1064. _timeboxlabel,
  1065. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  1066. {TextTransparency = 1}
  1067. ):Play()
  1068. TweenService:Create(
  1069. _executorbox,
  1070. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  1071. {BackgroundTransparency = 1}
  1072. ):Play()
  1073. TweenService:Create(
  1074. _executorboxStroke,
  1075. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  1076. {Transparency = 1}
  1077. ):Play()
  1078. TweenService:Create(
  1079. _executorboxlabel,
  1080. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  1081. {BackgroundTransparency = 1}
  1082. ):Play()
  1083. TweenService:Create(
  1084. _fpsbox,
  1085. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  1086. {BackgroundTransparency = 1}
  1087. ):Play()
  1088. TweenService:Create(
  1089. _fpsboxStroke,
  1090. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  1091. {Transparency = 1}
  1092. ):Play()
  1093. TweenService:Create(
  1094. _fpslabel,
  1095. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  1096. {BackgroundTransparency = 1}
  1097. ):Play()
  1098.  
  1099. TweenService:Create(
  1100. _leftBar,
  1101. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  1102. {BackgroundTransparency = 1}
  1103. ):Play()
  1104.  
  1105. TweenService:Create(
  1106. _leftBarStroke,
  1107. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  1108. {Transparency = 1}
  1109. ):Play()
  1110.  
  1111. TweenService:Create(
  1112. _usernameLabel,
  1113. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  1114. {TextTransparency = 1}
  1115. ):Play()
  1116.  
  1117. TweenService:Create(
  1118. _mf,
  1119. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  1120. {BackgroundTransparency = 1}
  1121. ):Play()
  1122.  
  1123. TweenService:Create(
  1124. _title,
  1125. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  1126. {TextTransparency = 1}
  1127. ):Play()
  1128.  
  1129. TweenService:Create(
  1130. _version,
  1131. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  1132. {TextTransparency = 1}
  1133. ):Play()
  1134.  
  1135. TweenService:Create(
  1136. _divider,
  1137. TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  1138. {BackgroundTransparency = 1}
  1139. ):Play()
  1140.  
  1141. for i, btn in ipairs(iconButtons) do
  1142. local iconImg = btn:FindFirstChildOfClass("ImageLabel")
  1143. local stroke = btn:FindFirstChildOfClass("UIStroke")
  1144. if iconImg then
  1145. TweenService:Create(
  1146. iconImg,
  1147. TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  1148. {ImageTransparency = 1}
  1149. ):Play()
  1150. end
  1151. if stroke then
  1152. TweenService:Create(
  1153. stroke,
  1154. TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
  1155. {Transparency = 1}
  1156. ):Play()
  1157. end
  1158. end
  1159. end
  1160. end
  1161.  
  1162. for _, tab in ipairs(tabIconsOrdered) do
  1163. createIconButton(tab.icon, tab.name)
  1164. end
  1165.  
  1166. if _visible then
  1167. playAnimations(true)
  1168. if #iconButtons > 0 then
  1169. local btn = iconButtons[1]
  1170. local iconImg = btn:FindFirstChildOfClass("ImageLabel")
  1171. if iconImg then
  1172. iconImg.ImageColor3 = hoverColor
  1173. end
  1174. currentTab = btn
  1175. tabFrames[1].Visible = true
  1176. end
  1177. end
  1178.  
  1179. local _dragging = false
  1180. local _dragInput, _dragStart, _startPos
  1181. local _dragTweenInfo = TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
  1182. local _currentTween = nil
  1183. local _leftDragging = false
  1184. local _leftDragInput, _leftDragStart, _leftStartPos
  1185. local _leftCurrentTween = nil
  1186.  
  1187. _top.InputBegan:Connect(function(input)
  1188. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1189. _dragging = true
  1190. _dragStart = input.Position
  1191. _startPos = _mf.Position
  1192. if _currentTween then
  1193. _currentTween:Cancel()
  1194. _currentTween = nil
  1195. end
  1196. input.Changed:Connect(function()
  1197. if input.UserInputState == Enum.UserInputState.End then
  1198. _dragging = false
  1199. if _currentTween then
  1200. _currentTween:Cancel()
  1201. _currentTween = nil
  1202. end
  1203. end
  1204. end)
  1205. end
  1206. end)
  1207.  
  1208. _top.InputChanged:Connect(function(input)
  1209. if input.UserInputType == Enum.UserInputType.MouseMovement then
  1210. _dragInput = input
  1211. end
  1212. end)
  1213.  
  1214. _leftBar.InputBegan:Connect(function(input)
  1215. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1216. _leftDragging = true
  1217. _leftDragStart = input.Position
  1218. _leftStartPos = _leftBar.Position
  1219. if _leftCurrentTween then
  1220. _leftCurrentTween:Cancel()
  1221. _leftCurrentTween = nil
  1222. end
  1223. input.Changed:Connect(function()
  1224. if input.UserInputState == Enum.UserInputState.End then
  1225. _leftDragging = false
  1226. if _leftCurrentTween then
  1227. _leftCurrentTween:Cancel()
  1228. _leftCurrentTween = nil
  1229. end
  1230. end
  1231. end)
  1232. end
  1233. end)
  1234.  
  1235. _leftBar.InputChanged:Connect(function(input)
  1236. if input.UserInputType == Enum.UserInputType.MouseMovement then
  1237. _leftDragInput = input
  1238. end
  1239. end)
  1240.  
  1241. _uis.InputChanged:Connect(function(input)
  1242. if input == _dragInput and _dragging then
  1243. local delta = input.Position - _dragStart
  1244. local targetPos = UDim2.new(
  1245. _startPos.X.Scale,
  1246. _startPos.X.Offset + delta.X,
  1247. _startPos.Y.Scale,
  1248. _startPos.Y.Offset + delta.Y
  1249. )
  1250. if _currentTween then
  1251. _currentTween:Cancel()
  1252. end
  1253. _currentTween = TweenService:Create(_mf, _dragTweenInfo, {Position = targetPos})
  1254. _currentTween:Play()
  1255. elseif input == _leftDragInput and _leftDragging then
  1256. local delta = input.Position - _leftDragStart
  1257. local targetPos = UDim2.new(
  1258. _leftStartPos.X.Scale,
  1259. _leftStartPos.X.Offset + delta.X,
  1260. _leftStartPos.Y.Scale,
  1261. _leftStartPos.Y.Offset + delta.Y
  1262. )
  1263. if _leftCurrentTween then
  1264. _leftCurrentTween:Cancel()
  1265. end
  1266. _leftCurrentTween = TweenService:Create(_leftBar, _dragTweenInfo, {Position = targetPos})
  1267. _leftCurrentTween:Play()
  1268. end
  1269. end)
  1270.  
  1271. _uis.InputBegan:Connect(function(input, gpe)
  1272. if gpe then
  1273. return
  1274. end
  1275. if input.KeyCode == Enum.KeyCode.P then
  1276. _visible = not _visible
  1277. _scrlfrm.Visible = _visible
  1278. _blurFrame.Visible = _visible
  1279. _topBar.Visible = _visible
  1280. _timebox.Visible = _visible
  1281. _executorbox.Visible = _visible
  1282. _fpsbox.Visible = _visible
  1283. _leftBar.Visible = _visible
  1284. _mf.Visible = _visible
  1285. playAnimations(_visible)
  1286. end
  1287. end)
  1288.  
  1289. local lib = {}
  1290.  
  1291. local function getTabFrame(tabName)
  1292. for i, tab in ipairs(tabIconsOrdered) do
  1293. if tab.name == tabName then
  1294. return tabFrames[i]
  1295. end
  1296. end
  1297. return nil
  1298. end
  1299.  
  1300. local function fadeInElement(gui)
  1301. local ti = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
  1302.  
  1303. local function recurse(obj)
  1304. if obj:IsA("Frame") or obj:IsA("ScrollingFrame") then
  1305. if obj.BackgroundTransparency == 1 and not obj:GetAttribute("NoFade") then
  1306. TweenService:Create(obj, ti, {BackgroundTransparency = 0}):Play()
  1307. end
  1308. end
  1309. if obj:IsA("TextLabel") or obj:IsA("TextButton") then
  1310. if obj.TextTransparency == 1 and not obj:GetAttribute("NoFade") then
  1311. TweenService:Create(obj, ti, {TextTransparency = 0}):Play()
  1312. end
  1313. end
  1314. if obj:IsA("ImageLabel") or obj:IsA("ImageButton") then
  1315. if obj.ImageTransparency == 1 and not obj:GetAttribute("NoFade") then
  1316. TweenService:Create(obj, ti, {ImageTransparency = 0}):Play()
  1317. end
  1318. end
  1319. for _, st in ipairs(obj:GetChildren()) do
  1320. if st:IsA("UIStroke") then
  1321. if st.Transparency == 1 and not st:GetAttribute("NoFade") then
  1322. TweenService:Create(st, ti, {Transparency = 0.5}):Play()
  1323. end
  1324. end
  1325. end
  1326. for _, child in ipairs(obj:GetChildren()) do
  1327. recurse(child)
  1328. end
  1329. end
  1330.  
  1331. recurse(gui)
  1332. end
  1333.  
  1334. local function createSection(tabName, side, sectionTitle, sizeType)
  1335. local tabFrame = getTabFrame(tabName)
  1336. if not tabFrame then return nil end
  1337.  
  1338. local columnName = side == "left" and "Left" or "Right"
  1339. local column = tabFrame.Columns:FindFirstChild(columnName)
  1340. if not column then return nil end
  1341.  
  1342. local sizes = {
  1343. LongBox = {Height = 200, ContentHeight = 170},
  1344. ShortBox = {Height = 100, ContentHeight = 100},
  1345. BigBox = {Height = 300, ContentHeight = 270},
  1346. SmallBox = {Height = 50, ContentHeight = 20}
  1347. }
  1348.  
  1349. local sizeConfig = sizes[sizeType] or {Height = 150, ContentHeight = 120}
  1350.  
  1351. local section = Instance.new("Frame")
  1352. section.Size = UDim2.new(1, 0, 0, sizeConfig.Height)
  1353. section.BackgroundColor3 = Color3.fromRGB(3, 3, 3)
  1354. section.BackgroundTransparency = 1
  1355. section.BorderSizePixel = 0
  1356. section.Parent = column
  1357.  
  1358. local gradient = Instance.new("UIGradient")
  1359. gradient.Color = ColorSequence.new({
  1360. ColorSequenceKeypoint.new(0, Color3.fromRGB(20, 20, 20)),
  1361. ColorSequenceKeypoint.new(1, config.accentcolor:Lerp(Color3.fromRGB(20, 20, 20), 0.7))
  1362. })
  1363. gradient.Rotation = 90
  1364. gradient.Transparency = NumberSequence.new({
  1365. NumberSequenceKeypoint.new(0, 0.8),
  1366. NumberSequenceKeypoint.new(1, 0.8)
  1367. })
  1368. gradient.Parent = section
  1369.  
  1370. local secCorner = Instance.new("UICorner")
  1371. secCorner.CornerRadius = UDim.new(0, 8)
  1372. secCorner.Parent = section
  1373.  
  1374. local secStroke = Instance.new("UIStroke")
  1375. secStroke.Color = config.accentcolor:Lerp(Color3.fromRGB(100, 100, 100), 0.5)
  1376. secStroke.Thickness = 1.5
  1377. secStroke.Transparency = 1
  1378. secStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  1379. secStroke.Parent = section
  1380.  
  1381. local title = Instance.new("TextLabel")
  1382. title.Size = UDim2.new(1, -10, 0, 20)
  1383. title.Position = UDim2.new(0, 5, 0, 5)
  1384. title.BackgroundTransparency = 1
  1385. title.Text = sectionTitle or ""
  1386. title.TextColor3 = Color3.new(1, 1, 1)
  1387. title.TextTransparency = 1
  1388. title.Font = Enum.Font.GothamBold
  1389. title.TextSize = 14
  1390. title.TextXAlignment = Enum.TextXAlignment.Left
  1391. title.Parent = section
  1392.  
  1393. local contentFrame = Instance.new("Frame")
  1394. contentFrame.Name = "Content"
  1395. contentFrame.Size = UDim2.new(1, -10, 0, sizeConfig.ContentHeight)
  1396. contentFrame.Position = UDim2.new(0, 5, 0, 30)
  1397. contentFrame.BackgroundTransparency = 1
  1398. contentFrame.BorderSizePixel = 0
  1399. contentFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  1400. contentFrame.Parent = section
  1401. contentFrame:SetAttribute("NoFade", true)
  1402.  
  1403. local contList = Instance.new("UIListLayout")
  1404. contList.SortOrder = Enum.SortOrder.LayoutOrder
  1405. contList.Padding = UDim.new(0, 8)
  1406. contList.Parent = contentFrame
  1407.  
  1408. local contPad = Instance.new("UIPadding")
  1409. contPad.PaddingLeft = UDim.new(0, 5)
  1410. contPad.PaddingRight = UDim.new(0, 5)
  1411. contPad.PaddingTop = UDim.new(0, 5)
  1412. contPad.PaddingBottom = UDim.new(0, 5)
  1413. contPad.Parent = contentFrame
  1414.  
  1415. fadeInElement(section)
  1416.  
  1417. return contentFrame
  1418. end
  1419.  
  1420. function lib:CreateLeftLongBox(tabName, sectionTitle)
  1421. return createSection(tabName, "left", sectionTitle, "LongBox")
  1422. end
  1423.  
  1424. function lib:CreateRightLongBox(tabName, sectionTitle)
  1425. return createSection(tabName, "right", sectionTitle, "LongBox")
  1426. end
  1427.  
  1428. function lib:CreateLeftShortBox(tabName, sectionTitle)
  1429. return createSection(tabName, "left", sectionTitle, "ShortBox")
  1430. end
  1431.  
  1432. function lib:CreateRightShortBox(tabName, sectionTitle)
  1433. return createSection(tabName, "right", sectionTitle, "ShortBox")
  1434. end
  1435.  
  1436. function lib:CreateLeftBigBox(tabName, sectionTitle)
  1437. return createSection(tabName, "left", sectionTitle, "BigBox")
  1438. end
  1439.  
  1440. function lib:CreateRightBigBox(tabName, sectionTitle)
  1441. return createSection(tabName, "right", sectionTitle, "BigBox")
  1442. end
  1443.  
  1444. function lib:CreateLeftSmallBox(tabName, sectionTitle)
  1445. return createSection(tabName, "left", sectionTitle, "SmallBox")
  1446. end
  1447.  
  1448. function lib:CreateRightSmallBox(tabName, sectionTitle)
  1449. return createSection(tabName, "right", sectionTitle, "SmallBox")
  1450. end
  1451.  
  1452. function lib:CreateToggle(parent, toggleText, default, callback)
  1453. local toggleFrame = Instance.new("Frame")
  1454. toggleFrame.Size = UDim2.new(1, -10, 0, 32)
  1455. toggleFrame.BackgroundTransparency = 1
  1456. toggleFrame.Parent = parent
  1457.  
  1458. local gradient = Instance.new("UIGradient")
  1459. gradient.Color = ColorSequence.new({
  1460. ColorSequenceKeypoint.new(0, Color3.fromRGB(20, 20, 20)),
  1461. ColorSequenceKeypoint.new(1, config.accentcolor:Lerp(Color3.fromRGB(20, 20, 20), 0.7))
  1462. })
  1463. gradient.Rotation = 90
  1464. gradient.Parent = toggleFrame
  1465.  
  1466. local togCorner = Instance.new("UICorner")
  1467. togCorner.CornerRadius = UDim.new(0, 8)
  1468. togCorner.Parent = toggleFrame
  1469.  
  1470. local togStroke = Instance.new("UIStroke")
  1471. togStroke.Color = config.accentcolor:Lerp(Color3.fromRGB(80, 80, 80), 0.6)
  1472. togStroke.Thickness = 1
  1473. togStroke.Transparency = 1
  1474. togStroke.Parent = toggleFrame
  1475.  
  1476. local switchBg = Instance.new("Frame")
  1477. switchBg.Size = UDim2.new(0, 46, 0, 24)
  1478. switchBg.Position = UDim2.new(1, -56, 0.5, -12)
  1479. switchBg.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
  1480. switchBg.BorderSizePixel = 0
  1481. switchBg.Parent = toggleFrame
  1482.  
  1483. local switchCorner = Instance.new("UICorner")
  1484. switchCorner.CornerRadius = UDim.new(1, 0)
  1485. switchCorner.Parent = switchBg
  1486.  
  1487. local switchStroke = Instance.new("UIStroke")
  1488. switchStroke.Color = Color3.fromRGB(60, 60, 60)
  1489. switchStroke.Thickness = 1
  1490. switchStroke.Parent = switchBg
  1491.  
  1492. local knob = Instance.new("Frame")
  1493. knob.Size = UDim2.new(0, 20, 0, 20)
  1494. knob.Position = UDim2.new(0, 2, 0.5, -10)
  1495. knob.BackgroundColor3 = Color3.fromRGB(220, 220, 220)
  1496. knob.BorderSizePixel = 0
  1497. knob.Parent = switchBg
  1498.  
  1499. local knobCorner = Instance.new("UICorner")
  1500. knobCorner.CornerRadius = UDim.new(1, 0)
  1501. knobCorner.Parent = knob
  1502.  
  1503. local textLab = Instance.new("TextLabel")
  1504. textLab.Size = UDim2.new(1, -70, 1, 0)
  1505. textLab.Position = UDim2.new(0, 8, 0, 0)
  1506. textLab.BackgroundTransparency = 1
  1507. textLab.Text = toggleText
  1508. textLab.TextColor3 = Color3.new(1, 1, 1)
  1509. textLab.TextTransparency = 1
  1510. textLab.Font = Enum.Font.Gotham
  1511. textLab.TextSize = 14
  1512. textLab.TextXAlignment = Enum.TextXAlignment.Left
  1513. textLab.Parent = toggleFrame
  1514.  
  1515. local button = Instance.new("TextButton")
  1516. button.Size = UDim2.new(1, 0, 1, 0)
  1517. button.BackgroundTransparency = 1
  1518. button.Text = ""
  1519. button.Parent = toggleFrame
  1520.  
  1521. local state = default or false
  1522.  
  1523. local function updateToggle(instant)
  1524. local ti = instant and TweenInfo.new(0) or TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out)
  1525.  
  1526. if state then
  1527. TweenService:Create(switchBg, ti, {BackgroundColor3 = config.accentcolor}):Play()
  1528. TweenService:Create(knob, ti, {Position = UDim2.new(1, -22, 0.5, -10)}):Play()
  1529. TweenService:Create(knob, ti, {BackgroundColor3 = Color3.fromRGB(255, 255, 255)}):Play()
  1530. else
  1531. TweenService:Create(switchBg, ti, {BackgroundColor3 = Color3.fromRGB(35, 35, 35)}):Play()
  1532. TweenService:Create(knob, ti, {Position = UDim2.new(0, 2, 0.5, -10)}):Play()
  1533. TweenService:Create(knob, ti, {BackgroundColor3 = Color3.fromRGB(220, 220, 220)}):Play()
  1534. end
  1535.  
  1536. if callback then callback(state) end
  1537. end
  1538.  
  1539. updateToggle(true)
  1540.  
  1541. button.Activated:Connect(function()
  1542. state = not state
  1543. updateToggle()
  1544. end)
  1545.  
  1546. button.MouseEnter:Connect(function()
  1547. TweenService:Create(toggleFrame, TweenInfo.new(0.2), {BackgroundTransparency = 0.85}):Play()
  1548. end)
  1549. button.MouseLeave:Connect(function()
  1550. TweenService:Create(toggleFrame, TweenInfo.new(0.2), {BackgroundTransparency = 1}):Play()
  1551. end)
  1552.  
  1553. fadeInElement(toggleFrame)
  1554. return {
  1555. Element = toggleFrame,
  1556. Set = function(v)
  1557. state = v
  1558. updateToggle()
  1559. end
  1560. }
  1561. end
  1562.  
  1563. function lib:CreateButton(parent, buttonText, callback)
  1564. local buttonFrame = Instance.new("Frame")
  1565. buttonFrame.Size = UDim2.new(1, -10, 0, 32)
  1566. buttonFrame.BackgroundTransparency = 1
  1567. buttonFrame.Parent = parent
  1568.  
  1569. local gradient = Instance.new("UIGradient")
  1570. gradient.Color = ColorSequence.new({
  1571. ColorSequenceKeypoint.new(0, Color3.fromRGB(20, 20, 20)),
  1572. ColorSequenceKeypoint.new(1, config.accentcolor:Lerp(Color3.fromRGB(20, 20, 20), 0.7))
  1573. })
  1574. gradient.Rotation = 90
  1575. gradient.Parent = buttonFrame
  1576.  
  1577. local btnCorner = Instance.new("UICorner")
  1578. btnCorner.CornerRadius = UDim.new(0, 8)
  1579. btnCorner.Parent = buttonFrame
  1580.  
  1581. local btnStroke = Instance.new("UIStroke")
  1582. btnStroke.Color = config.accentcolor:Lerp(Color3.fromRGB(80, 80, 80), 0.6)
  1583. btnStroke.Thickness = 1
  1584. btnStroke.Transparency = 1
  1585. btnStroke.Parent = buttonFrame
  1586.  
  1587. local textLab = Instance.new("TextLabel")
  1588. textLab.Size = UDim2.new(1, -10, 1, 0)
  1589. textLab.Position = UDim2.new(0, 5, 0, 0)
  1590. textLab.BackgroundTransparency = 1
  1591. textLab.Text = buttonText
  1592. textLab.TextColor3 = Color3.new(1, 1, 1)
  1593. textLab.TextTransparency = 1
  1594. textLab.Font = Enum.Font.Gotham
  1595. textLab.TextSize = 14
  1596. textLab.TextXAlignment = Enum.TextXAlignment.Center
  1597. textLab.Parent = buttonFrame
  1598.  
  1599. local button = Instance.new("TextButton")
  1600. button.Size = UDim2.new(1, 0, 1, 0)
  1601. button.BackgroundTransparency = 1
  1602. button.Text = ""
  1603. button.Parent = buttonFrame
  1604.  
  1605. button.MouseEnter:Connect(function()
  1606. TweenService:Create(buttonFrame, TweenInfo.new(0.2), {BackgroundTransparency = 0.85}):Play()
  1607. end)
  1608. button.MouseLeave:Connect(function()
  1609. TweenService:Create(buttonFrame, TweenInfo.new(0.2), {BackgroundTransparency = 1}):Play()
  1610. end)
  1611.  
  1612. button.Activated:Connect(function()
  1613. if callback then
  1614. callback()
  1615. end
  1616. end)
  1617.  
  1618. fadeInElement(buttonFrame)
  1619. return {
  1620. Element = buttonFrame
  1621. }
  1622. end
  1623.  
  1624. function lib:CreateSlider(parent, sliderText, minValue, maxValue, defaultValue, callback)
  1625. local sliderFrame = Instance.new("Frame")
  1626. sliderFrame.Size = UDim2.new(1, -10, 0, 38)
  1627. sliderFrame.BackgroundTransparency = 1
  1628. sliderFrame.Parent = parent
  1629.  
  1630. local gradient = Instance.new("UIGradient")
  1631. gradient.Color = ColorSequence.new({
  1632. ColorSequenceKeypoint.new(0, Color3.fromRGB(20, 20, 20)),
  1633. ColorSequenceKeypoint.new(1, config.accentcolor:Lerp(Color3.fromRGB(20, 20, 20), 0.7))
  1634. })
  1635. gradient.Rotation = 90
  1636. gradient.Parent = sliderFrame
  1637.  
  1638. local sldCorner = Instance.new("UICorner")
  1639. sldCorner.CornerRadius = UDim.new(0, 8)
  1640. sldCorner.Parent = sliderFrame
  1641.  
  1642. local sldStroke = Instance.new("UIStroke")
  1643. sldStroke.Color = config.accentcolor:Lerp(Color3.fromRGB(80, 80, 80), 0.6)
  1644. sldStroke.Thickness = 1
  1645. sldStroke.Transparency = 1
  1646. sldStroke.Parent = sliderFrame
  1647.  
  1648. local textLab = Instance.new("TextLabel")
  1649. textLab.Size = UDim2.new(0.5, 0, 0, 20)
  1650. textLab.Position = UDim2.new(0, 8, 0, 0)
  1651. textLab.BackgroundTransparency = 1
  1652. textLab.Text = sliderText
  1653. textLab.TextColor3 = Color3.new(1, 1, 1)
  1654. textLab.TextTransparency = 1
  1655. textLab.Font = Enum.Font.Gotham
  1656. textLab.TextSize = 14
  1657. textLab.TextXAlignment = Enum.TextXAlignment.Left
  1658. textLab.Parent = sliderFrame
  1659.  
  1660. local valueLab = Instance.new("TextLabel")
  1661. valueLab.Size = UDim2.new(0, 40, 0, 20)
  1662. valueLab.Position = UDim2.new(1, -48, 0, 0)
  1663. valueLab.BackgroundTransparency = 1
  1664. valueLab.Text = tostring(defaultValue or minValue)
  1665. valueLab.TextColor3 = config.accentcolor
  1666. valueLab.TextTransparency = 1
  1667. valueLab.Font = Enum.Font.GothamBold
  1668. valueLab.TextSize = 14
  1669. valueLab.TextXAlignment = Enum.TextXAlignment.Right
  1670. valueLab.Parent = sliderFrame
  1671.  
  1672. local barBg = Instance.new("Frame")
  1673. barBg.Size = UDim2.new(1, -16, 0, 6)
  1674. barBg.Position = UDim2.new(0, 8, 0, 26)
  1675. barBg.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  1676. barBg.BorderSizePixel = 0
  1677. barBg.Parent = sliderFrame
  1678.  
  1679. local barCorner = Instance.new("UICorner")
  1680. barCorner.CornerRadius = UDim.new(0, 3)
  1681. barCorner.Parent = barBg
  1682.  
  1683. local fillBar = Instance.new("Frame")
  1684. fillBar.Size = UDim2.new(0, 0, 1, 0)
  1685. fillBar.BackgroundColor3 = config.accentcolor
  1686. fillBar.BorderSizePixel = 0
  1687. fillBar.Parent = barBg
  1688.  
  1689. local fillCorner = Instance.new("UICorner")
  1690. fillCorner.CornerRadius = UDim.new(0, 3)
  1691. fillCorner.Parent = fillBar
  1692.  
  1693. local knob = Instance.new("Frame")
  1694. knob.Size = UDim2.new(0, 14, 0, 14)
  1695. knob.Position = UDim2.new(0, 0, 0.5, -7)
  1696. knob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1697. knob.BorderSizePixel = 0
  1698. knob.ZIndex = 2
  1699. knob.Parent = barBg
  1700.  
  1701. local knobCorner = Instance.new("UICorner")
  1702. knobCorner.CornerRadius = UDim.new(1, 0)
  1703. knobCorner.Parent = knob
  1704.  
  1705. local knobStroke = Instance.new("UIStroke")
  1706. knobStroke.Color = config.accentcolor
  1707. knobStroke.Thickness = 2
  1708. knobStroke.Parent = knob
  1709.  
  1710. local button = Instance.new("TextButton")
  1711. button.Size = UDim2.new(1, 0, 1, 0)
  1712. button.BackgroundTransparency = 1
  1713. button.Text = ""
  1714. button.Parent = sliderFrame
  1715.  
  1716. local currentValue = defaultValue or minValue
  1717. local range = maxValue - minValue
  1718.  
  1719. local function updateSlider(value, noCallback)
  1720. currentValue = math.clamp(value, minValue, maxValue)
  1721. local ratio = (currentValue - minValue) / range
  1722.  
  1723. TweenService:Create(fillBar, TweenInfo.new(0.15, Enum.EasingStyle.Sine), {Size = UDim2.new(ratio, 0, 1, 0)}):Play()
  1724. TweenService:Create(knob, TweenInfo.new(0.15, Enum.EasingStyle.Sine), {Position = UDim2.new(ratio, -7, 0.5, -7)}):Play()
  1725.  
  1726. valueLab.Text = tostring(math.floor(currentValue))
  1727. if callback and not noCallback then
  1728. callback(currentValue)
  1729. end
  1730. end
  1731.  
  1732. updateSlider(currentValue, true)
  1733.  
  1734. local dragging = false
  1735. button.InputBegan:Connect(function(input)
  1736. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1737. dragging = true
  1738. local barPos = barBg.AbsolutePosition.X
  1739. local barWidth = barBg.AbsoluteSize.X
  1740. local ratio = math.clamp((input.Position.X - barPos) / barWidth, 0, 1)
  1741. updateSlider(minValue + ratio * range)
  1742. end
  1743. end)
  1744.  
  1745. button.InputEnded:Connect(function(input)
  1746. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1747. dragging = false
  1748. end
  1749. end)
  1750.  
  1751. _uis.InputChanged:Connect(function(input)
  1752. if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
  1753. local barPos = barBg.AbsolutePosition.X
  1754. local barWidth = barBg.AbsoluteSize.X
  1755. local ratio = math.clamp((input.Position.X - barPos) / barWidth, 0, 1)
  1756. updateSlider(minValue + ratio * range)
  1757. end
  1758. end)
  1759.  
  1760. fadeInElement(sliderFrame)
  1761.  
  1762. return {
  1763. Element = sliderFrame,
  1764. Set = function(newValue)
  1765. updateSlider(newValue)
  1766. end
  1767. }
  1768. end
  1769.  
  1770. return lib
  1771. end
  1772. return mys_custom_ui