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