AbstractPoo

Finity

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