Advertisement
Guest User

finity pastebin version

a guest
Jan 20th, 2020
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 39.83 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.  
  162.  
  163. local finityData
  164. finityData = {
  165. UpConnection = nil,
  166. ToggleKey = Enum.KeyCode.Home,
  167. }
  168.  
  169. self2.ChangeToggleKey = function(NewKey)
  170. finityData.ToggleKey = NewKey
  171.  
  172. if not projectName then
  173. self2.tip.Text = "Press '".. string.sub(tostring(NewKey), 14) .."' to hide this menu"
  174. end
  175.  
  176. if finityData.UpConnection then
  177. finityData.UpConnection:Disconnect()
  178. end
  179.  
  180. finityData.UpConnection = finity.gs["UserInputService"].InputEnded:Connect(function(Input)
  181. if Input.KeyCode == finityData.ToggleKey and not typing then
  182. toggled = not toggled
  183.  
  184. if toggled then
  185. self2.container:TweenPosition(UDim2.new(0.5, 0, 0.5, 0), "Out", "Sine", 0.5, true)
  186. else
  187. self2.container:TweenPosition(UDim2.new(0.5, 0, 1.5, 0), "Out", "Sine", 0.5, true)
  188. end
  189. end
  190. end)
  191. end
  192.  
  193. self2.ChangeBackgroundImage = function(ImageID, Transparency)
  194. self2.container.Image = ImageID
  195.  
  196. if Transparency then
  197. self2.container.ImageTransparency = Transparency
  198. else
  199. self2.container.ImageTransparency = 0.8
  200. end
  201. end
  202.  
  203. finityData.UpConnection = finity.gs["UserInputService"].InputEnded:Connect(function(Input)
  204. if Input.KeyCode == finityData.ToggleKey and not typing then
  205. toggled = not toggled
  206.  
  207. if toggled then
  208. self2.container:TweenPosition(UDim2.new(0.5, 0, 0.5, 0), "Out", "Sine", 0.5, true)
  209. else
  210. self2.container:TweenPosition(UDim2.new(0.5, 0, 1.5, 0), "Out", "Sine", 0.5, true)
  211. end
  212. end
  213. end)
  214.  
  215. self2.userinterface = self:Create("ScreenGui", {
  216. Name = "FinityUI",
  217. ZIndexBehavior = Enum.ZIndexBehavior.Global,
  218. ResetOnSpawn = false,
  219. })
  220.  
  221. self2.container = self:Create("ImageLabel", {
  222. Draggable = true,
  223. Active = true,
  224. Name = "Container",
  225. AnchorPoint = Vector2.new(0.5, 0.5),
  226. BackgroundTransparency = 0,
  227. BackgroundColor3 = theme.main_container,
  228. BorderSizePixel = 0,
  229. Position = UDim2.new(0.5, 0, 0.5, 0),
  230. Size = UDim2.new(0, 800, 0, 500),
  231. ZIndex = 2,
  232. ImageTransparency = 1
  233. })
  234.  
  235. if thinProject and typeof(thinProject) == "UDim2" then
  236. self2.container.Size = thinProject
  237. end
  238.  
  239. self2.container.Draggable = true
  240. self2.container.Active = true
  241.  
  242. self2.sidebar = self:Create("Frame", {
  243. Name = "Sidebar",
  244. BackgroundColor3 = Color3.new(0.976471, 0.937255, 1),
  245. BackgroundTransparency = 1,
  246. BorderColor3 = Color3.new(0.745098, 0.713726, 0.760784),
  247. Size = UDim2.new(0, 120, 1, -30),
  248. Position = UDim2.new(0, 0, 0, 30),
  249. ZIndex = 2,
  250. })
  251.  
  252. self2.categories = self:Create("Frame", {
  253. Name = "Categories",
  254. BackgroundColor3 = Color3.new(0.976471, 0.937255, 1),
  255. ClipsDescendants = true,
  256. BackgroundTransparency = 1,
  257. BorderColor3 = Color3.new(0.745098, 0.713726, 0.760784),
  258. Size = UDim2.new(1, -120, 1, -30),
  259. AnchorPoint = Vector2.new(1, 0),
  260. Position = UDim2.new(1, 0, 0, 30),
  261. ZIndex = 2,
  262. })
  263. self2.categories.ClipsDescendants = true
  264.  
  265. self2.topbar = self:Create("Frame", {
  266. Name = "Topbar",
  267. ZIndex = 2,
  268. Size = UDim2.new(1,0,0,30),
  269. BackgroundTransparency = 2
  270. })
  271.  
  272. self2.tip = self:Create("TextLabel", {
  273. Name = "TopbarTip",
  274. ZIndex = 2,
  275. Size = UDim2.new(1, -30, 0, 30),
  276. Position = UDim2.new(0, 30, 0, 0),
  277. Text = "Press '".. string.sub(tostring(self.ToggleKey), 14) .."' to hide this menu",
  278. Font = Enum.Font.GothamSemibold,
  279. TextSize = 13,
  280. TextXAlignment = Enum.TextXAlignment.Left,
  281. BackgroundTransparency = 1,
  282. TextColor3 = theme.text_color,
  283. })
  284.  
  285. if projectName then
  286. self2.tip.Text = projectName
  287. else
  288. self2.tip.Text = "Press '".. string.sub(tostring(self.ToggleKey), 14) .."' to hide this menu"
  289. end
  290.  
  291. local separator = self:Create("Frame", {
  292. Name = "Separator",
  293. BackgroundColor3 = theme.separator_color,
  294. BorderSizePixel = 0,
  295. Position = UDim2.new(0, 118, 0, 30),
  296. Size = UDim2.new(0, 1, 1, -30),
  297. ZIndex = 6,
  298. })
  299. separator.Parent = self2.container
  300. separator = nil
  301.  
  302. local separator = self:Create("Frame", {
  303. Name = "Separator",
  304. BackgroundColor3 = theme.separator_color,
  305. BorderSizePixel = 0,
  306. Position = UDim2.new(0, 0, 0, 30),
  307. Size = UDim2.new(1, 0, 0, 1),
  308. ZIndex = 6,
  309. })
  310. separator.Parent = self2.container
  311. separator = nil
  312.  
  313. local uipagelayout = self:Create("UIPageLayout", {
  314. Padding = UDim.new(0, 10),
  315. FillDirection = Enum.FillDirection.Vertical,
  316. TweenTime = 0.7,
  317. EasingStyle = Enum.EasingStyle.Quad,
  318. EasingDirection = Enum.EasingDirection.InOut,
  319. SortOrder = Enum.SortOrder.LayoutOrder,
  320. })
  321. uipagelayout.Parent = self2.categories
  322. uipagelayout = nil
  323.  
  324. local uipadding = self:Create("UIPadding", {
  325. PaddingTop = UDim.new(0, 3),
  326. PaddingLeft = UDim.new(0, 2)
  327. })
  328. uipadding.Parent = self2.sidebar
  329. uipadding = nil
  330.  
  331. local uilistlayout = self:Create("UIListLayout", {
  332. SortOrder = Enum.SortOrder.LayoutOrder
  333. })
  334. uilistlayout.Parent = self2.sidebar
  335. uilistlayout = nil
  336.  
  337. function self2:Category(name)
  338. local category = {}
  339.  
  340. category.button = finity:Create("TextButton", {
  341. Name = name,
  342. BackgroundColor3 = theme.category_button_background,
  343. BackgroundTransparency = 1,
  344. BorderMode = Enum.BorderMode.Inset,
  345. BorderColor3 = theme.category_button_border,
  346. Size = UDim2.new(1, -4, 0, 25),
  347. ZIndex = 2,
  348. AutoButtonColor = false,
  349. Font = Enum.Font.GothamSemibold,
  350. Text = name,
  351. TextColor3 = theme.text_color,
  352. TextSize = 14
  353. })
  354.  
  355. category.container = finity:Create("ScrollingFrame", {
  356. Name = name,
  357. BackgroundTransparency = 1,
  358. ScrollBarThickness = 4,
  359. BorderSizePixel = 0,
  360. Size = UDim2.new(1, 0, 1, 0),
  361. ZIndex = 2,
  362. CanvasSize = UDim2.new(0, 0, 0, 0),
  363. ScrollBarImageColor3 = theme.scrollbar_color or Color3.fromRGB(118, 118, 121),
  364. BottomImage = "rbxassetid://967852042",
  365. MidImage = "rbxassetid://967852042",
  366. TopImage = "rbxassetid://967852042",
  367. ScrollBarImageTransparency = 1 --
  368. })
  369.  
  370. category.hider = finity:Create("Frame", {
  371. Name = "Hider",
  372. BackgroundTransparency = 0, --
  373. BorderSizePixel = 0,
  374. BackgroundColor3 = theme.main_container,
  375. Size = UDim2.new(1, 0, 1, 0),
  376. ZIndex = 5
  377. })
  378.  
  379. category.L = finity:Create("Frame", {
  380. Name = "L",
  381. BackgroundColor3 = Color3.new(1, 1, 1),
  382. BackgroundTransparency = 1,
  383. Position = UDim2.new(0, 10, 0, 3),
  384. Size = UDim2.new(0.5, -20, 1, -3),
  385. ZIndex = 2
  386. })
  387.  
  388. if not thinProject then
  389. category.R = finity:Create("Frame", {
  390. Name = "R",
  391. AnchorPoint = Vector2.new(1, 0),
  392. BackgroundColor3 = Color3.new(1, 1, 1),
  393. BackgroundTransparency = 1,
  394. Position = UDim2.new(1, -10, 0, 3),
  395. Size = UDim2.new(0.5, -20, 1, -3),
  396. ZIndex = 2
  397. })
  398. end
  399.  
  400. if thinProject then
  401. category.L.Size = UDim2.new(1, -20, 1, -3)
  402. end
  403.  
  404. if firstCategory then
  405. finity.gs["TweenService"]:Create(category.hider, TweenInfo.new(0.3), {BackgroundTransparency = 1}):Play()
  406. finity.gs["TweenService"]:Create(category.container, TweenInfo.new(0.3), {ScrollBarImageTransparency = 0}):Play()
  407. end
  408.  
  409. do
  410. local uilistlayout = finity:Create("UIListLayout", {
  411. SortOrder = Enum.SortOrder.LayoutOrder
  412. })
  413.  
  414. local uilistlayout2 = finity:Create("UIListLayout", {
  415. SortOrder = Enum.SortOrder.LayoutOrder
  416. })
  417.  
  418. local function computeSizeChange()
  419. local largestListSize = 0
  420.  
  421. largestListSize = uilistlayout.AbsoluteContentSize.Y
  422.  
  423. if uilistlayout2.AbsoluteContentSize.Y > largestListSize then
  424. largestListSize = largestListSize
  425. end
  426.  
  427. category.container.CanvasSize = UDim2.new(0, 0, 0, largestListSize + 5)
  428. end
  429.  
  430. uilistlayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(computeSizeChange)
  431. uilistlayout2:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(computeSizeChange)
  432.  
  433. uilistlayout.Parent = category.L
  434. uilistlayout2.Parent = category.R
  435. end
  436.  
  437. category.button.MouseEnter:Connect(function()
  438. finity.gs["TweenService"]:Create(category.button, TweenInfo.new(0.2), {BackgroundTransparency = 0.5}):Play()
  439. end)
  440. category.button.MouseLeave:Connect(function()
  441. finity.gs["TweenService"]:Create(category.button, TweenInfo.new(0.2), {BackgroundTransparency = 1}):Play()
  442. end)
  443. category.button.MouseButton1Down:Connect(function()
  444. for _, categoryf in next, self2.userinterface["Container"]["Categories"]:GetChildren() do
  445. if categoryf:IsA("ScrollingFrame") then
  446. if categoryf ~= category.container then
  447. finity.gs["TweenService"]:Create(categoryf.Hider, TweenInfo.new(0.3), {BackgroundTransparency = 0}):Play()
  448. finity.gs["TweenService"]:Create(categoryf, TweenInfo.new(0.3), {ScrollBarImageTransparency = 1}):Play()
  449. end
  450. end
  451. end
  452.  
  453. finity.gs["TweenService"]:Create(category.button, TweenInfo.new(0.2), {BackgroundTransparency = 0.2}):Play()
  454. finity.gs["TweenService"]:Create(category.hider, TweenInfo.new(0.3), {BackgroundTransparency = 1}):Play()
  455. finity.gs["TweenService"]:Create(category.container, TweenInfo.new(0.3), {ScrollBarImageTransparency = 0}):Play()
  456.  
  457. self2.categories["UIPageLayout"]:JumpTo(category.container)
  458. end)
  459. category.button.MouseButton1Up:Connect(function()
  460. finity.gs["TweenService"]:Create(category.button, TweenInfo.new(0.2), {BackgroundTransparency = 1}):Play()
  461. end)
  462.  
  463. category.container.Parent = self2.categories
  464. category.button.Parent = self2.sidebar
  465.  
  466. if not thinProject then
  467. category.R.Parent = category.container
  468. end
  469.  
  470. category.L.Parent = category.container
  471. category.hider.Parent = category.container
  472.  
  473. local function calculateSector()
  474. if thinProject then
  475. return "L"
  476. end
  477.  
  478. local R = #category.R:GetChildren() - 1
  479. local L = #category.L:GetChildren() - 1
  480.  
  481. if L > R then
  482. return "R"
  483. else
  484. return "L"
  485. end
  486. end
  487.  
  488. function category:Sector(name)
  489. local sector = {}
  490.  
  491. sector.frame = finity:Create("Frame", {
  492. Name = name,
  493. BackgroundColor3 = Color3.new(1, 1, 1),
  494. BackgroundTransparency = 1,
  495. Size = UDim2.new(1, 0, 0, 25),
  496. ZIndex = 2
  497. })
  498.  
  499. sector.container = finity:Create("Frame", {
  500. Name = "Container",
  501. BackgroundColor3 = Color3.new(1, 1, 1),
  502. BackgroundTransparency = 1,
  503. Position = UDim2.new(0, 0, 0, 22),
  504. Size = UDim2.new(1, -5, 1, -30),
  505. ZIndex = 2
  506. })
  507.  
  508. sector.title = finity:Create("TextLabel", {
  509. Name = "Title",
  510. Text = name,
  511. BackgroundColor3 = Color3.new(1, 1, 1),
  512. BackgroundTransparency = 1,
  513. Size = UDim2.new(1, -5, 0, 25),
  514. ZIndex = 2,
  515. Font = Enum.Font.GothamSemibold,
  516. TextColor3 = theme.text_color,
  517. TextSize = 14,
  518. TextXAlignment = Enum.TextXAlignment.Left,
  519. })
  520.  
  521. local uilistlayout = finity:Create("UIListLayout", {
  522. SortOrder = Enum.SortOrder.LayoutOrder
  523. })
  524.  
  525. uilistlayout.Changed:Connect(function()
  526. sector.frame.Size = UDim2.new(1, 0, 0, sector.container["UIListLayout"].AbsoluteContentSize.Y + 25)
  527. sector.container.Size = UDim2.new(1, 0, 0, sector.container["UIListLayout"].AbsoluteContentSize.Y)
  528. end)
  529. uilistlayout.Parent = sector.container
  530. uilistlayout = nil
  531.  
  532. function sector:Cheat(kind, name, callback, data)
  533. local cheat = {}
  534. cheat.value = nil
  535.  
  536. cheat.frame = finity:Create("Frame", {
  537. Name = name,
  538. BackgroundColor3 = Color3.new(1, 1, 1),
  539. BackgroundTransparency = 1,
  540. Size = UDim2.new(1, 0, 0, 25),
  541. ZIndex = 2,
  542. })
  543.  
  544. cheat.label = finity:Create("TextLabel", {
  545. Name = "Title",
  546. BackgroundColor3 = Color3.new(1, 1, 1),
  547. BackgroundTransparency = 1,
  548. Size = UDim2.new(1, 0, 1, 0),
  549. ZIndex = 2,
  550. Font = Enum.Font.Gotham,
  551. TextColor3 = theme.text_color,
  552. TextSize = 13,
  553. Text = name,
  554. TextXAlignment = Enum.TextXAlignment.Left
  555. })
  556.  
  557. cheat.container = finity:Create("Frame", {
  558. Name = "Container",
  559. AnchorPoint = Vector2.new(1, 0.5),
  560. BackgroundColor3 = Color3.new(1, 1, 1),
  561. BackgroundTransparency = 1,
  562. Position = UDim2.new(1, 0, 0.5, 0),
  563. Size = UDim2.new(0, 150, 0, 22),
  564. ZIndex = 2,
  565. })
  566.  
  567. if kind then
  568. if string.lower(kind) == "checkbox" or string.lower(kind) == "toggle" then
  569. if data then
  570. if data.enabled then
  571. cheat.value = true
  572. end
  573. end
  574.  
  575. cheat.checkbox = finity:Create("Frame", {
  576. Name = "Checkbox",
  577. AnchorPoint = Vector2.new(1, 0),
  578. BackgroundColor3 = Color3.new(1, 1, 1),
  579. BackgroundTransparency = 1,
  580. Position = UDim2.new(1, 0, 0, 0),
  581. Size = UDim2.new(0, 25, 0, 25),
  582. ZIndex = 2,
  583. })
  584.  
  585. cheat.outerbox = finity:Create("ImageLabel", {
  586. Name = "Outer",
  587. AnchorPoint = Vector2.new(1, 0.5),
  588. BackgroundColor3 = Color3.new(1, 1, 1),
  589. BackgroundTransparency = 1,
  590. Position = UDim2.new(1, 0, 0.5, 0),
  591. Size = UDim2.new(0, 20, 0, 20),
  592. ZIndex = 2,
  593. Image = "rbxassetid://3570695787",
  594. ImageColor3 = theme.checkbox_outer,
  595. ScaleType = Enum.ScaleType.Slice,
  596. SliceCenter = Rect.new(100, 100, 100, 100),
  597. SliceScale = 0.06,
  598. })
  599.  
  600. cheat.checkboxbutton = finity:Create("ImageButton", {
  601. AnchorPoint = Vector2.new(0.5, 0.5),
  602. Name = "CheckboxButton",
  603. BackgroundColor3 = Color3.new(1, 1, 1),
  604. BackgroundTransparency = 1,
  605. Position = UDim2.new(0.5, 0, 0.5, 0),
  606. Size = UDim2.new(0, 14, 0, 14),
  607. ZIndex = 2,
  608. Image = "rbxassetid://3570695787",
  609. ImageColor3 = theme.checkbox_inner,
  610. ScaleType = Enum.ScaleType.Slice,
  611. SliceCenter = Rect.new(100, 100, 100, 100),
  612. SliceScale = 0.04
  613. })
  614.  
  615. if data then
  616. if data.enabled then
  617. finity.gs["TweenService"]:Create(cheat.outerbox, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_checked}):Play()
  618. finity.gs["TweenService"]:Create(cheat.checkboxbutton, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_checked}):Play()
  619. end
  620. end
  621.  
  622. cheat.checkboxbutton.MouseEnter:Connect(function()
  623. local lightertheme = Color3.fromRGB((theme.checkbox_outer.R * 255) + 20, (theme.checkbox_outer.G * 255) + 20, (theme.checkbox_outer.B * 255) + 20)
  624. finity.gs["TweenService"]:Create(cheat.outerbox, TweenInfo.new(0.2), {ImageColor3 = lightertheme}):Play()
  625. end)
  626. cheat.checkboxbutton.MouseLeave:Connect(function()
  627. if not cheat.value then
  628. finity.gs["TweenService"]:Create(cheat.outerbox, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_outer}):Play()
  629. else
  630. finity.gs["TweenService"]:Create(cheat.outerbox, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_checked}):Play()
  631. end
  632. end)
  633. cheat.checkboxbutton.MouseButton1Down:Connect(function()
  634. if cheat.value then
  635. finity.gs["TweenService"]:Create(cheat.checkboxbutton, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_outer}):Play()
  636. else
  637. finity.gs["TweenService"]:Create(cheat.checkboxbutton, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_checked}):Play()
  638. end
  639. end)
  640. cheat.checkboxbutton.MouseButton1Up:Connect(function()
  641. cheat.value = not cheat.value
  642.  
  643. if callback then
  644. local s, e = pcall(function()
  645. callback(cheat.value)
  646. end)
  647.  
  648. if not s then warn("error: ".. e) end
  649. end
  650.  
  651. if cheat.value then
  652. finity.gs["TweenService"]:Create(cheat.outerbox, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_checked}):Play()
  653. else
  654. finity.gs["TweenService"]:Create(cheat.outerbox, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_outer}):Play()
  655. finity.gs["TweenService"]:Create(cheat.checkboxbutton, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_inner}):Play()
  656. end
  657. end)
  658.  
  659. cheat.checkboxbutton.Parent = cheat.outerbox
  660. cheat.outerbox.Parent = cheat.container
  661. elseif string.lower(kind) == "dropdown" then
  662. if data then
  663. if data.default then
  664. cheat.value = data.default
  665. elseif data.options then
  666. cheat.value = data.options[1]
  667. else
  668. cheat.value = "None"
  669. end
  670. end
  671.  
  672. local options
  673.  
  674. if data and data.options then
  675. options = data.options
  676. end
  677.  
  678. cheat.dropped = false
  679.  
  680. cheat.dropdown = finity:Create("ImageButton", {
  681. Name = "Dropdown",
  682. BackgroundColor3 = Color3.new(1, 1, 1),
  683. BackgroundTransparency = 1,
  684. Size = UDim2.new(1, 0, 1, 0),
  685. ZIndex = 2,
  686. Image = "rbxassetid://3570695787",
  687. ImageColor3 = theme.dropdown_background,
  688. ImageTransparency = 0.5,
  689. ScaleType = Enum.ScaleType.Slice,
  690. SliceCenter = Rect.new(100, 100, 100, 100),
  691. SliceScale = 0.02
  692. })
  693.  
  694. cheat.selected = finity:Create("TextLabel", {
  695. Name = "Selected",
  696. BackgroundColor3 = Color3.new(1, 1, 1),
  697. BackgroundTransparency = 1,
  698. Position = UDim2.new(0, 10, 0, 0),
  699. Size = UDim2.new(1, -35, 1, 0),
  700. ZIndex = 2,
  701. Font = Enum.Font.Gotham,
  702. Text = tostring(cheat.value),
  703. TextColor3 = theme.dropdown_text,
  704. TextSize = 13,
  705. TextXAlignment = Enum.TextXAlignment.Left
  706. })
  707.  
  708. cheat.list = finity:Create("ScrollingFrame", {
  709. Name = "List",
  710. BackgroundColor3 = theme.dropdown_background,
  711. BackgroundTransparency = 0.5,
  712. BorderSizePixel = 0,
  713. Position = UDim2.new(0, 0, 1, 0),
  714. Size = UDim2.new(1, 0, 0, 100),
  715. ZIndex = 3,
  716. BottomImage = "rbxassetid://967852042",
  717. MidImage = "rbxassetid://967852042",
  718. TopImage = "rbxassetid://967852042",
  719. ScrollBarThickness = 4,
  720. VerticalScrollBarInset = Enum.ScrollBarInset.None,
  721. ScrollBarImageColor3 = theme.dropdown_scrollbar_color
  722. })
  723.  
  724. local uilistlayout = finity:Create("UIListLayout", {
  725. SortOrder = Enum.SortOrder.LayoutOrder,
  726. Padding = UDim.new(0, 2)
  727. })
  728. uilistlayout.Parent = cheat.list
  729. uilistlayout = nil
  730. local uipadding = finity:Create("UIPadding", {
  731. PaddingLeft = UDim.new(0, 2)
  732. })
  733. uipadding.Parent = cheat.list
  734. uipadding = nil
  735.  
  736. local function refreshOptions()
  737. if cheat.dropped then
  738. cheat.fadelist()
  739. end
  740.  
  741. for _, child in next, cheat.list:GetChildren() do
  742. if child:IsA("TextButton") then
  743. child:Destroy()
  744. end
  745. end
  746.  
  747. for _, value in next, options do
  748. local button = finity:Create("TextButton", {
  749. BackgroundColor3 = Color3.new(1, 1, 1),
  750. BackgroundTransparency = 1,
  751. Size = UDim2.new(1, 0, 0, 20),
  752. ZIndex = 3,
  753. Font = Enum.Font.Gotham,
  754. Text = value,
  755. TextColor3 = theme.dropdown_text,
  756. TextSize = 13
  757. })
  758.  
  759. button.Parent = cheat.list
  760.  
  761. button.MouseEnter:Connect(function()
  762. finity.gs["TweenService"]:Create(button, TweenInfo.new(0.1), {TextColor3 = theme.dropdown_text_hover}):Play()
  763. end)
  764. button.MouseLeave:Connect(function()
  765. finity.gs["TweenService"]:Create(button, TweenInfo.new(0.1), {TextColor3 = theme.dropdown_text}):Play()
  766. end)
  767. button.MouseButton1Click:Connect(function()
  768. if cheat.dropped then
  769. cheat.value = value
  770. cheat.selected.Text = value
  771.  
  772. cheat.fadelist()
  773.  
  774. if callback then
  775. local s, e = pcall(function()
  776. callback(cheat.value)
  777. end)
  778.  
  779. if not s then warn("error: ".. e) end
  780. end
  781. end
  782. end)
  783.  
  784.  
  785. finity.gs["TweenService"]:Create(button, TweenInfo.new(0), {TextTransparency = 1}):Play()
  786. end
  787.  
  788. 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()
  789. end
  790.  
  791.  
  792. function cheat.fadelist()
  793. cheat.dropped = not cheat.dropped
  794.  
  795. if cheat.dropped then
  796. for _, button in next, cheat.list:GetChildren() do
  797. if button:IsA("TextButton") then
  798. finity.gs["TweenService"]:Create(button, TweenInfo.new(0.2), {TextTransparency = 0}):Play()
  799. end
  800. end
  801.  
  802. 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()
  803. else
  804. for _, button in next, cheat.list:GetChildren() do
  805. if button:IsA("TextButton") then
  806. finity.gs["TweenService"]:Create(button, TweenInfo.new(0.2), {TextTransparency = 1}):Play()
  807. end
  808. end
  809.  
  810. 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()
  811. end
  812. end
  813.  
  814. cheat.dropdown.MouseEnter:Connect(function()
  815. finity.gs["TweenService"]:Create(cheat.selected, TweenInfo.new(0.1), {TextColor3 = theme.dropdown_text_hover}):Play()
  816. end)
  817. cheat.dropdown.MouseLeave:Connect(function()
  818. finity.gs["TweenService"]:Create(cheat.selected, TweenInfo.new(0.1), {TextColor3 = theme.dropdown_text}):Play()
  819. end)
  820. cheat.dropdown.MouseButton1Click:Connect(function()
  821. cheat.fadelist()
  822. end)
  823.  
  824. refreshOptions()
  825.  
  826. function cheat:RemoveOption(value)
  827. local removed = false
  828. for index, option in next, options do
  829. if option == value then
  830. table.remove(options, index)
  831. removed = true
  832. break
  833. end
  834. end
  835.  
  836. if removed then
  837. refreshOptions()
  838. end
  839.  
  840. return removed
  841. end
  842.  
  843. function cheat:AddOption(value)
  844. table.insert(options, value)
  845.  
  846. refreshOptions()
  847. end
  848.  
  849. function cheat:SetValue(value)
  850. cheat.selected.Text = value
  851. cheat.value = value
  852.  
  853. if cheat.dropped then
  854. cheat.fadelist()
  855. end
  856.  
  857. if callback then
  858. local s, e = pcall(function()
  859. callback(cheat.value)
  860. end)
  861.  
  862. if not s then warn("error: ".. e) end
  863. end
  864. end
  865.  
  866. cheat.selected.Parent = cheat.dropdown
  867. cheat.dropdown.Parent = cheat.container
  868. cheat.list.Parent = cheat.container
  869. elseif string.lower(kind) == "textbox" then
  870. local placeholdertext = data and data.placeholder
  871.  
  872. cheat.value = ""
  873.  
  874. cheat.background = finity:Create("ImageLabel", {
  875. Name = "Background",
  876. BackgroundColor3 = Color3.new(1, 1, 1),
  877. BackgroundTransparency = 1,
  878. Size = UDim2.new(1, 0, 1, 0),
  879. ZIndex = 2,
  880. Image = "rbxassetid://3570695787",
  881. ImageColor3 = theme.textbox_background,
  882. ImageTransparency = 0.5,
  883. ScaleType = Enum.ScaleType.Slice,
  884. SliceCenter = Rect.new(100, 100, 100, 100),
  885. SliceScale = 0.02
  886. })
  887.  
  888. cheat.textbox = finity:Create("TextBox", {
  889. Name = "Textbox",
  890. BackgroundColor3 = Color3.new(1, 1, 1),
  891. BackgroundTransparency = 1,
  892. Position = UDim2.new(0, 0, 0, 0),
  893. Size = UDim2.new(1, 0, 1, 0),
  894. ZIndex = 2,
  895. Font = Enum.Font.Gotham,
  896. Text = "",
  897. TextColor3 = theme.textbox_text,
  898. PlaceholderText = placeholdertext or "Value",
  899. TextSize = 13,
  900. TextXAlignment = Enum.TextXAlignment.Center
  901. })
  902.  
  903. cheat.background.MouseEnter:Connect(function()
  904. finity.gs["TweenService"]:Create(cheat.textbox, TweenInfo.new(0.1), {TextColor3 = theme.textbox_text_hover}):Play()
  905. end)
  906. cheat.background.MouseLeave:Connect(function()
  907. finity.gs["TweenService"]:Create(cheat.textbox, TweenInfo.new(0.1), {TextColor3 = theme.textbox_text}):Play()
  908. end)
  909. cheat.textbox.Focused:Connect(function()
  910. typing = true
  911.  
  912. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.textbox_background_hover}):Play()
  913. end)
  914. cheat.textbox.FocusLost:Connect(function()
  915. typing = false
  916.  
  917. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.textbox_background}):Play()
  918. finity.gs["TweenService"]:Create(cheat.textbox, TweenInfo.new(0.1), {TextColor3 = theme.textbox_text}):Play()
  919.  
  920. cheat.value = cheat.textbox.Text
  921.  
  922. if callback then
  923. local s, e = pcall(function()
  924. callback(cheat.value)
  925. end)
  926.  
  927. if not s then warn("error: "..e) end
  928. end
  929. end)
  930.  
  931. cheat.background.Parent = cheat.container
  932. cheat.textbox.Parent = cheat.container
  933. elseif string.lower(kind) == "slider" then
  934. cheat.value = 0
  935.  
  936. local suffix = data.suffix or ""
  937. local minimum = data.min or 0
  938. local maximum = data.max or 1
  939.  
  940. local moveconnection
  941. local releaseconnection
  942.  
  943. cheat.sliderbar = finity:Create("ImageButton", {
  944. Name = "Sliderbar",
  945. AnchorPoint = Vector2.new(1, 0.5),
  946. BackgroundColor3 = Color3.new(1, 1, 1),
  947. BackgroundTransparency = 1,
  948. Position = UDim2.new(1, 0, 0.5, 0),
  949. Size = UDim2.new(1, 0, 0, 6),
  950. ZIndex = 2,
  951. Image = "rbxassetid://3570695787",
  952. ImageColor3 = theme.slider_background,
  953. ImageTransparency = 0.5,
  954. ScaleType = Enum.ScaleType.Slice,
  955. SliceCenter = Rect.new(100, 100, 100, 100),
  956. SliceScale = 0.02,
  957. })
  958.  
  959. cheat.numbervalue = finity:Create("TextLabel", {
  960. Name = "Value",
  961. AnchorPoint = Vector2.new(0, 0.5),
  962. BackgroundColor3 = Color3.new(1, 1, 1),
  963. BackgroundTransparency = 1,
  964. Position = UDim2.new(0.5, 5, 0.5, 0),
  965. Size = UDim2.new(1, 0, 0, 13),
  966. ZIndex = 2,
  967. Font = Enum.Font.Gotham,
  968. TextXAlignment = Enum.TextXAlignment.Left,
  969. Text = "",
  970. TextTransparency = 1,
  971. TextColor3 = theme.slider_text,
  972. TextSize = 13,
  973. })
  974.  
  975. cheat.visiframe = finity:Create("ImageLabel", {
  976. Name = "Frame",
  977. BackgroundColor3 = Color3.new(1, 1, 1),
  978. BackgroundTransparency = 1,
  979. Size = UDim2.new(0.5, 0, 1, 0),
  980. ZIndex = 2,
  981. Image = "rbxassetid://3570695787",
  982. ImageColor3 = theme.slider_color,
  983. ScaleType = Enum.ScaleType.Slice,
  984. SliceCenter = Rect.new(100, 100, 100, 100),
  985. SliceScale = 0.02
  986. })
  987.  
  988. cheat.sliderbar.MouseButton1Down:Connect(function()
  989. local size = math.clamp(mouse.X - cheat.sliderbar.AbsolutePosition.X, 0, 150)
  990. local percent = size / 150
  991.  
  992. cheat.value = math.floor((minimum + (maximum - minimum) * percent) * 100) / 100
  993. cheat.numbervalue.Text = tostring(cheat.value) .. suffix
  994.  
  995. if callback then
  996. local s, e = pcall(function()
  997. callback(cheat.value)
  998. end)
  999.  
  1000. if not s then warn("error: ".. e) end
  1001. end
  1002.  
  1003. finity.gs["TweenService"]:Create(cheat.visiframe, TweenInfo.new(0.1), {
  1004. Size = UDim2.new(size / 150, 0, 1, 0),
  1005. ImageColor3 = theme.slider_color_sliding
  1006. }):Play()
  1007.  
  1008. finity.gs["TweenService"]:Create(cheat.numbervalue, TweenInfo.new(0.1), {
  1009. Position = UDim2.new(size / 150, 5, 0.5, 0),
  1010. TextTransparency = 0
  1011. }):Play()
  1012.  
  1013. moveconnection = mouse.Move:Connect(function()
  1014. local size = math.clamp(mouse.X - cheat.sliderbar.AbsolutePosition.X, 0, 150)
  1015. local percent = size / 150
  1016.  
  1017. cheat.value = math.floor((minimum + (maximum - minimum) * percent) * 100) / 100
  1018. cheat.numbervalue.Text = tostring(cheat.value) .. suffix
  1019.  
  1020. if callback then
  1021. local s, e = pcall(function()
  1022. callback(cheat.value)
  1023. end)
  1024.  
  1025. if not s then warn("error: ".. e) end
  1026. end
  1027.  
  1028. finity.gs["TweenService"]:Create(cheat.visiframe, TweenInfo.new(0.1), {
  1029. Size = UDim2.new(size / 150, 0, 1, 0),
  1030. ImageColor3 = theme.slider_color_sliding
  1031. }):Play()
  1032.  
  1033. finity.gs["TweenService"]:Create(cheat.numbervalue, TweenInfo.new(0.1), {
  1034. Position = UDim2.new(size / 150, 5, 0.5, 0),
  1035. TextTransparency = 0
  1036. }):Play()
  1037. end)
  1038.  
  1039. releaseconnection = finity.gs["UserInputService"].InputEnded:Connect(function(Mouse)
  1040. if Mouse.UserInputType == Enum.UserInputType.MouseButton1 then
  1041.  
  1042. finity.gs["TweenService"]:Create(cheat.visiframe, TweenInfo.new(0.1), {
  1043. ImageColor3 = theme.slider_color
  1044. }):Play()
  1045.  
  1046. finity.gs["TweenService"]:Create(cheat.numbervalue, TweenInfo.new(0.1), {
  1047. TextTransparency = 1
  1048. }):Play()
  1049.  
  1050. moveconnection:Disconnect()
  1051. moveconnection = nil
  1052. releaseconnection:Disconnect()
  1053. releaseconnection = nil
  1054. end
  1055. end)
  1056. end)
  1057.  
  1058. cheat.visiframe.Parent = cheat.sliderbar
  1059. cheat.numbervalue.Parent = cheat.sliderbar
  1060. cheat.sliderbar.Parent = cheat.container
  1061. elseif string.lower(kind) == "button" then
  1062. local button_text = data and data.text
  1063.  
  1064. cheat.background = finity:Create("ImageLabel", {
  1065. Name = "Background",
  1066. BackgroundColor3 = Color3.new(1, 1, 1),
  1067. BackgroundTransparency = 1,
  1068. Size = UDim2.new(1, 0, 1, 0),
  1069. ZIndex = 2,
  1070. Image = "rbxassetid://3570695787",
  1071. ImageColor3 = theme.button_background,
  1072. ImageTransparency = 0.5,
  1073. ScaleType = Enum.ScaleType.Slice,
  1074. SliceCenter = Rect.new(100, 100, 100, 100),
  1075. SliceScale = 0.02
  1076. })
  1077.  
  1078. cheat.button = finity:Create("TextButton", {
  1079. Name = "Button",
  1080. BackgroundColor3 = Color3.new(1, 1, 1),
  1081. BackgroundTransparency = 1,
  1082. Position = UDim2.new(0, 0, 0, 0),
  1083. Size = UDim2.new(1, 0, 1, 0),
  1084. ZIndex = 2,
  1085. Font = Enum.Font.Gotham,
  1086. Text = button_text or "Button",
  1087. TextColor3 = theme.textbox_text,
  1088. TextSize = 13,
  1089. TextXAlignment = Enum.TextXAlignment.Center
  1090. })
  1091.  
  1092. cheat.button.MouseEnter:Connect(function()
  1093. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background_hover}):Play()
  1094. end)
  1095. cheat.button.MouseLeave:Connect(function()
  1096. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background}):Play()
  1097. end)
  1098. cheat.button.MouseButton1Down:Connect(function()
  1099. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background_down}):Play()
  1100. end)
  1101. cheat.button.MouseButton1Up:Connect(function()
  1102. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background}):Play()
  1103.  
  1104. if callback then
  1105. local s, e = pcall(function()
  1106. callback()
  1107. end)
  1108.  
  1109. if not s then warn("error: ".. e) end
  1110. end
  1111. end)
  1112.  
  1113. cheat.background.Parent = cheat.container
  1114. cheat.button.Parent = cheat.container
  1115.  
  1116. elseif string.lower(kind) == "keybind" or string.lower(kind) == "bind" then
  1117. local callback_bind = data and data.bind
  1118.  
  1119. cheat.background = finity:Create("ImageLabel", {
  1120. Name = "Background",
  1121. BackgroundColor3 = Color3.new(1, 1, 1),
  1122. BackgroundTransparency = 1,
  1123. Size = UDim2.new(1, 0, 1, 0),
  1124. ZIndex = 2,
  1125. Image = "rbxassetid://3570695787",
  1126. ImageColor3 = theme.button_background,
  1127. ImageTransparency = 0.5,
  1128. ScaleType = Enum.ScaleType.Slice,
  1129. SliceCenter = Rect.new(100, 100, 100, 100),
  1130. SliceScale = 0.02
  1131. })
  1132.  
  1133. cheat.button = finity:Create("TextButton", {
  1134. Name = "Button",
  1135. BackgroundColor3 = Color3.new(1, 1, 1),
  1136. BackgroundTransparency = 1,
  1137. Position = UDim2.new(0, 0, 0, 0),
  1138. Size = UDim2.new(1, 0, 1, 0),
  1139. ZIndex = 2,
  1140. Font = Enum.Font.Gotham,
  1141. Text = "Click to Bind",
  1142. TextColor3 = theme.textbox_text,
  1143. TextSize = 13,
  1144. TextXAlignment = Enum.TextXAlignment.Center
  1145. })
  1146.  
  1147. cheat.button.MouseEnter:Connect(function()
  1148. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background_hover}):Play()
  1149. end)
  1150. cheat.button.MouseLeave:Connect(function()
  1151. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background}):Play()
  1152. end)
  1153. cheat.button.MouseButton1Down:Connect(function()
  1154. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background_down}):Play()
  1155. end)
  1156. cheat.button.MouseButton1Up:Connect(function()
  1157. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background}):Play()
  1158. cheat.button.Text = "Press key..."
  1159.  
  1160. local connection
  1161. connection = finity.gs["UserInputService"].InputBegan:Connect(function(Input)
  1162. if Input.KeyCode ~= finityData.ToggleKey and Input.KeyCode ~= Enum.KeyCode.Backspace then
  1163. cheat.button.Text = "Bound to " .. tostring(Input.KeyCode.Name)
  1164. connection:Disconnect()
  1165. connection = nil
  1166.  
  1167. delay(0, function()
  1168. callback_bind = Input.KeyCode
  1169. end)
  1170. elseif Input.KeyCode == Enum.KeyCode.Backspace then
  1171. callback_bind = nil
  1172. cheat.button.Text = "Click to Bind"
  1173. connection:Disconnect()
  1174. connection = nil
  1175. elseif Input.KeyCode == finityData.ToggleKey then
  1176. cheat.button.Text = "different key pls"
  1177. end
  1178. end)
  1179. end)
  1180.  
  1181.  
  1182. finity.gs["UserInputService"].InputBegan:Connect(function(Input)
  1183. if callback_bind and Input.KeyCode == callback_bind then
  1184. if callback then
  1185. local s, e = pcall(function()
  1186. callback(Input.KeyCode)
  1187. end)
  1188.  
  1189. if not s then warn("error: ".. e) end
  1190. end
  1191. end
  1192. end)
  1193.  
  1194. if callback_bind then
  1195. cheat.button.Text = "Bound to " .. tostring(callback_bind.Name)
  1196. end
  1197.  
  1198. cheat.background.Parent = cheat.container
  1199. cheat.button.Parent = cheat.container
  1200. end
  1201. end
  1202.  
  1203. cheat.frame.Parent = sector.container
  1204. cheat.label.Parent = cheat.frame
  1205. cheat.container.Parent = cheat.frame
  1206.  
  1207. return cheat
  1208. end
  1209.  
  1210. sector.frame.Parent = category[calculateSector()]
  1211. sector.container.Parent = sector.frame
  1212. sector.title.Parent = sector.frame
  1213.  
  1214. return sector
  1215. end
  1216.  
  1217. firstCategory = false
  1218.  
  1219. return category
  1220. end
  1221.  
  1222. self:addShadow(self2.container, 0)
  1223.  
  1224. self2.categories.ClipsDescendants = true
  1225.  
  1226. if not finity.gs["RunService"]:IsStudio() then
  1227. self2.userinterface.Parent = self.gs["CoreGui"]
  1228. else
  1229. self2.userinterface.Parent = self.gs["Players"].LocalPlayer:WaitForChild("PlayerGui")
  1230. end
  1231.  
  1232. self2.container.Parent = self2.userinterface
  1233. self2.categories.Parent = self2.container
  1234. self2.sidebar.Parent = self2.container
  1235. self2.topbar.Parent = self2.container
  1236. self2.tip.Parent = self2.topbar
  1237.  
  1238. return self2, finityData
  1239. end
  1240.  
  1241. return finity
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement