Guest

wwwwwwrrrrrr

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