ToxicTheBoss

library

Feb 9th, 2020
229,366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 46.93 KB | None | 0 0
  1. --[[
  2. ______ _____ _ _ _____ _________ __
  3. | ____|_ _| \ | |_ _|__ __\ \ / /
  4. | |__ | | | \| | | | | | \ \_/ /
  5. | __| | | | . ` | | | | | \ /
  6. | | _| |_| |\ |_| |_ | | | |
  7. |_| |_____|_| \_|_____| |_| |_|
  8.  
  9. Source:
  10. https://d3to-finity.000webhostapp.com/files/source-0.1.2.txt
  11. Version:
  12. 0.1.4
  13. Date:
  14. January 18th, 2020
  15. Author:
  16. detourious @ v3rmillion.net
  17. deto#7612 @ discord.gg
  18.  
  19. --]]
  20.  
  21.  
  22. local finity = {}
  23. finity.gs = {}
  24.  
  25. finity.theme = { -- light
  26. main_container = Color3.fromRGB(249, 249, 255),
  27. separator_color = Color3.fromRGB(223, 219, 228),
  28.  
  29. text_color = Color3.fromRGB(96, 96, 96),
  30.  
  31. category_button_background = Color3.fromRGB(223, 219, 228),
  32. category_button_border = Color3.fromRGB(200, 196, 204),
  33.  
  34. checkbox_checked = Color3.fromRGB(114, 214, 112),
  35. checkbox_outer = Color3.fromRGB(198, 189, 202),
  36. checkbox_inner = Color3.fromRGB(249, 239, 255),
  37.  
  38. slider_color = Color3.fromRGB(114, 214, 112),
  39. slider_color_sliding = Color3.fromRGB(114, 214, 112),
  40. slider_background = Color3.fromRGB(198, 188, 202),
  41. slider_text = Color3.fromRGB(112, 112, 112),
  42.  
  43. textbox_background = Color3.fromRGB(198, 189, 202),
  44. textbox_background_hover = Color3.fromRGB(215, 206, 227),
  45. textbox_text = Color3.fromRGB(112, 112, 112),
  46. textbox_text_hover = Color3.fromRGB(50, 50, 50),
  47. textbox_placeholder = Color3.fromRGB(178, 178, 178),
  48.  
  49. dropdown_background = Color3.fromRGB(198, 189, 202),
  50. dropdown_text = Color3.fromRGB(112, 112, 112),
  51. dropdown_text_hover = Color3.fromRGB(50, 50, 50),
  52. dropdown_scrollbar_color = Color3.fromRGB(198, 189, 202),
  53.  
  54. button_background = Color3.fromRGB(198, 189, 202),
  55. button_background_hover = Color3.fromRGB(215, 206, 227),
  56. button_background_down = Color3.fromRGB(178, 169, 182),
  57.  
  58. scrollbar_color = Color3.fromRGB(198, 189, 202),
  59. }
  60.  
  61. finity.dark_theme = { -- dark
  62. main_container = Color3.fromRGB(32, 32, 33),
  63. separator_color = Color3.fromRGB(63, 63, 65),
  64.  
  65. text_color = Color3.fromRGB(206, 206, 206),
  66.  
  67. category_button_background = Color3.fromRGB(63, 62, 65),
  68. category_button_border = Color3.fromRGB(72, 71, 74),
  69.  
  70. checkbox_checked = Color3.fromRGB(132, 255, 130),
  71. checkbox_outer = Color3.fromRGB(84, 81, 86),
  72. checkbox_inner = Color3.fromRGB(132, 132, 136),
  73.  
  74. slider_color = Color3.fromRGB(177, 177, 177),
  75. slider_color_sliding = Color3.fromRGB(132, 255, 130),
  76. slider_background = Color3.fromRGB(88, 84, 90),
  77. slider_text = Color3.fromRGB(177, 177, 177),
  78.  
  79. textbox_background = Color3.fromRGB(103, 103, 106),
  80. textbox_background_hover = Color3.fromRGB(137, 137, 141),
  81. textbox_text = Color3.fromRGB(195, 195, 195),
  82. textbox_text_hover = Color3.fromRGB(232, 232, 232),
  83. textbox_placeholder = Color3.fromRGB(135, 135, 138),
  84.  
  85. dropdown_background = Color3.fromRGB(88, 88, 91),
  86. dropdown_text = Color3.fromRGB(195, 195, 195),
  87. dropdown_text_hover = Color3.fromRGB(232, 232, 232),
  88. dropdown_scrollbar_color = Color3.fromRGB(118, 118, 121),
  89.  
  90. button_background = Color3.fromRGB(103, 103, 106),
  91. button_background_hover = Color3.fromRGB(137, 137, 141),
  92. button_background_down = Color3.fromRGB(70, 70, 81),
  93.  
  94. scrollbar_color = Color3.fromRGB(118, 118, 121),
  95. }
  96.  
  97. setmetatable(finity.gs, {
  98. __index = function(_, service)
  99. return game:GetService(service)
  100. end,
  101. __newindex = function(t, i)
  102. t[i] = nil
  103. return
  104. end
  105. })
  106.  
  107.  
  108. local mouse = finity.gs["Players"].LocalPlayer:GetMouse()
  109.  
  110. function finity:Create(class, properties)
  111. local object = Instance.new(class)
  112.  
  113. for prop, val in next, properties do
  114. if object[prop] and prop ~= "Parent" then
  115. object[prop] = val
  116. end
  117. end
  118.  
  119. return object
  120. end
  121.  
  122. function finity:addShadow(object, transparency)
  123. local shadow = self:Create("ImageLabel", {
  124. Name = "Shadow",
  125. AnchorPoint = Vector2.new(0.5, 0.5),
  126. BackgroundTransparency = 1,
  127. Position = UDim2.new(0.5, 0, 0.5, 4),
  128. Size = UDim2.new(1, 6, 1, 6),
  129. Image = "rbxassetid://1316045217",
  130. ImageTransparency = transparency and true or 0.5,
  131. ImageColor3 = Color3.fromRGB(35, 35, 35),
  132. ScaleType = Enum.ScaleType.Slice,
  133. SliceCenter = Rect.new(10, 10, 118, 118)
  134. })
  135.  
  136. shadow.Parent = object
  137. end
  138.  
  139. function finity.new(isdark, gprojectName, thinProject)
  140. local finityObject = {}
  141. local self2 = finityObject
  142. local self = finity
  143.  
  144. if not finity.gs["RunService"]:IsStudio() and self.gs["CoreGui"]:FindFirstChild("FinityUI") then
  145. warn("finity:", "instance already exists in coregui!")
  146.  
  147. return
  148. end
  149.  
  150. local theme = finity.theme
  151. local projectName = false
  152. local thinMenu = false
  153.  
  154. if isdark == true then theme = finity.dark_theme end
  155. if gprojectName then projectName = gprojectName end
  156. if thinProject then thinMenu = thinProject end
  157.  
  158. local toggled = true
  159. local typing = false
  160. local firstCategory = true
  161. local savedposition = UDim2.new(0.5, 0, 0.5, 0)
  162.  
  163.  
  164. local finityData
  165. finityData = {
  166. UpConnection = nil,
  167. ToggleKey = Enum.KeyCode.Home,
  168. }
  169.  
  170. self2.ChangeToggleKey = function(NewKey)
  171. finityData.ToggleKey = NewKey
  172.  
  173. if not projectName then
  174. self2.tip.Text = "Press '".. string.sub(tostring(NewKey), 14) .."' to hide this menu"
  175. end
  176.  
  177. if finityData.UpConnection then
  178. finityData.UpConnection:Disconnect()
  179. end
  180.  
  181. finityData.UpConnection = finity.gs["UserInputService"].InputEnded:Connect(function(Input)
  182. if Input.KeyCode == finityData.ToggleKey and not typing then
  183. toggled = not toggled
  184.  
  185. pcall(function() self2.modal.Modal = toggled end)
  186.  
  187. if toggled then
  188. pcall(self2.container.TweenPosition, self2.container, savedposition, "Out", "Sine", 0.5, true)
  189. else
  190. savedposition = self2.container.Position;
  191. pcall(self2.container.TweenPosition, self2.container, UDim2.new(savedposition.Width.Scale, savedposition.Width.Offset, 1.5, 0), "Out", "Sine", 0.5, true)
  192. end
  193. end
  194. end)
  195. end
  196.  
  197. self2.ChangeBackgroundImage = function(ImageID, Transparency)
  198. self2.container.Image = ImageID
  199.  
  200. if Transparency then
  201. self2.container.ImageTransparency = Transparency
  202. else
  203. self2.container.ImageTransparency = 0.8
  204. end
  205. end
  206.  
  207. finityData.UpConnection = finity.gs["UserInputService"].InputEnded:Connect(function(Input)
  208. if Input.KeyCode == finityData.ToggleKey and not typing then
  209. toggled = not toggled
  210.  
  211. if toggled then
  212. self2.container:TweenPosition(UDim2.new(0.5, 0, 0.5, 0), "Out", "Sine", 0.5, true)
  213. else
  214. self2.container:TweenPosition(UDim2.new(0.5, 0, 1.5, 0), "Out", "Sine", 0.5, true)
  215. end
  216. end
  217. end)
  218.  
  219. self2.userinterface = self:Create("ScreenGui", {
  220. Name = "FinityUI",
  221. ZIndexBehavior = Enum.ZIndexBehavior.Global,
  222. ResetOnSpawn = false,
  223. })
  224.  
  225. self2.container = self:Create("ImageLabel", {
  226. Draggable = true,
  227. Active = true,
  228. Name = "Container",
  229. AnchorPoint = Vector2.new(0.5, 0.5),
  230. BackgroundTransparency = 0,
  231. BackgroundColor3 = theme.main_container,
  232. BorderSizePixel = 0,
  233. Position = UDim2.new(0.5, 0, 0.5, 0),
  234. Size = UDim2.new(0, 800, 0, 500),
  235. ZIndex = 2,
  236. ImageTransparency = 1
  237. })
  238.  
  239. self2.modal = self:Create("TextButton", {
  240. Text = "";
  241. Transparency = 1;
  242. Modal = true;
  243. }) self2.modal.Parent = self2.userinterface;
  244.  
  245. if thinProject and typeof(thinProject) == "UDim2" then
  246. self2.container.Size = thinProject
  247. end
  248.  
  249. self2.container.Draggable = true
  250. self2.container.Active = true
  251.  
  252. self2.sidebar = self:Create("Frame", {
  253. Name = "Sidebar",
  254. BackgroundColor3 = Color3.new(0.976471, 0.937255, 1),
  255. BackgroundTransparency = 1,
  256. BorderColor3 = Color3.new(0.745098, 0.713726, 0.760784),
  257. Size = UDim2.new(0, 120, 1, -30),
  258. Position = UDim2.new(0, 0, 0, 30),
  259. ZIndex = 2,
  260. })
  261.  
  262. self2.categories = self:Create("Frame", {
  263. Name = "Categories",
  264. BackgroundColor3 = Color3.new(0.976471, 0.937255, 1),
  265. ClipsDescendants = true,
  266. BackgroundTransparency = 1,
  267. BorderColor3 = Color3.new(0.745098, 0.713726, 0.760784),
  268. Size = UDim2.new(1, -120, 1, -30),
  269. AnchorPoint = Vector2.new(1, 0),
  270. Position = UDim2.new(1, 0, 0, 30),
  271. ZIndex = 2,
  272. })
  273. self2.categories.ClipsDescendants = true
  274.  
  275. self2.topbar = self:Create("Frame", {
  276. Name = "Topbar",
  277. ZIndex = 2,
  278. Size = UDim2.new(1,0,0,30),
  279. BackgroundTransparency = 2
  280. })
  281.  
  282. self2.tip = self:Create("TextLabel", {
  283. Name = "TopbarTip",
  284. ZIndex = 2,
  285. Size = UDim2.new(1, -30, 0, 30),
  286. Position = UDim2.new(0, 30, 0, 0),
  287. Text = "Press '".. string.sub(tostring(self.ToggleKey), 14) .."' to hide this menu",
  288. Font = Enum.Font.GothamSemibold,
  289. TextSize = 13,
  290. TextXAlignment = Enum.TextXAlignment.Left,
  291. BackgroundTransparency = 1,
  292. TextColor3 = theme.text_color,
  293. })
  294.  
  295. if projectName then
  296. self2.tip.Text = projectName
  297. else
  298. self2.tip.Text = "Press '".. string.sub(tostring(self.ToggleKey), 14) .."' to hide this menu"
  299. end
  300.  
  301. local separator = self:Create("Frame", {
  302. Name = "Separator",
  303. BackgroundColor3 = theme.separator_color,
  304. BorderSizePixel = 0,
  305. Position = UDim2.new(0, 118, 0, 30),
  306. Size = UDim2.new(0, 1, 1, -30),
  307. ZIndex = 6,
  308. })
  309. separator.Parent = self2.container
  310. separator = nil
  311.  
  312. local separator = self:Create("Frame", {
  313. Name = "Separator",
  314. BackgroundColor3 = theme.separator_color,
  315. BorderSizePixel = 0,
  316. Position = UDim2.new(0, 0, 0, 30),
  317. Size = UDim2.new(1, 0, 0, 1),
  318. ZIndex = 6,
  319. })
  320. separator.Parent = self2.container
  321. separator = nil
  322.  
  323. local uipagelayout = self:Create("UIPageLayout", {
  324. Padding = UDim.new(0, 10),
  325. FillDirection = Enum.FillDirection.Vertical,
  326. TweenTime = 0.7,
  327. EasingStyle = Enum.EasingStyle.Quad,
  328. EasingDirection = Enum.EasingDirection.InOut,
  329. SortOrder = Enum.SortOrder.LayoutOrder,
  330. })
  331. uipagelayout.Parent = self2.categories
  332. uipagelayout = nil
  333.  
  334. local uipadding = self:Create("UIPadding", {
  335. PaddingTop = UDim.new(0, 3),
  336. PaddingLeft = UDim.new(0, 2)
  337. })
  338. uipadding.Parent = self2.sidebar
  339. uipadding = nil
  340.  
  341. local uilistlayout = self:Create("UIListLayout", {
  342. SortOrder = Enum.SortOrder.LayoutOrder
  343. })
  344. uilistlayout.Parent = self2.sidebar
  345. uilistlayout = nil
  346.  
  347. function self2:Category(name)
  348. local category = {}
  349.  
  350. category.button = finity:Create("TextButton", {
  351. Name = name,
  352. BackgroundColor3 = theme.category_button_background,
  353. BackgroundTransparency = 1,
  354. BorderMode = Enum.BorderMode.Inset,
  355. BorderColor3 = theme.category_button_border,
  356. Size = UDim2.new(1, -4, 0, 25),
  357. ZIndex = 2,
  358. AutoButtonColor = false,
  359. Font = Enum.Font.GothamSemibold,
  360. Text = name,
  361. TextColor3 = theme.text_color,
  362. TextSize = 14
  363. })
  364.  
  365. category.container = finity:Create("ScrollingFrame", {
  366. Name = name,
  367. BackgroundTransparency = 1,
  368. ScrollBarThickness = 4,
  369. BorderSizePixel = 0,
  370. Size = UDim2.new(1, 0, 1, 0),
  371. ZIndex = 2,
  372. CanvasSize = UDim2.new(0, 0, 0, 0),
  373. ScrollBarImageColor3 = theme.scrollbar_color or Color3.fromRGB(118, 118, 121),
  374. BottomImage = "rbxassetid://967852042",
  375. MidImage = "rbxassetid://967852042",
  376. TopImage = "rbxassetid://967852042",
  377. ScrollBarImageTransparency = 1 --
  378. })
  379.  
  380. category.hider = finity:Create("Frame", {
  381. Name = "Hider",
  382. BackgroundTransparency = 0, --
  383. BorderSizePixel = 0,
  384. BackgroundColor3 = theme.main_container,
  385. Size = UDim2.new(1, 0, 1, 0),
  386. ZIndex = 5
  387. })
  388.  
  389. category.L = finity:Create("Frame", {
  390. Name = "L",
  391. BackgroundColor3 = Color3.new(1, 1, 1),
  392. BackgroundTransparency = 1,
  393. Position = UDim2.new(0, 10, 0, 3),
  394. Size = UDim2.new(0.5, -20, 1, -3),
  395. ZIndex = 2
  396. })
  397.  
  398. if not thinProject then
  399. category.R = finity:Create("Frame", {
  400. Name = "R",
  401. AnchorPoint = Vector2.new(1, 0),
  402. BackgroundColor3 = Color3.new(1, 1, 1),
  403. BackgroundTransparency = 1,
  404. Position = UDim2.new(1, -10, 0, 3),
  405. Size = UDim2.new(0.5, -20, 1, -3),
  406. ZIndex = 2
  407. })
  408. end
  409.  
  410. if thinProject then
  411. category.L.Size = UDim2.new(1, -20, 1, -3)
  412. end
  413.  
  414. if firstCategory then
  415. finity.gs["TweenService"]:Create(category.hider, TweenInfo.new(0.3), {BackgroundTransparency = 1}):Play()
  416. finity.gs["TweenService"]:Create(category.container, TweenInfo.new(0.3), {ScrollBarImageTransparency = 0}):Play()
  417. end
  418.  
  419. do
  420. local uilistlayout = finity:Create("UIListLayout", {
  421. SortOrder = Enum.SortOrder.LayoutOrder
  422. })
  423.  
  424. local uilistlayout2 = finity:Create("UIListLayout", {
  425. SortOrder = Enum.SortOrder.LayoutOrder
  426. })
  427.  
  428. local function computeSizeChange()
  429. local largestListSize = 0
  430.  
  431. largestListSize = uilistlayout.AbsoluteContentSize.Y
  432.  
  433. if uilistlayout2.AbsoluteContentSize.Y > largestListSize then
  434. largestListSize = largestListSize
  435. end
  436.  
  437. category.container.CanvasSize = UDim2.new(0, 0, 0, largestListSize + 5)
  438. end
  439.  
  440. uilistlayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(computeSizeChange)
  441. uilistlayout2:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(computeSizeChange)
  442.  
  443. uilistlayout.Parent = category.L
  444. uilistlayout2.Parent = category.R
  445. end
  446.  
  447. category.button.MouseEnter:Connect(function()
  448. finity.gs["TweenService"]:Create(category.button, TweenInfo.new(0.2), {BackgroundTransparency = 0.5}):Play()
  449. end)
  450. category.button.MouseLeave:Connect(function()
  451. finity.gs["TweenService"]:Create(category.button, TweenInfo.new(0.2), {BackgroundTransparency = 1}):Play()
  452. end)
  453. category.button.MouseButton1Down:Connect(function()
  454. for _, categoryf in next, self2.userinterface["Container"]["Categories"]:GetChildren() do
  455. if categoryf:IsA("ScrollingFrame") then
  456. if categoryf ~= category.container then
  457. finity.gs["TweenService"]:Create(categoryf.Hider, TweenInfo.new(0.3), {BackgroundTransparency = 0}):Play()
  458. finity.gs["TweenService"]:Create(categoryf, TweenInfo.new(0.3), {ScrollBarImageTransparency = 1}):Play()
  459. end
  460. end
  461. end
  462.  
  463. finity.gs["TweenService"]:Create(category.button, TweenInfo.new(0.2), {BackgroundTransparency = 0.2}):Play()
  464. finity.gs["TweenService"]:Create(category.hider, TweenInfo.new(0.3), {BackgroundTransparency = 1}):Play()
  465. finity.gs["TweenService"]:Create(category.container, TweenInfo.new(0.3), {ScrollBarImageTransparency = 0}):Play()
  466.  
  467. self2.categories["UIPageLayout"]:JumpTo(category.container)
  468. end)
  469. category.button.MouseButton1Up:Connect(function()
  470. finity.gs["TweenService"]:Create(category.button, TweenInfo.new(0.2), {BackgroundTransparency = 1}):Play()
  471. end)
  472.  
  473. category.container.Parent = self2.categories
  474. category.button.Parent = self2.sidebar
  475.  
  476. if not thinProject then
  477. category.R.Parent = category.container
  478. end
  479.  
  480. category.L.Parent = category.container
  481. category.hider.Parent = category.container
  482.  
  483. local function calculateSector()
  484. if thinProject then
  485. return "L"
  486. end
  487.  
  488. local R = #category.R:GetChildren() - 1
  489. local L = #category.L:GetChildren() - 1
  490.  
  491. if L > R then
  492. return "R"
  493. else
  494. return "L"
  495. end
  496. end
  497.  
  498. function category:Sector(name)
  499. local sector = {}
  500.  
  501. sector.frame = finity:Create("Frame", {
  502. Name = name,
  503. BackgroundColor3 = Color3.new(1, 1, 1),
  504. BackgroundTransparency = 1,
  505. Size = UDim2.new(1, 0, 0, 25),
  506. ZIndex = 2
  507. })
  508.  
  509. sector.container = finity:Create("Frame", {
  510. Name = "Container",
  511. BackgroundColor3 = Color3.new(1, 1, 1),
  512. BackgroundTransparency = 1,
  513. Position = UDim2.new(0, 0, 0, 22),
  514. Size = UDim2.new(1, -5, 1, -30),
  515. ZIndex = 2
  516. })
  517.  
  518. sector.title = finity:Create("TextLabel", {
  519. Name = "Title",
  520. Text = name,
  521. BackgroundColor3 = Color3.new(1, 1, 1),
  522. BackgroundTransparency = 1,
  523. Size = UDim2.new(1, -5, 0, 25),
  524. ZIndex = 2,
  525. Font = Enum.Font.GothamSemibold,
  526. TextColor3 = theme.text_color,
  527. TextSize = 14,
  528. TextXAlignment = Enum.TextXAlignment.Left,
  529. })
  530.  
  531. local uilistlayout = finity:Create("UIListLayout", {
  532. SortOrder = Enum.SortOrder.LayoutOrder
  533. })
  534.  
  535. uilistlayout.Changed:Connect(function()
  536. pcall(function()
  537. sector.frame.Size = UDim2.new(1, 0, 0, sector.container["UIListLayout"].AbsoluteContentSize.Y + 25)
  538. sector.container.Size = UDim2.new(1, 0, 0, sector.container["UIListLayout"].AbsoluteContentSize.Y)
  539. end)
  540. end)
  541. uilistlayout.Parent = sector.container
  542. uilistlayout = nil
  543.  
  544. function sector:Cheat(kind, name, callback, data)
  545. local cheat = {}
  546. cheat.value = nil
  547.  
  548. cheat.frame = finity:Create("Frame", {
  549. Name = name,
  550. BackgroundColor3 = Color3.new(1, 1, 1),
  551. BackgroundTransparency = 1,
  552. Size = UDim2.new(1, 0, 0, 25),
  553. ZIndex = 2,
  554. })
  555.  
  556. cheat.label = finity:Create("TextLabel", {
  557. Name = "Title",
  558. BackgroundColor3 = Color3.new(1, 1, 1),
  559. BackgroundTransparency = 1,
  560. Size = UDim2.new(1, 0, 1, 0),
  561. ZIndex = 2,
  562. Font = Enum.Font.Gotham,
  563. TextColor3 = theme.text_color,
  564. TextSize = 13,
  565. Text = name,
  566. TextXAlignment = Enum.TextXAlignment.Left
  567. })
  568.  
  569. cheat.container = finity:Create("Frame", {
  570. Name = "Container",
  571. AnchorPoint = Vector2.new(1, 0.5),
  572. BackgroundColor3 = Color3.new(1, 1, 1),
  573. BackgroundTransparency = 1,
  574. Position = UDim2.new(1, 0, 0.5, 0),
  575. Size = UDim2.new(0, 150, 0, 22),
  576. ZIndex = 2,
  577. })
  578.  
  579. if kind then
  580. if string.lower(kind) == "checkbox" or string.lower(kind) == "toggle" then
  581. if data then
  582. if data.enabled then
  583. cheat.value = true
  584. end
  585. end
  586.  
  587. cheat.checkbox = finity:Create("Frame", {
  588. Name = "Checkbox",
  589. AnchorPoint = Vector2.new(1, 0),
  590. BackgroundColor3 = Color3.new(1, 1, 1),
  591. BackgroundTransparency = 1,
  592. Position = UDim2.new(1, 0, 0, 0),
  593. Size = UDim2.new(0, 25, 0, 25),
  594. ZIndex = 2,
  595. })
  596.  
  597. cheat.outerbox = finity:Create("ImageLabel", {
  598. Name = "Outer",
  599. AnchorPoint = Vector2.new(1, 0.5),
  600. BackgroundColor3 = Color3.new(1, 1, 1),
  601. BackgroundTransparency = 1,
  602. Position = UDim2.new(1, 0, 0.5, 0),
  603. Size = UDim2.new(0, 20, 0, 20),
  604. ZIndex = 2,
  605. Image = "rbxassetid://3570695787",
  606. ImageColor3 = theme.checkbox_outer,
  607. ScaleType = Enum.ScaleType.Slice,
  608. SliceCenter = Rect.new(100, 100, 100, 100),
  609. SliceScale = 0.06,
  610. })
  611.  
  612. cheat.checkboxbutton = finity:Create("ImageButton", {
  613. AnchorPoint = Vector2.new(0.5, 0.5),
  614. Name = "CheckboxButton",
  615. BackgroundColor3 = Color3.new(1, 1, 1),
  616. BackgroundTransparency = 1,
  617. Position = UDim2.new(0.5, 0, 0.5, 0),
  618. Size = UDim2.new(0, 14, 0, 14),
  619. ZIndex = 2,
  620. Image = "rbxassetid://3570695787",
  621. ImageColor3 = theme.checkbox_inner,
  622. ScaleType = Enum.ScaleType.Slice,
  623. SliceCenter = Rect.new(100, 100, 100, 100),
  624. SliceScale = 0.04
  625. })
  626.  
  627. if data then
  628. if data.enabled then
  629. finity.gs["TweenService"]:Create(cheat.outerbox, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_checked}):Play()
  630. finity.gs["TweenService"]:Create(cheat.checkboxbutton, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_checked}):Play()
  631. end
  632. end
  633.  
  634. cheat.checkboxbutton.MouseEnter:Connect(function()
  635. local lightertheme = Color3.fromRGB((theme.checkbox_outer.R * 255) + 20, (theme.checkbox_outer.G * 255) + 20, (theme.checkbox_outer.B * 255) + 20)
  636. finity.gs["TweenService"]:Create(cheat.outerbox, TweenInfo.new(0.2), {ImageColor3 = lightertheme}):Play()
  637. end)
  638. cheat.checkboxbutton.MouseLeave:Connect(function()
  639. if not cheat.value then
  640. finity.gs["TweenService"]:Create(cheat.outerbox, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_outer}):Play()
  641. else
  642. finity.gs["TweenService"]:Create(cheat.outerbox, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_checked}):Play()
  643. end
  644. end)
  645. cheat.checkboxbutton.MouseButton1Down:Connect(function()
  646. if cheat.value then
  647. finity.gs["TweenService"]:Create(cheat.checkboxbutton, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_outer}):Play()
  648. else
  649. finity.gs["TweenService"]:Create(cheat.checkboxbutton, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_checked}):Play()
  650. end
  651. end)
  652. cheat.checkboxbutton.MouseButton1Up:Connect(function()
  653. cheat.value = not cheat.value
  654.  
  655. if callback then
  656. local s, e = pcall(function()
  657. callback(cheat.value)
  658. end)
  659.  
  660. if not s then warn("error: ".. e) end
  661. end
  662.  
  663. if cheat.value then
  664. finity.gs["TweenService"]:Create(cheat.outerbox, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_checked}):Play()
  665. else
  666. finity.gs["TweenService"]:Create(cheat.outerbox, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_outer}):Play()
  667. finity.gs["TweenService"]:Create(cheat.checkboxbutton, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_inner}):Play()
  668. end
  669. end)
  670.  
  671. cheat.checkboxbutton.Parent = cheat.outerbox
  672. cheat.outerbox.Parent = cheat.container
  673. elseif string.lower(kind) == "color" or string.lower(kind) == "colorpicker" then
  674. cheat.value = Color3.new(1, 1, 1);
  675.  
  676. if data then
  677. if data.color then
  678. cheat.value = data.color
  679. end
  680. end
  681.  
  682. local hsvimage = "rbxassetid://4613607014"
  683. local lumienceimage = "rbxassetid://4613627894"
  684.  
  685. cheat.hsvbar = finity:Create("ImageButton", {
  686. AnchorPoint = Vector2.new(0.5, 0.5),
  687. Name = "HSVBar",
  688. BackgroundColor3 = Color3.new(1, 1, 1),
  689. BackgroundTransparency = 1,
  690. Position = UDim2.new(0.5, 0, 0.5, 0),
  691. Size = UDim2.new(1, 0, 0, 6),
  692. ZIndex = 2,
  693. Image = hsvimage
  694. })
  695.  
  696. cheat.arrowpreview = finity:Create("ImageLabel", {
  697. Name = "ArrowPreview",
  698. BackgroundColor3 = Color3.new(1, 1, 1),
  699. BackgroundTransparency = 1,
  700. ImageTransparency = 0.25,
  701. Position = UDim2.new(0.5, 0, 0.5, -6),
  702. Size = UDim2.new(0, 6, 0, 6),
  703. ZIndex = 3,
  704. Image = "rbxassetid://2500573769",
  705. Rotation = -90
  706. })
  707.  
  708. cheat.hsvbar.MouseButton1Down:Connect(function()
  709. local rs = finity.gs["RunService"]
  710. local uis = finity.gs["UserInputService"]local last = cheat.value;
  711.  
  712. cheat.hsvbar.Image = hsvimage
  713.  
  714. while uis:IsMouseButtonPressed'MouseButton1' do
  715. local mouseloc = uis:GetMouseLocation()
  716. local sx = cheat.arrowpreview.AbsoluteSize.X / 2;
  717. local offset = (mouseloc.x - cheat.hsvbar.AbsolutePosition.X) - sx
  718. local scale = offset / cheat.hsvbar.AbsoluteSize.X
  719. local position = math.clamp(offset, -sx, cheat.hsvbar.AbsoluteSize.X - sx) / cheat.hsvbar.AbsoluteSize.X
  720.  
  721. finity.gs["TweenService"]:Create(cheat.arrowpreview, TweenInfo.new(0.1), {Position = UDim2.new(position, 0, 0.5, -6)}):Play()
  722.  
  723. cheat.value = Color3.fromHSV(math.clamp(scale, 0, 1), 1, 1)
  724.  
  725. if cheat.value ~= last then
  726. last = cheat.value
  727.  
  728. if callback then
  729. local s, e = pcall(function()
  730. callback(cheat.value)
  731. end)
  732.  
  733. if not s then warn("error: ".. e) end
  734. end
  735. end
  736.  
  737. rs.RenderStepped:wait()
  738. end
  739. end)
  740. cheat.hsvbar.MouseButton2Down:Connect(function()
  741. local rs = finity.gs["RunService"]
  742. local uis = finity.gs["UserInputService"]
  743. local last = cheat.value;
  744.  
  745. cheat.hsvbar.Image = lumienceimage
  746.  
  747. while uis:IsMouseButtonPressed'MouseButton2' do
  748. local mouseloc = uis:GetMouseLocation()
  749. local sx = cheat.arrowpreview.AbsoluteSize.X / 2
  750. local offset = (mouseloc.x - cheat.hsvbar.AbsolutePosition.X) - sx
  751. local scale = offset / cheat.hsvbar.AbsoluteSize.X
  752. local position = math.clamp(offset, -sx, cheat.hsvbar.AbsoluteSize.X - sx) / cheat.hsvbar.AbsoluteSize.X
  753.  
  754. finity.gs["TweenService"]:Create(cheat.arrowpreview, TweenInfo.new(0.1), {Position = UDim2.new(position, 0, 0.5, -6)}):Play()
  755.  
  756. cheat.value = Color3.fromHSV(1, 0, 1 - math.clamp(scale, 0, 1))
  757.  
  758. if cheat.value ~= last then
  759. last = cheat.value
  760.  
  761. if callback then
  762. local s, e = pcall(function()
  763. callback(cheat.value)
  764. end)
  765.  
  766. if not s then warn("error: ".. e) end
  767. end
  768. end
  769.  
  770. rs.RenderStepped:wait()
  771. end
  772. end)
  773.  
  774. cheat.hsvbar.Parent = cheat.container
  775. cheat.arrowpreview.Parent = cheat.hsvbar
  776. elseif string.lower(kind) == "dropdown" then
  777. if data then
  778. if data.default then
  779. cheat.value = data.default
  780. elseif data.options then
  781. cheat.value = data.options[1]
  782. else
  783. cheat.value = "None"
  784. end
  785. end
  786.  
  787. local options
  788.  
  789. if data and data.options then
  790. options = data.options
  791. end
  792.  
  793. cheat.dropped = false
  794.  
  795. cheat.dropdown = finity:Create("ImageButton", {
  796. Name = "Dropdown",
  797. BackgroundColor3 = Color3.new(1, 1, 1),
  798. BackgroundTransparency = 1,
  799. Size = UDim2.new(1, 0, 1, 0),
  800. ZIndex = 2,
  801. Image = "rbxassetid://3570695787",
  802. ImageColor3 = theme.dropdown_background,
  803. ImageTransparency = 0.5,
  804. ScaleType = Enum.ScaleType.Slice,
  805. SliceCenter = Rect.new(100, 100, 100, 100),
  806. SliceScale = 0.02
  807. })
  808.  
  809. cheat.selected = finity:Create("TextLabel", {
  810. Name = "Selected",
  811. BackgroundColor3 = Color3.new(1, 1, 1),
  812. BackgroundTransparency = 1,
  813. Position = UDim2.new(0, 10, 0, 0),
  814. Size = UDim2.new(1, -35, 1, 0),
  815. ZIndex = 2,
  816. Font = Enum.Font.Gotham,
  817. Text = tostring(cheat.value),
  818. TextColor3 = theme.dropdown_text,
  819. TextSize = 13,
  820. TextXAlignment = Enum.TextXAlignment.Left
  821. })
  822.  
  823. cheat.list = finity:Create("ScrollingFrame", {
  824. Name = "List",
  825. BackgroundColor3 = theme.dropdown_background,
  826. BackgroundTransparency = 0.5,
  827. BorderSizePixel = 0,
  828. Position = UDim2.new(0, 0, 1, 0),
  829. Size = UDim2.new(1, 0, 0, 100),
  830. ZIndex = 3,
  831. BottomImage = "rbxassetid://967852042",
  832. MidImage = "rbxassetid://967852042",
  833. TopImage = "rbxassetid://967852042",
  834. ScrollBarThickness = 4,
  835. VerticalScrollBarInset = Enum.ScrollBarInset.None,
  836. ScrollBarImageColor3 = theme.dropdown_scrollbar_color
  837. })
  838.  
  839. local uilistlayout = finity:Create("UIListLayout", {
  840. SortOrder = Enum.SortOrder.LayoutOrder,
  841. Padding = UDim.new(0, 2)
  842. })
  843. uilistlayout.Parent = cheat.list
  844. uilistlayout = nil
  845. local uipadding = finity:Create("UIPadding", {
  846. PaddingLeft = UDim.new(0, 2)
  847. })
  848. uipadding.Parent = cheat.list
  849. uipadding = nil
  850.  
  851. local function refreshOptions()
  852. if cheat.dropped then
  853. cheat.fadelist()
  854. end
  855.  
  856. for _, child in next, cheat.list:GetChildren() do
  857. if child:IsA("TextButton") then
  858. child:Destroy()
  859. end
  860. end
  861.  
  862. for _, value in next, options do
  863. local button = finity:Create("TextButton", {
  864. BackgroundColor3 = Color3.new(1, 1, 1),
  865. BackgroundTransparency = 1,
  866. Size = UDim2.new(1, 0, 0, 20),
  867. ZIndex = 3,
  868. Font = Enum.Font.Gotham,
  869. Text = value,
  870. TextColor3 = theme.dropdown_text,
  871. TextSize = 13
  872. })
  873.  
  874. button.Parent = cheat.list
  875.  
  876. button.MouseEnter:Connect(function()
  877. finity.gs["TweenService"]:Create(button, TweenInfo.new(0.1), {TextColor3 = theme.dropdown_text_hover}):Play()
  878. end)
  879. button.MouseLeave:Connect(function()
  880. finity.gs["TweenService"]:Create(button, TweenInfo.new(0.1), {TextColor3 = theme.dropdown_text}):Play()
  881. end)
  882. button.MouseButton1Click:Connect(function()
  883. if cheat.dropped then
  884. cheat.value = value
  885. cheat.selected.Text = value
  886.  
  887. cheat.fadelist()
  888.  
  889. if callback then
  890. local s, e = pcall(function()
  891. callback(cheat.value)
  892. end)
  893.  
  894. if not s then warn("error: ".. e) end
  895. end
  896. end
  897. end)
  898.  
  899.  
  900. finity.gs["TweenService"]:Create(button, TweenInfo.new(0), {TextTransparency = 1}):Play()
  901. end
  902.  
  903. finity.gs["TweenService"]:Create(cheat.list, TweenInfo.new(0), {Size = UDim2.new(1, 0, 0, 0), Position = UDim2.new(0, 0, 1, 0), CanvasSize = UDim2.new(0, 0, 0, cheat.list["UIListLayout"].AbsoluteContentSize.Y), ScrollBarImageTransparency = 1, BackgroundTransparency = 1}):Play()
  904. end
  905.  
  906.  
  907. function cheat.fadelist()
  908. cheat.dropped = not cheat.dropped
  909.  
  910. if cheat.dropped then
  911. for _, button in next, cheat.list:GetChildren() do
  912. if button:IsA("TextButton") then
  913. finity.gs["TweenService"]:Create(button, TweenInfo.new(0.2), {TextTransparency = 0}):Play()
  914. end
  915. end
  916.  
  917. finity.gs["TweenService"]:Create(cheat.list, TweenInfo.new(0.2), {Size = UDim2.new(1, 0, 0, math.clamp(cheat.list["UIListLayout"].AbsoluteContentSize.Y, 0, 150)), Position = UDim2.new(0, 0, 1, 0), ScrollBarImageTransparency = 0, BackgroundTransparency = 0.5}):Play()
  918. else
  919. for _, button in next, cheat.list:GetChildren() do
  920. if button:IsA("TextButton") then
  921. finity.gs["TweenService"]:Create(button, TweenInfo.new(0.2), {TextTransparency = 1}):Play()
  922. end
  923. end
  924.  
  925. finity.gs["TweenService"]:Create(cheat.list, TweenInfo.new(0.2), {Size = UDim2.new(1, 0, 0, 0), Position = UDim2.new(0, 0, 1, 0), ScrollBarImageTransparency = 1, BackgroundTransparency = 1}):Play()
  926. end
  927. end
  928.  
  929. cheat.dropdown.MouseEnter:Connect(function()
  930. finity.gs["TweenService"]:Create(cheat.selected, TweenInfo.new(0.1), {TextColor3 = theme.dropdown_text_hover}):Play()
  931. end)
  932. cheat.dropdown.MouseLeave:Connect(function()
  933. finity.gs["TweenService"]:Create(cheat.selected, TweenInfo.new(0.1), {TextColor3 = theme.dropdown_text}):Play()
  934. end)
  935. cheat.dropdown.MouseButton1Click:Connect(function()
  936. cheat.fadelist()
  937. end)
  938.  
  939. refreshOptions()
  940.  
  941. function cheat:RemoveOption(value)
  942. local removed = false
  943. for index, option in next, options do
  944. if option == value then
  945. table.remove(options, index)
  946. removed = true
  947. break
  948. end
  949. end
  950.  
  951. if removed then
  952. refreshOptions()
  953. end
  954.  
  955. return removed
  956. end
  957.  
  958. function cheat:AddOption(value)
  959. table.insert(options, value)
  960.  
  961. refreshOptions()
  962. end
  963.  
  964. function cheat:SetValue(value)
  965. cheat.selected.Text = value
  966. cheat.value = value
  967.  
  968. if cheat.dropped then
  969. cheat.fadelist()
  970. end
  971.  
  972. if callback then
  973. local s, e = pcall(function()
  974. callback(cheat.value)
  975. end)
  976.  
  977. if not s then warn("error: ".. e) end
  978. end
  979. end
  980.  
  981. cheat.selected.Parent = cheat.dropdown
  982. cheat.dropdown.Parent = cheat.container
  983. cheat.list.Parent = cheat.container
  984. elseif string.lower(kind) == "textbox" then
  985. local placeholdertext = data and data.placeholder
  986.  
  987. cheat.background = finity:Create("ImageLabel", {
  988. Name = "Background",
  989. BackgroundColor3 = Color3.new(1, 1, 1),
  990. BackgroundTransparency = 1,
  991. Size = UDim2.new(1, 0, 1, 0),
  992. ZIndex = 2,
  993. Image = "rbxassetid://3570695787",
  994. ImageColor3 = theme.textbox_background,
  995. ImageTransparency = 0.5,
  996. ScaleType = Enum.ScaleType.Slice,
  997. SliceCenter = Rect.new(100, 100, 100, 100),
  998. SliceScale = 0.02
  999. })
  1000.  
  1001. cheat.textbox = finity:Create("TextBox", {
  1002. Name = "Textbox",
  1003. BackgroundColor3 = Color3.new(1, 1, 1),
  1004. BackgroundTransparency = 1,
  1005. Position = UDim2.new(0, 0, 0, 0),
  1006. Size = UDim2.new(1, 0, 1, 0),
  1007. ZIndex = 2,
  1008. Font = Enum.Font.Gotham,
  1009. Text = "",
  1010. TextColor3 = theme.textbox_text,
  1011. PlaceholderText = placeholdertext or "Value",
  1012. TextSize = 13,
  1013. TextXAlignment = Enum.TextXAlignment.Center,
  1014. ClearTextOnFocus = false
  1015. })
  1016.  
  1017. cheat.background.MouseEnter:Connect(function()
  1018. finity.gs["TweenService"]:Create(cheat.textbox, TweenInfo.new(0.1), {TextColor3 = theme.textbox_text_hover}):Play()
  1019. end)
  1020. cheat.background.MouseLeave:Connect(function()
  1021. finity.gs["TweenService"]:Create(cheat.textbox, TweenInfo.new(0.1), {TextColor3 = theme.textbox_text}):Play()
  1022. end)
  1023. cheat.textbox.Focused:Connect(function()
  1024. typing = true
  1025.  
  1026. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.textbox_background_hover}):Play()
  1027. end)
  1028. cheat.textbox.FocusLost:Connect(function()
  1029. typing = false
  1030.  
  1031. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.textbox_background}):Play()
  1032. finity.gs["TweenService"]:Create(cheat.textbox, TweenInfo.new(0.1), {TextColor3 = theme.textbox_text}):Play()
  1033.  
  1034. cheat.value = cheat.textbox.Text
  1035.  
  1036. if callback then
  1037. local s, e = pcall(function()
  1038. callback(cheat.value)
  1039. end)
  1040.  
  1041. if not s then warn("error: "..e) end
  1042. end
  1043. end)
  1044.  
  1045. cheat.background.Parent = cheat.container
  1046. cheat.textbox.Parent = cheat.container
  1047. elseif string.lower(kind) == "slider" then
  1048. cheat.value = 0
  1049.  
  1050. local suffix = data.suffix or ""
  1051. local minimum = data.min or 0
  1052. local maximum = data.max or 1
  1053.  
  1054. local moveconnection
  1055. local releaseconnection
  1056.  
  1057. cheat.sliderbar = finity:Create("ImageButton", {
  1058. Name = "Sliderbar",
  1059. AnchorPoint = Vector2.new(1, 0.5),
  1060. BackgroundColor3 = Color3.new(1, 1, 1),
  1061. BackgroundTransparency = 1,
  1062. Position = UDim2.new(1, 0, 0.5, 0),
  1063. Size = UDim2.new(1, 0, 0, 6),
  1064. ZIndex = 2,
  1065. Image = "rbxassetid://3570695787",
  1066. ImageColor3 = theme.slider_background,
  1067. ImageTransparency = 0.5,
  1068. ScaleType = Enum.ScaleType.Slice,
  1069. SliceCenter = Rect.new(100, 100, 100, 100),
  1070. SliceScale = 0.02,
  1071. })
  1072.  
  1073. cheat.numbervalue = finity:Create("TextLabel", {
  1074. Name = "Value",
  1075. AnchorPoint = Vector2.new(0, 0.5),
  1076. BackgroundColor3 = Color3.new(1, 1, 1),
  1077. BackgroundTransparency = 1,
  1078. Position = UDim2.new(0.5, 5, 0.5, 0),
  1079. Size = UDim2.new(1, 0, 0, 13),
  1080. ZIndex = 2,
  1081. Font = Enum.Font.Gotham,
  1082. TextXAlignment = Enum.TextXAlignment.Left,
  1083. Text = "",
  1084. TextTransparency = 1,
  1085. TextColor3 = theme.slider_text,
  1086. TextSize = 13,
  1087. })
  1088.  
  1089. cheat.visiframe = finity:Create("ImageLabel", {
  1090. Name = "Frame",
  1091. BackgroundColor3 = Color3.new(1, 1, 1),
  1092. BackgroundTransparency = 1,
  1093. Size = UDim2.new(0.5, 0, 1, 0),
  1094. ZIndex = 2,
  1095. Image = "rbxassetid://3570695787",
  1096. ImageColor3 = theme.slider_color,
  1097. ScaleType = Enum.ScaleType.Slice,
  1098. SliceCenter = Rect.new(100, 100, 100, 100),
  1099. SliceScale = 0.02
  1100. })
  1101.  
  1102. cheat.sliderbar.MouseButton1Down:Connect(function()
  1103. local size = math.clamp(mouse.X - cheat.sliderbar.AbsolutePosition.X, 0, 150)
  1104. local percent = size / 150
  1105.  
  1106. cheat.value = math.floor((minimum + (maximum - minimum) * percent) * 100) / 100
  1107. cheat.numbervalue.Text = tostring(cheat.value) .. suffix
  1108.  
  1109. if callback then
  1110. local s, e = pcall(function()
  1111. callback(cheat.value)
  1112. end)
  1113.  
  1114. if not s then warn("error: ".. e) end
  1115. end
  1116.  
  1117. finity.gs["TweenService"]:Create(cheat.visiframe, TweenInfo.new(0.1), {
  1118. Size = UDim2.new(size / 150, 0, 1, 0),
  1119. ImageColor3 = theme.slider_color_sliding
  1120. }):Play()
  1121.  
  1122. finity.gs["TweenService"]:Create(cheat.numbervalue, TweenInfo.new(0.1), {
  1123. Position = UDim2.new(size / 150, 5, 0.5, 0),
  1124. TextTransparency = 0
  1125. }):Play()
  1126.  
  1127. moveconnection = mouse.Move:Connect(function()
  1128. local size = math.clamp(mouse.X - cheat.sliderbar.AbsolutePosition.X, 0, 150)
  1129. local percent = size / 150
  1130.  
  1131. cheat.value = math.floor((minimum + (maximum - minimum) * percent) * 100) / 100
  1132. cheat.numbervalue.Text = tostring(cheat.value) .. suffix
  1133.  
  1134. if callback then
  1135. local s, e = pcall(function()
  1136. callback(cheat.value)
  1137. end)
  1138.  
  1139. if not s then warn("error: ".. e) end
  1140. end
  1141.  
  1142. finity.gs["TweenService"]:Create(cheat.visiframe, TweenInfo.new(0.1), {
  1143. Size = UDim2.new(size / 150, 0, 1, 0),
  1144. ImageColor3 = theme.slider_color_sliding
  1145. }):Play()
  1146.  
  1147. local Position = UDim2.new(size / 150, 5, 0.5, 0);
  1148.  
  1149. if Position.Width.Scale >= 0.6 then
  1150. Position = UDim2.new(1, -cheat.numbervalue.TextBounds.X, 0.5, 10);
  1151. end
  1152.  
  1153. finity.gs["TweenService"]:Create(cheat.numbervalue, TweenInfo.new(0.1), {
  1154. Position = Position,
  1155. TextTransparency = 0
  1156. }):Play()
  1157. end)
  1158.  
  1159. releaseconnection = finity.gs["UserInputService"].InputEnded:Connect(function(Mouse)
  1160. if Mouse.UserInputType == Enum.UserInputType.MouseButton1 then
  1161.  
  1162. finity.gs["TweenService"]:Create(cheat.visiframe, TweenInfo.new(0.1), {
  1163. ImageColor3 = theme.slider_color
  1164. }):Play()
  1165.  
  1166. finity.gs["TweenService"]:Create(cheat.numbervalue, TweenInfo.new(0.1), {
  1167. TextTransparency = 1
  1168. }):Play()
  1169.  
  1170. moveconnection:Disconnect()
  1171. moveconnection = nil
  1172. releaseconnection:Disconnect()
  1173. releaseconnection = nil
  1174. end
  1175. end)
  1176. end)
  1177.  
  1178. cheat.visiframe.Parent = cheat.sliderbar
  1179. cheat.numbervalue.Parent = cheat.sliderbar
  1180. cheat.sliderbar.Parent = cheat.container
  1181. elseif string.lower(kind) == "button" then
  1182. local button_text = data and data.text
  1183.  
  1184. cheat.background = finity:Create("ImageLabel", {
  1185. Name = "Background",
  1186. BackgroundColor3 = Color3.new(1, 1, 1),
  1187. BackgroundTransparency = 1,
  1188. Size = UDim2.new(1, 0, 1, 0),
  1189. ZIndex = 2,
  1190. Image = "rbxassetid://3570695787",
  1191. ImageColor3 = theme.button_background,
  1192. ImageTransparency = 0.5,
  1193. ScaleType = Enum.ScaleType.Slice,
  1194. SliceCenter = Rect.new(100, 100, 100, 100),
  1195. SliceScale = 0.02
  1196. })
  1197.  
  1198. cheat.button = finity:Create("TextButton", {
  1199. Name = "Button",
  1200. BackgroundColor3 = Color3.new(1, 1, 1),
  1201. BackgroundTransparency = 1,
  1202. Position = UDim2.new(0, 0, 0, 0),
  1203. Size = UDim2.new(1, 0, 1, 0),
  1204. ZIndex = 2,
  1205. Font = Enum.Font.Gotham,
  1206. Text = button_text or "Button",
  1207. TextColor3 = theme.textbox_text,
  1208. TextSize = 13,
  1209. TextXAlignment = Enum.TextXAlignment.Center
  1210. })
  1211.  
  1212. cheat.button.MouseEnter:Connect(function()
  1213. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background_hover}):Play()
  1214. end)
  1215. cheat.button.MouseLeave:Connect(function()
  1216. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background}):Play()
  1217. end)
  1218. cheat.button.MouseButton1Down:Connect(function()
  1219. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background_down}):Play()
  1220. end)
  1221. cheat.button.MouseButton1Up:Connect(function()
  1222. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background}):Play()
  1223.  
  1224. if callback then
  1225. local s, e = pcall(function()
  1226. callback()
  1227. end)
  1228.  
  1229. if not s then warn("error: ".. e) end
  1230. end
  1231. end)
  1232.  
  1233. cheat.background.Parent = cheat.container
  1234. cheat.button.Parent = cheat.container
  1235.  
  1236. elseif string.lower(kind) == "keybind" or string.lower(kind) == "bind" then
  1237. local callback_bind = data and data.bind
  1238. local connection
  1239.  
  1240. cheat.background = finity:Create("ImageLabel", {
  1241. Name = "Background",
  1242. BackgroundColor3 = Color3.new(1, 1, 1),
  1243. BackgroundTransparency = 1,
  1244. Size = UDim2.new(1, 0, 1, 0),
  1245. ZIndex = 2,
  1246. Image = "rbxassetid://3570695787",
  1247. ImageColor3 = theme.button_background,
  1248. ImageTransparency = 0.5,
  1249. ScaleType = Enum.ScaleType.Slice,
  1250. SliceCenter = Rect.new(100, 100, 100, 100),
  1251. SliceScale = 0.02
  1252. })
  1253.  
  1254. cheat.button = finity:Create("TextButton", {
  1255. Name = "Button",
  1256. BackgroundColor3 = Color3.new(1, 1, 1),
  1257. BackgroundTransparency = 1,
  1258. Position = UDim2.new(0, 0, 0, 0),
  1259. Size = UDim2.new(1, 0, 1, 0),
  1260. ZIndex = 2,
  1261. Font = Enum.Font.Gotham,
  1262. Text = "Click to Bind",
  1263. TextColor3 = theme.textbox_text,
  1264. TextSize = 13,
  1265. TextXAlignment = Enum.TextXAlignment.Center
  1266. })
  1267.  
  1268. cheat.button.MouseEnter:Connect(function()
  1269. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background_hover}):Play()
  1270. end)
  1271. cheat.button.MouseLeave:Connect(function()
  1272. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background}):Play()
  1273. end)
  1274. cheat.button.MouseButton1Down:Connect(function()
  1275. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background_down}):Play()
  1276. end)
  1277. cheat.button.MouseButton2Down:Connect(function()
  1278. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background_down}):Play()
  1279. end)
  1280. cheat.button.MouseButton1Up:Connect(function()
  1281. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background}):Play()
  1282. cheat.button.Text = "Press key..."
  1283.  
  1284. connection = finity.gs["UserInputService"].InputBegan:Connect(function(Input)
  1285. if Input.UserInputType.Name == "Keyboard" and Input.KeyCode ~= finityData.ToggleKey and Input.KeyCode ~= Enum.KeyCode.Backspace then
  1286. cheat.button.Text = "Bound to " .. tostring(Input.KeyCode.Name)
  1287. if connection then
  1288. connection:Disconnect()
  1289. connection = nil
  1290. end
  1291.  
  1292. delay(0, function()
  1293. callback_bind = Input.KeyCode
  1294. end)
  1295. elseif Input.KeyCode == Enum.KeyCode.Backspace then
  1296. callback_bind = nil
  1297. cheat.button.Text = "Click to Bind"
  1298. connection:Disconnect()
  1299. connection = nil
  1300. elseif Input.KeyCode == finityData.ToggleKey then
  1301. cheat.button.Text = "Invalid Key";
  1302. end
  1303. end)
  1304. end)
  1305. cheat.button.MouseButton2Up:Connect(function()
  1306. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background}):Play()
  1307.  
  1308. callback_bind = nil
  1309. cheat.button.Text = "Click to Bind"
  1310. if connection then
  1311. connection:Disconnect()
  1312. connection = nil
  1313. end
  1314. end)
  1315.  
  1316.  
  1317. finity.gs["UserInputService"].InputBegan:Connect(function(Input, Process)
  1318. if callback_bind and Input.KeyCode == callback_bind and not Process then
  1319. if callback then
  1320. local s, e = pcall(function()
  1321. callback(Input.KeyCode)
  1322. end)
  1323.  
  1324. if not s then warn("error: ".. e) end
  1325. end
  1326. end
  1327. end)
  1328.  
  1329. if callback_bind then
  1330. cheat.button.Text = "Bound to " .. tostring(callback_bind.Name)
  1331. end
  1332.  
  1333. cheat.background.Parent = cheat.container
  1334. cheat.button.Parent = cheat.container
  1335. end
  1336. end
  1337.  
  1338. cheat.frame.Parent = sector.container
  1339. cheat.label.Parent = cheat.frame
  1340. cheat.container.Parent = cheat.frame
  1341.  
  1342. return cheat
  1343. end
  1344.  
  1345. sector.frame.Parent = category[calculateSector()]
  1346. sector.container.Parent = sector.frame
  1347. sector.title.Parent = sector.frame
  1348.  
  1349. return sector
  1350. end
  1351.  
  1352. firstCategory = false
  1353.  
  1354. return category
  1355. end
  1356.  
  1357. self:addShadow(self2.container, 0)
  1358.  
  1359. self2.categories.ClipsDescendants = true
  1360.  
  1361. if not finity.gs["RunService"]:IsStudio() then
  1362. self2.userinterface.Parent = self.gs["CoreGui"]
  1363. else
  1364. self2.userinterface.Parent = self.gs["Players"].LocalPlayer:WaitForChild("PlayerGui")
  1365. end
  1366.  
  1367. self2.container.Parent = self2.userinterface
  1368. self2.categories.Parent = self2.container
  1369. self2.sidebar.Parent = self2.container
  1370. self2.topbar.Parent = self2.container
  1371. self2.tip.Parent = self2.topbar
  1372.  
  1373. return self2, finityData
  1374. end
  1375.  
  1376. return finity
Add Comment
Please, Sign In to add comment