matekaOSF2

Untitled

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