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