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