SKIDNOOB

Finity Edit

Sep 29th, 2020 (edited)
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 52.28 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.5
  13. Date:
  14. April 21th, 2020
  15. Author:
  16. detourious @ v3rmillion.netf
  17.  
  18. --]]
  19.  
  20.  
  21. local finity = {}
  22. finity.gs = {}
  23.  
  24. finity.theme = { -- light
  25. main_container = Color3.fromRGB(249, 249, 255),
  26. separator_color = Color3.fromRGB(223, 219, 228),
  27.  
  28. text_color = Color3.fromRGB(96, 96, 96),
  29.  
  30. category_button_background = Color3.fromRGB(223, 219, 228),
  31. category_button_border = Color3.fromRGB(200, 196, 204),
  32.  
  33. checkbox_checked = Color3.fromRGB(114, 214, 112),
  34. checkbox_outer = Color3.fromRGB(198, 189, 202),
  35. checkbox_inner = Color3.fromRGB(249, 239, 255),
  36.  
  37. slider_color = Color3.fromRGB(114, 214, 112),
  38. slider_color_sliding = Color3.fromRGB(114, 214, 112),
  39. slider_background = Color3.fromRGB(198, 188, 202),
  40. slider_text = Color3.fromRGB(112, 112, 112),
  41.  
  42. textbox_background = Color3.fromRGB(198, 189, 202),
  43. textbox_background_hover = Color3.fromRGB(215, 206, 227),
  44. textbox_text = Color3.fromRGB(112, 112, 112),
  45. textbox_text_hover = Color3.fromRGB(50, 50, 50),
  46. textbox_placeholder = Color3.fromRGB(178, 178, 178),
  47.  
  48. dropdown_background = Color3.fromRGB(198, 189, 202),
  49. dropdown_text = Color3.fromRGB(112, 112, 112),
  50. dropdown_text_hover = Color3.fromRGB(50, 50, 50),
  51. dropdown_scrollbar_color = Color3.fromRGB(198, 189, 202),
  52.  
  53. button_background = Color3.fromRGB(198, 189, 202),
  54. button_background_hover = Color3.fromRGB(215, 206, 227),
  55. button_background_down = Color3.fromRGB(178, 169, 182),
  56.  
  57. scrollbar_color = Color3.fromRGB(198, 189, 202),
  58. }
  59.  
  60. finity.dark_theme = { -- dark
  61. main_container = Color3.fromRGB(32, 32, 33),
  62. separator_color = Color3.fromRGB(63, 63, 65),
  63.  
  64. text_color = Color3.fromRGB(206, 206, 206),
  65.  
  66. category_button_background = Color3.fromRGB(63, 62, 65),
  67. category_button_border = Color3.fromRGB(72, 71, 74),
  68.  
  69. checkbox_checked = Color3.fromRGB(132, 255, 130),
  70. checkbox_outer = Color3.fromRGB(84, 81, 86),
  71. checkbox_inner = Color3.fromRGB(132, 132, 136),
  72.  
  73. slider_color = Color3.fromRGB(177, 177, 177),
  74. slider_color_sliding = Color3.fromRGB(132, 255, 130),
  75. slider_background = Color3.fromRGB(88, 84, 90),
  76. slider_text = Color3.fromRGB(177, 177, 177),
  77.  
  78. textbox_background = Color3.fromRGB(103, 103, 106),
  79. textbox_background_hover = Color3.fromRGB(137, 137, 141),
  80. textbox_text = Color3.fromRGB(195, 195, 195),
  81. textbox_text_hover = Color3.fromRGB(232, 232, 232),
  82. textbox_placeholder = Color3.fromRGB(135, 135, 138),
  83.  
  84. dropdown_background = Color3.fromRGB(88, 88, 91),
  85. dropdown_text = Color3.fromRGB(195, 195, 195),
  86. dropdown_text_hover = Color3.fromRGB(232, 232, 232),
  87. dropdown_scrollbar_color = Color3.fromRGB(118, 118, 121),
  88.  
  89. button_background = Color3.fromRGB(103, 103, 106),
  90. button_background_hover = Color3.fromRGB(137, 137, 141),
  91. button_background_down = Color3.fromRGB(70, 70, 81),
  92.  
  93. scrollbar_color = Color3.fromRGB(118, 118, 121),
  94. }
  95.  
  96. setmetatable(finity.gs, {
  97. __index = function(_, service)
  98. return game:GetService(service)
  99. end,
  100. __newindex = function(t, i)
  101. t[i] = nil
  102. return
  103. end
  104. })
  105.  
  106.  
  107. local mouse = finity.gs["Players"].LocalPlayer:GetMouse()
  108.  
  109. function finity:Create(class, properties)
  110. local object = Instance.new(class)
  111.  
  112. for prop, val in next, properties do
  113. if object[prop] and prop ~= "Parent" then
  114. object[prop] = val
  115. end
  116. end
  117.  
  118. return object
  119. end
  120.  
  121. function finity:addShadow(object, transparency)
  122. local shadow = self:Create("ImageLabel", {
  123. Name = "Shadow",
  124. AnchorPoint = Vector2.new(0.5, 0.5),
  125. BackgroundTransparency = 1,
  126. Position = UDim2.new(0.5, 0, 0.5, 4),
  127. Size = UDim2.new(1, 6, 1, 6),
  128. Image = "rbxassetid://1316045217",
  129. ImageTransparency = transparency and true or 0.5,
  130. ImageColor3 = Color3.fromRGB(35, 35, 35),
  131. ScaleType = Enum.ScaleType.Slice,
  132. SliceCenter = Rect.new(10, 10, 118, 118)
  133. })
  134.  
  135. shadow.Parent = object
  136. end
  137.  
  138. function finity.new(isdark, gprojectName, thinProject)
  139. local finityObject = {}
  140. local self2 = finityObject
  141. local self = finity
  142.  
  143. if not finity.gs["RunService"]:IsStudio() and self.gs["CoreGui"]:FindFirstChild("FinityUI") then
  144.  
  145. self.gs["CoreGui"]:FindFirstChild("FinityUI"):Destroy()
  146. end
  147.  
  148. local theme = finity.theme
  149. local projectName = false
  150. local thinMenu = false
  151.  
  152. if isdark == true then theme = finity.dark_theme end
  153. if gprojectName then projectName = gprojectName end
  154. if thinProject then thinMenu = thinProject end
  155.  
  156. local toggled = true
  157. local typing = false
  158. local firstCategory = true
  159. local savedposition = UDim2.new(0.5, 0, 0.5, 0)
  160.  
  161.  
  162. local finityData
  163. finityData = {
  164. UpConnection = nil,
  165. ToggleKey = Enum.KeyCode.Home,
  166. }
  167.  
  168. self2.ChangeToggleKey = function(NewKey)
  169. finityData.ToggleKey = NewKey
  170.  
  171. if not projectName then
  172. self2.tip.Text = "Press '".. string.sub(tostring(NewKey), 14) .."' to hide this menu"
  173. end
  174.  
  175. if finityData.UpConnection then
  176. finityData.UpConnection:Disconnect()
  177. end
  178.  
  179. finityData.UpConnection = finity.gs["UserInputService"].InputEnded:Connect(function(Input)
  180. if Input.KeyCode == finityData.ToggleKey and not typing then
  181. toggled = not toggled
  182.  
  183. pcall(function() self2.modal.Modal = toggled end)
  184.  
  185. if toggled then
  186. pcall(self2.container.TweenPosition, self2.container, savedposition, "Out", "Sine", 0.5, true)
  187. else
  188. savedposition = self2.container.Position;
  189. pcall(self2.container.TweenPosition, self2.container, UDim2.new(savedposition.Width.Scale, savedposition.Width.Offset, 1.5, 0), "Out", "Sine", 0.5, true)
  190. end
  191. end
  192. end)
  193. end
  194.  
  195. self2.ChangeBackgroundImage = function(ImageID, Transparency)
  196. self2.container.Image = ImageID
  197.  
  198. if Transparency then
  199. self2.container.ImageTransparency = Transparency
  200. else
  201. self2.container.ImageTransparency = 0.8
  202. end
  203. end
  204.  
  205. finityData.UpConnection = finity.gs["UserInputService"].InputEnded:Connect(function(Input)
  206. if Input.KeyCode == finityData.ToggleKey and not typing then
  207. toggled = not toggled
  208.  
  209. if toggled then
  210. self2.container:TweenPosition(UDim2.new(0.5, 0, 0.5, 0), "Out", "Sine", 0.5, true)
  211. else
  212. self2.container:TweenPosition(UDim2.new(0.5, 0, 1.5, 0), "Out", "Sine", 0.5, true)
  213. end
  214. end
  215. end)
  216.  
  217. self2.userinterface = self:Create("ScreenGui", {
  218. Name = "FinityUI",
  219. ZIndexBehavior = Enum.ZIndexBehavior.Global,
  220. ResetOnSpawn = false,
  221. })
  222.  
  223. self2.container = self:Create("ImageLabel", {
  224. Draggable = true,
  225. Active = true,
  226. Name = "Container",
  227. AnchorPoint = Vector2.new(0.5, 0.5),
  228. BackgroundTransparency = 0,
  229. BackgroundColor3 = theme.main_container,
  230. BorderSizePixel = 0,
  231. Position = UDim2.new(0.5, 0, 0.5, 0),
  232. Size = UDim2.new(0, 800, 0, 500),
  233. ZIndex = 2,
  234. ImageTransparency = 1
  235. })
  236.  
  237. self2.modal = self:Create("TextButton", {
  238. Text = "";
  239. Transparency = 1;
  240. Modal = true;
  241. }) self2.modal.Parent = self2.userinterface;
  242.  
  243. if thinProject and typeof(thinProject) == "UDim2" then
  244. self2.container.Size = thinProject
  245. end
  246.  
  247. self2.container.Draggable = true
  248. self2.container.Active = true
  249.  
  250. self2.sidebar = self:Create("Frame", {
  251. Name = "Sidebar",
  252. BackgroundColor3 = Color3.new(0.976471, 0.937255, 1),
  253. BackgroundTransparency = 1,
  254. BorderColor3 = Color3.new(0.745098, 0.713726, 0.760784),
  255. Size = UDim2.new(0, 120, 1, -30),
  256. Position = UDim2.new(0, 0, 0, 30),
  257. ZIndex = 2,
  258. })
  259.  
  260. self2.categories = self:Create("Frame", {
  261. Name = "Categories",
  262. BackgroundColor3 = Color3.new(0.976471, 0.937255, 1),
  263. ClipsDescendants = true,
  264. BackgroundTransparency = 1,
  265. BorderColor3 = Color3.new(0.745098, 0.713726, 0.760784),
  266. Size = UDim2.new(1, -120, 1, -30),
  267. AnchorPoint = Vector2.new(1, 0),
  268. Position = UDim2.new(1, 0, 0, 30),
  269. ZIndex = 2,
  270. })
  271. self2.categories.ClipsDescendants = true
  272.  
  273. self2.topbar = self:Create("Frame", {
  274. Name = "Topbar",
  275. ZIndex = 2,
  276. Size = UDim2.new(1,0,0,30),
  277. BackgroundTransparency = 2
  278. })
  279.  
  280. self2.tip = self:Create("TextLabel", {
  281. Name = "TopbarTip",
  282. ZIndex = 2,
  283. Size = UDim2.new(1, -30, 0, 30),
  284. Position = UDim2.new(0, 370, 0, 0),
  285. Text = "Press '".. string.sub(tostring(self.ToggleKey), 14) .."' to hide this menu",
  286. Font = Enum.Font.GothamSemibold,
  287. TextSize = 13,
  288. TextXAlignment = Enum.TextXAlignment.Left,
  289. BackgroundTransparency = 1,
  290. TextColor3 = theme.text_color,
  291. })
  292.  
  293. if projectName then
  294. self2.tip.Text = projectName
  295. else
  296. self2.tip.Text = "Press '".. string.sub(tostring(self.ToggleKey), 14) .."' to hide this menu"
  297. end
  298.  
  299. function finity.settitle(text)
  300. self2.tip.Text = tostring(text)
  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. function cheat:SetValue(value)
  777. cheat.value = value
  778. if cheat.value then
  779. finity.gs["TweenService"]:Create(cheat.outerbox, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_checked}):Play()
  780. finity.gs["TweenService"]:Create(cheat.checkboxbutton, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_checked}):Play()
  781. else
  782. finity.gs["TweenService"]:Create(cheat.outerbox, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_outer}):Play()
  783. finity.gs["TweenService"]:Create(cheat.checkboxbutton, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_inner}):Play()
  784. end
  785. if callback then
  786. local s, e = pcall(function()
  787. callback(cheat.value)
  788. end)
  789. if not s then
  790. warn("error: "..e)
  791. end
  792. end
  793. end
  794.  
  795. cheat.hsvbar.Parent = cheat.container
  796. cheat.arrowpreview.Parent = cheat.hsvbar
  797. elseif string.lower(kind) == "dropdown" then
  798. if data then
  799. if data.default then
  800. cheat.value = data.default
  801. elseif data.options then
  802. cheat.value = data.options[1]
  803. else
  804. cheat.value = "None"
  805. end
  806. end
  807.  
  808. local options
  809.  
  810. if data and data.options then
  811. options = data.options
  812. end
  813.  
  814. cheat.dropped = false
  815.  
  816. cheat.dropdown = finity:Create("ImageButton", {
  817. Name = "Dropdown",
  818. BackgroundColor3 = Color3.new(1, 1, 1),
  819. BackgroundTransparency = 1,
  820. Size = UDim2.new(1, 0, 1, 0),
  821. ZIndex = 2,
  822. Image = "rbxassetid://3570695787",
  823. ImageColor3 = theme.dropdown_background,
  824. ImageTransparency = 0.5,
  825. ScaleType = Enum.ScaleType.Slice,
  826. SliceCenter = Rect.new(100, 100, 100, 100),
  827. SliceScale = 0.02
  828. })
  829.  
  830. cheat.selected = finity:Create("TextLabel", {
  831. Name = "Selected",
  832. BackgroundColor3 = Color3.new(1, 1, 1),
  833. BackgroundTransparency = 1,
  834. Position = UDim2.new(0, 10, 0, 0),
  835. Size = UDim2.new(1, -35, 1, 0),
  836. ZIndex = 2,
  837. Font = Enum.Font.Gotham,
  838. Text = tostring(cheat.value),
  839. TextColor3 = theme.dropdown_text,
  840. TextSize = 13,
  841. TextXAlignment = Enum.TextXAlignment.Left
  842. })
  843.  
  844. cheat.list = finity:Create("ScrollingFrame", {
  845. Name = "List",
  846. BackgroundColor3 = theme.dropdown_background,
  847. BackgroundTransparency = 0.5,
  848. BorderSizePixel = 0,
  849. Position = UDim2.new(0, 0, 1, 0),
  850. Size = UDim2.new(1, 0, 0, 100),
  851. ZIndex = 3,
  852. BottomImage = "rbxassetid://967852042",
  853. MidImage = "rbxassetid://967852042",
  854. TopImage = "rbxassetid://967852042",
  855. ScrollBarThickness = 4,
  856. VerticalScrollBarInset = Enum.ScrollBarInset.None,
  857. ScrollBarImageColor3 = theme.dropdown_scrollbar_color
  858. })
  859.  
  860. local uilistlayout = finity:Create("UIListLayout", {
  861. SortOrder = Enum.SortOrder.LayoutOrder,
  862. Padding = UDim.new(0, 2)
  863. })
  864. uilistlayout.Parent = cheat.list
  865. uilistlayout = nil
  866. local uipadding = finity:Create("UIPadding", {
  867. PaddingLeft = UDim.new(0, 2)
  868. })
  869. uipadding.Parent = cheat.list
  870. uipadding = nil
  871.  
  872. local function refreshOptions()
  873. if cheat.dropped then
  874. cheat.fadelist()
  875. end
  876.  
  877. for _, child in next, cheat.list:GetChildren() do
  878. if child:IsA("TextButton") then
  879. child:Destroy()
  880. end
  881. end
  882.  
  883. for _, value in next, options do
  884. local button = finity:Create("TextButton", {
  885. BackgroundColor3 = Color3.new(1, 1, 1),
  886. BackgroundTransparency = 1,
  887. Size = UDim2.new(1, 0, 0, 20),
  888. ZIndex = 3,
  889. Font = Enum.Font.Gotham,
  890. Text = value,
  891. TextColor3 = theme.dropdown_text,
  892. TextSize = 13
  893. })
  894.  
  895. button.Parent = cheat.list
  896.  
  897. button.MouseEnter:Connect(function()
  898. finity.gs["TweenService"]:Create(button, TweenInfo.new(0.1), {TextColor3 = theme.dropdown_text_hover}):Play()
  899. end)
  900. button.MouseLeave:Connect(function()
  901. finity.gs["TweenService"]:Create(button, TweenInfo.new(0.1), {TextColor3 = theme.dropdown_text}):Play()
  902. end)
  903. button.MouseButton1Click:Connect(function()
  904. if cheat.dropped then
  905. cheat.value = value
  906. cheat.selected.Text = value
  907.  
  908. cheat.fadelist()
  909.  
  910. if callback then
  911. local s, e = pcall(function()
  912. callback(cheat.value)
  913. end)
  914.  
  915. if not s then warn("error: ".. e) end
  916. end
  917. end
  918. end)
  919.  
  920.  
  921. finity.gs["TweenService"]:Create(button, TweenInfo.new(0), {TextTransparency = 1}):Play()
  922. end
  923.  
  924. 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()
  925. end
  926.  
  927.  
  928. function cheat.fadelist()
  929. cheat.dropped = not cheat.dropped
  930.  
  931. if cheat.dropped then
  932. for _, button in next, cheat.list:GetChildren() do
  933. if button:IsA("TextButton") then
  934. finity.gs["TweenService"]:Create(button, TweenInfo.new(0.2), {TextTransparency = 0}):Play()
  935. end
  936. end
  937.  
  938. 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()
  939. else
  940. for _, button in next, cheat.list:GetChildren() do
  941. if button:IsA("TextButton") then
  942. finity.gs["TweenService"]:Create(button, TweenInfo.new(0.2), {TextTransparency = 1}):Play()
  943. end
  944. end
  945.  
  946. 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()
  947. end
  948. end
  949.  
  950. cheat.dropdown.MouseEnter:Connect(function()
  951. finity.gs["TweenService"]:Create(cheat.selected, TweenInfo.new(0.1), {TextColor3 = theme.dropdown_text_hover}):Play()
  952. end)
  953. cheat.dropdown.MouseLeave:Connect(function()
  954. finity.gs["TweenService"]:Create(cheat.selected, TweenInfo.new(0.1), {TextColor3 = theme.dropdown_text}):Play()
  955. end)
  956. cheat.dropdown.MouseButton1Click:Connect(function()
  957. cheat.fadelist()
  958. end)
  959.  
  960. refreshOptions()
  961.  
  962. function cheat:RemoveOption(value)
  963. local removed = false
  964. for index, option in next, options do
  965. if option == value then
  966. table.remove(options, index)
  967. removed = true
  968. break
  969. end
  970. end
  971.  
  972. if removed then
  973. refreshOptions()
  974. end
  975.  
  976. return removed
  977. end
  978.  
  979. function cheat:AddOption(value)
  980. table.insert(options, value)
  981.  
  982. refreshOptions()
  983. end
  984.  
  985. function cheat:SetValue(value)
  986. cheat.selected.Text = value
  987. cheat.value = value
  988.  
  989. if cheat.dropped then
  990. cheat.fadelist()
  991. end
  992.  
  993. if callback then
  994. local s, e = pcall(function()
  995. callback(cheat.value)
  996. end)
  997.  
  998. if not s then warn("error: ".. e) end
  999. end
  1000. end
  1001.  
  1002. cheat.selected.Parent = cheat.dropdown
  1003. cheat.dropdown.Parent = cheat.container
  1004. cheat.list.Parent = cheat.container
  1005. elseif string.lower(kind) == "textbox" then
  1006. local placeholdertext = data and data.placeholder
  1007.  
  1008. cheat.background = finity:Create("ImageLabel", {
  1009. Name = "Background",
  1010. BackgroundColor3 = Color3.new(1, 1, 1),
  1011. BackgroundTransparency = 1,
  1012. Size = UDim2.new(1, 0, 1, 0),
  1013. ZIndex = 2,
  1014. Image = "rbxassetid://3570695787",
  1015. ImageColor3 = theme.textbox_background,
  1016. ImageTransparency = 0.5,
  1017. ScaleType = Enum.ScaleType.Slice,
  1018. SliceCenter = Rect.new(100, 100, 100, 100),
  1019. SliceScale = 0.02
  1020. })
  1021.  
  1022. cheat.textbox = finity:Create("TextBox", {
  1023. Name = "Textbox",
  1024. BackgroundColor3 = Color3.new(1, 1, 1),
  1025. BackgroundTransparency = 1,
  1026. Position = UDim2.new(0, 0, 0, 0),
  1027. Size = UDim2.new(1, 0, 1, 0),
  1028. ZIndex = 2,
  1029. Font = Enum.Font.Gotham,
  1030. Text = "",
  1031. TextColor3 = theme.textbox_text,
  1032. PlaceholderText = placeholdertext or "Value",
  1033. TextSize = 13,
  1034. TextXAlignment = Enum.TextXAlignment.Center,
  1035. ClearTextOnFocus = false
  1036. })
  1037.  
  1038. cheat.background.MouseEnter:Connect(function()
  1039. finity.gs["TweenService"]:Create(cheat.textbox, TweenInfo.new(0.1), {TextColor3 = theme.textbox_text_hover}):Play()
  1040. end)
  1041. cheat.background.MouseLeave:Connect(function()
  1042. finity.gs["TweenService"]:Create(cheat.textbox, TweenInfo.new(0.1), {TextColor3 = theme.textbox_text}):Play()
  1043. end)
  1044. cheat.textbox.Focused:Connect(function()
  1045. typing = true
  1046.  
  1047. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.textbox_background_hover}):Play()
  1048. end)
  1049. cheat.textbox.FocusLost:Connect(function()
  1050. typing = false
  1051.  
  1052. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.textbox_background}):Play()
  1053. finity.gs["TweenService"]:Create(cheat.textbox, TweenInfo.new(0.1), {TextColor3 = theme.textbox_text}):Play()
  1054.  
  1055. cheat.value = cheat.textbox.Text
  1056.  
  1057. if callback then
  1058. local s, e = pcall(function()
  1059. callback(cheat.value)
  1060. end)
  1061.  
  1062. if not s then warn("error: "..e) end
  1063. end
  1064. end)
  1065. function cheat:SetValue(value)
  1066. cheat.value = tostring(value)
  1067. cheat.textbox.Text = tostring(val)
  1068. end
  1069.  
  1070. cheat.background.Parent = cheat.container
  1071. cheat.textbox.Parent = cheat.container
  1072. elseif string.lower(kind) == "slider" then
  1073. cheat.value = 0
  1074.  
  1075. local suffix = data.suffix or ""
  1076. local minimum = data.min or 0
  1077. local maximum = data.max or 1
  1078. local default = data.default
  1079. local precise = data.precise
  1080.  
  1081. local moveconnection
  1082. local releaseconnection
  1083.  
  1084. cheat.sliderbar = finity:Create("ImageButton", {
  1085. Name = "Sliderbar",
  1086. AnchorPoint = Vector2.new(1, 0.5),
  1087. BackgroundColor3 = Color3.new(1, 1, 1),
  1088. BackgroundTransparency = 1,
  1089. Position = UDim2.new(1, 0, 0.5, 0),
  1090. Size = UDim2.new(1, 0, 0, 6),
  1091. ZIndex = 2,
  1092. Image = "rbxassetid://3570695787",
  1093. ImageColor3 = theme.slider_background,
  1094. ImageTransparency = 0.5,
  1095. ScaleType = Enum.ScaleType.Slice,
  1096. SliceCenter = Rect.new(100, 100, 100, 100),
  1097. SliceScale = 0.02,
  1098. })
  1099.  
  1100. cheat.numbervalue = finity:Create("TextLabel", {
  1101. Name = "Value",
  1102. AnchorPoint = Vector2.new(0, 0.5),
  1103. BackgroundColor3 = Color3.new(1, 1, 1),
  1104. BackgroundTransparency = 1,
  1105. Position = UDim2.new(0.5, 5, 0.5, 0),
  1106. Size = UDim2.new(1, 0, 0, 13),
  1107. ZIndex = 2,
  1108. Font = Enum.Font.Gotham,
  1109. TextXAlignment = Enum.TextXAlignment.Left,
  1110. Text = "",
  1111. TextTransparency = 1,
  1112. TextColor3 = theme.slider_text,
  1113. TextSize = 13,
  1114. })
  1115.  
  1116. cheat.visiframe = finity:Create("ImageLabel", {
  1117. Name = "Frame",
  1118. BackgroundColor3 = Color3.new(1, 1, 1),
  1119. BackgroundTransparency = 1,
  1120. Size = UDim2.new(0.5, 0, 1, 0),
  1121. ZIndex = 2,
  1122. Image = "rbxassetid://3570695787",
  1123. ImageColor3 = theme.slider_color,
  1124. ScaleType = Enum.ScaleType.Slice,
  1125. SliceCenter = Rect.new(100, 100, 100, 100),
  1126. SliceScale = 0.02
  1127. })
  1128.  
  1129. if data.default then
  1130. local size = math.clamp(data.default - cheat.sliderbar.AbsolutePosition.X, 0, 150)
  1131. local percent = size / 150
  1132. local perc = default/maximum
  1133. cheat.value = math.floor((minimum + (maximum - minimum) * percent) * 100) / 100
  1134. finity.gs["TweenService"]:Create(cheat.visiframe, TweenInfo.new(0.1), {
  1135. Size = UDim2.new(perc, 0, 1, 0),
  1136. }):Play()
  1137. if callback then
  1138. local s, e = pcall(function()
  1139. callback(cheat.value)
  1140. end)
  1141.  
  1142. if not s then warn("error: ".. e) end
  1143. end
  1144. end
  1145.  
  1146. function cheat:SetValue(value)
  1147. local size = math.clamp(value - cheat.sliderbar.AbsolutePosition.X, 0, 150)
  1148. local percent = size / 150
  1149. local perc = default/maximum
  1150. cheat.value = math.floor((minimum + (maximum - minimum) * percent) * 100) / 100
  1151. finity.gs["TweenService"]:Create(cheat.visiframe, TweenInfo.new(0.1), {
  1152. Size = UDim2.new(perc, 0, 1, 0),
  1153. }):Play()
  1154. if callback then
  1155. local s, e = pcall(function()
  1156. callback(cheat.value)
  1157. end)
  1158.  
  1159. if not s then warn("error: ".. e) end
  1160. end
  1161. end
  1162.  
  1163. cheat.sliderbar.MouseButton1Down:Connect(function()
  1164. local size = math.clamp(mouse.X - cheat.sliderbar.AbsolutePosition.X, 0, 150)
  1165. local percent = size / 150
  1166.  
  1167. cheat.value = math.floor((minimum + (maximum - minimum) * percent) * 100) / 100
  1168. if precise then
  1169. cheat.numbervalue.Text = math.ceil(tostring(cheat.value)) .. suffix
  1170. else
  1171. cheat.numbervalue.Text = tostring(cheat.value) .. suffix
  1172. end
  1173.  
  1174. if callback then
  1175. local s, e = pcall(function()
  1176. if data.precise then
  1177. callback(math.ceil(cheat.value))
  1178. else
  1179. callback(cheat.value)
  1180. end
  1181. end)
  1182.  
  1183. if not s then warn("error: ".. e) end
  1184. end
  1185.  
  1186. finity.gs["TweenService"]:Create(cheat.visiframe, TweenInfo.new(0.1), {
  1187. Size = UDim2.new(size / 150, 0, 1, 0),
  1188. ImageColor3 = theme.slider_color_sliding
  1189. }):Play()
  1190.  
  1191. finity.gs["TweenService"]:Create(cheat.numbervalue, TweenInfo.new(0.1), {
  1192. Position = UDim2.new(size / 150, 5, 0.5, 0),
  1193. TextTransparency = 0
  1194. }):Play()
  1195.  
  1196. moveconnection = mouse.Move:Connect(function()
  1197. local size = math.clamp(mouse.X - cheat.sliderbar.AbsolutePosition.X, 0, 150)
  1198. local percent = size / 150
  1199.  
  1200. cheat.value = math.floor((minimum + (maximum - minimum) * percent) * 100) / 100
  1201. if precise then
  1202. cheat.numbervalue.Text = math.ceil(tostring(cheat.value)) .. suffix
  1203. else
  1204. cheat.numbervalue.Text = tostring(cheat.value) .. suffix
  1205. end
  1206.  
  1207. if callback then
  1208. local s, e = pcall(function()
  1209. if data.precise then
  1210. callback(math.ceil(cheat.value))
  1211. else
  1212. callback(cheat.value)
  1213. end
  1214. end)
  1215.  
  1216. if not s then warn("error: ".. e) end
  1217. end
  1218.  
  1219. finity.gs["TweenService"]:Create(cheat.visiframe, TweenInfo.new(0.1), {
  1220. Size = UDim2.new(size / 150, 0, 1, 0),
  1221. ImageColor3 = theme.slider_color_sliding
  1222. }):Play()
  1223.  
  1224. local Position = UDim2.new(size / 150, 5, 0.5, 0);
  1225.  
  1226. if Position.Width.Scale >= 0.6 then
  1227. Position = UDim2.new(1, -cheat.numbervalue.TextBounds.X, 0.5, 10);
  1228. end
  1229.  
  1230. finity.gs["TweenService"]:Create(cheat.numbervalue, TweenInfo.new(0.1), {
  1231. Position = Position,
  1232. TextTransparency = 0
  1233. }):Play()
  1234. end)
  1235.  
  1236. releaseconnection = finity.gs["UserInputService"].InputEnded:Connect(function(Mouse)
  1237. if Mouse.UserInputType == Enum.UserInputType.MouseButton1 then
  1238.  
  1239. finity.gs["TweenService"]:Create(cheat.visiframe, TweenInfo.new(0.1), {
  1240. ImageColor3 = theme.slider_color
  1241. }):Play()
  1242.  
  1243. finity.gs["TweenService"]:Create(cheat.numbervalue, TweenInfo.new(0.1), {
  1244. TextTransparency = 1
  1245. }):Play()
  1246.  
  1247. moveconnection:Disconnect()
  1248. moveconnection = nil
  1249. releaseconnection:Disconnect()
  1250. releaseconnection = nil
  1251. end
  1252. end)
  1253. end)
  1254.  
  1255. cheat.visiframe.Parent = cheat.sliderbar
  1256. cheat.numbervalue.Parent = cheat.sliderbar
  1257. cheat.sliderbar.Parent = cheat.container
  1258. elseif string.lower(kind) == "button" then
  1259. local button_text = data and data.text
  1260.  
  1261. cheat.background = finity:Create("ImageLabel", {
  1262. Name = "Background",
  1263. BackgroundColor3 = Color3.new(1, 1, 1),
  1264. BackgroundTransparency = 1,
  1265. Size = UDim2.new(1, 0, 1, 0),
  1266. ZIndex = 2,
  1267. Image = "rbxassetid://3570695787",
  1268. ImageColor3 = theme.button_background,
  1269. ImageTransparency = 0.5,
  1270. ScaleType = Enum.ScaleType.Slice,
  1271. SliceCenter = Rect.new(100, 100, 100, 100),
  1272. SliceScale = 0.02
  1273. })
  1274.  
  1275. cheat.button = finity:Create("TextButton", {
  1276. Name = "Button",
  1277. BackgroundColor3 = Color3.new(1, 1, 1),
  1278. BackgroundTransparency = 1,
  1279. Position = UDim2.new(0, 0, 0, 0),
  1280. Size = UDim2.new(1, 0, 1, 0),
  1281. ZIndex = 2,
  1282. Font = Enum.Font.Gotham,
  1283. Text = button_text or "Button",
  1284. TextColor3 = theme.textbox_text,
  1285. TextSize = 13,
  1286. TextXAlignment = Enum.TextXAlignment.Center
  1287. })
  1288.  
  1289. cheat.button.MouseEnter:Connect(function()
  1290. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background_hover}):Play()
  1291. end)
  1292. cheat.button.MouseLeave:Connect(function()
  1293. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background}):Play()
  1294. end)
  1295. cheat.button.MouseButton1Down:Connect(function()
  1296. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background_down}):Play()
  1297. end)
  1298. cheat.button.MouseButton1Up:Connect(function()
  1299. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background}):Play()
  1300.  
  1301. if callback then
  1302. local s, e = pcall(function()
  1303. callback()
  1304. end)
  1305.  
  1306. if not s then warn("error: ".. e) end
  1307. end
  1308. end)
  1309.  
  1310. function cheat:Fire()
  1311. if callback then
  1312. local s, e = pcall(function()
  1313. callback()
  1314. end)
  1315.  
  1316. if not s then warn("error: ".. e) end
  1317. end
  1318. end
  1319.  
  1320. cheat.background.Parent = cheat.container
  1321. cheat.button.Parent = cheat.container
  1322.  
  1323. elseif string.lower(kind) == "keybind" or string.lower(kind) == "bind" then
  1324. local callback_bind = data and data.bind
  1325. local connection
  1326. cheat.holding = false
  1327.  
  1328. cheat.background = finity:Create("ImageLabel", {
  1329. Name = "Background",
  1330. BackgroundColor3 = Color3.new(1, 1, 1),
  1331. BackgroundTransparency = 1,
  1332. Size = UDim2.new(1, 0, 1, 0),
  1333. ZIndex = 2,
  1334. Image = "rbxassetid://3570695787",
  1335. ImageColor3 = theme.button_background,
  1336. ImageTransparency = 0.5,
  1337. ScaleType = Enum.ScaleType.Slice,
  1338. SliceCenter = Rect.new(100, 100, 100, 100),
  1339. SliceScale = 0.02
  1340. })
  1341.  
  1342. cheat.button = finity:Create("TextButton", {
  1343. Name = "Button",
  1344. BackgroundColor3 = Color3.new(1, 1, 1),
  1345. BackgroundTransparency = 1,
  1346. Position = UDim2.new(0, 0, 0, 0),
  1347. Size = UDim2.new(1, 0, 1, 0),
  1348. ZIndex = 2,
  1349. Font = Enum.Font.Gotham,
  1350. Text = "Click to Bind",
  1351. TextColor3 = theme.textbox_text,
  1352. TextSize = 13,
  1353. TextXAlignment = Enum.TextXAlignment.Center
  1354. })
  1355.  
  1356. cheat.button.MouseEnter:Connect(function()
  1357. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background_hover}):Play()
  1358. end)
  1359. cheat.button.MouseLeave:Connect(function()
  1360. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background}):Play()
  1361. end)
  1362. cheat.button.MouseButton1Down:Connect(function()
  1363. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background_down}):Play()
  1364. end)
  1365. cheat.button.MouseButton2Down:Connect(function()
  1366. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background_down}):Play()
  1367. end)
  1368. cheat.button.MouseButton1Up:Connect(function()
  1369. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background}):Play()
  1370. cheat.button.Text = "Press key..."
  1371.  
  1372. if connection then
  1373. connection:Disconnect()
  1374. connection = nil
  1375. end
  1376. cheat.holding = false
  1377.  
  1378. connection = finity.gs["UserInputService"].InputBegan:Connect(function(Input)
  1379. if Input.UserInputType.Name == "Keyboard" and Input.KeyCode ~= finityData.ToggleKey and Input.KeyCode ~= Enum.KeyCode.Backspace then
  1380. cheat.button.Text = "Bound to " .. tostring(Input.KeyCode.Name)
  1381.  
  1382. if connection then
  1383. connection:Disconnect()
  1384. connection = nil
  1385. end
  1386.  
  1387. delay(0, function()
  1388. callback_bind = Input.KeyCode
  1389. cheat.value = Input.KeyCode
  1390.  
  1391. if callback then
  1392. local s, e = pcall(function()
  1393. callback(Input.KeyCode)
  1394. end)
  1395.  
  1396. if not s then warn("error: ".. e) end
  1397. end
  1398. end)
  1399. elseif Input.KeyCode == Enum.KeyCode.Backspace then
  1400. callback_bind = nil
  1401. cheat.button.Text = "Click to Bind"
  1402. cheat.value = nil
  1403. cheat.holding = false
  1404. delay(0, function()
  1405. if callback then
  1406. local s, e = pcall(function()
  1407. callback()
  1408. end)
  1409.  
  1410. if not s then warn("error: ".. e) end
  1411. end
  1412. end)
  1413.  
  1414. connection:Disconnect()
  1415. connection = nil
  1416. elseif Input.KeyCode == finityData.ToggleKey then
  1417. cheat.button.Text = "Invalid Key";
  1418. cheat.value = nil
  1419. end
  1420. end)
  1421. end)
  1422.  
  1423. cheat.button.MouseButton2Up:Connect(function()
  1424. finity.gs["TweenService"]:Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background}):Play()
  1425. cheat.value = nil
  1426. callback_bind = nil
  1427. cheat.button.Text = "Click to Bind"
  1428. cheat.holding = false
  1429.  
  1430. delay(0, function()
  1431. if callback then
  1432. local s, e = pcall(function()
  1433. callback()
  1434. end)
  1435.  
  1436. if not s then warn("error: ".. e) end
  1437. end
  1438. end)
  1439.  
  1440. if connection then
  1441. connection:Disconnect()
  1442. connection = nil
  1443. end
  1444. end)
  1445.  
  1446. function cheat:SetValue(value)
  1447. cheat.value = tostring(value)
  1448. cheat.button.Text = "Bound to " .. tostring(value)
  1449. end
  1450.  
  1451. finity.gs["UserInputService"].InputBegan:Connect(function(Input, Process)
  1452. if callback_bind and Input.KeyCode == callback_bind and not Process then
  1453. cheat.holding = true
  1454. if callback then
  1455. local s, e = pcall(function()
  1456. callback(Input.KeyCode)
  1457. end)
  1458.  
  1459. if not s then warn("error: ".. e) end
  1460. end
  1461. end
  1462. end)
  1463. finity.gs["UserInputService"].InputBegan:Connect(function(Input, Process)
  1464. if callback_bind and Input.KeyCode == callback_bind and not Process then
  1465. cheat.holding = true
  1466. end
  1467. end)
  1468.  
  1469. if callback_bind then
  1470. cheat.button.Text = "Bound to " .. tostring(callback_bind.Name)
  1471. end
  1472.  
  1473. cheat.background.Parent = cheat.container
  1474. cheat.button.Parent = cheat.container
  1475. end
  1476. end
  1477.  
  1478. cheat.frame.Parent = sector.container
  1479. cheat.label.Parent = cheat.frame
  1480. cheat.container.Parent = cheat.frame
  1481.  
  1482. return cheat
  1483. end
  1484.  
  1485. sector.frame.Parent = category[calculateSector()]
  1486. sector.container.Parent = sector.frame
  1487. sector.title.Parent = sector.frame
  1488.  
  1489. return sector
  1490. end
  1491.  
  1492. firstCategory = false
  1493.  
  1494. return category
  1495. end
  1496.  
  1497. self:addShadow(self2.container, 0)
  1498.  
  1499. self2.categories.ClipsDescendants = true
  1500.  
  1501. if not finity.gs["RunService"]:IsStudio() then
  1502. self2.userinterface.Parent = self.gs["CoreGui"]
  1503. else
  1504. self2.userinterface.Parent = self.gs["Players"].LocalPlayer:WaitForChild("PlayerGui")
  1505. end
  1506.  
  1507. self2.container.Parent = self2.userinterface
  1508. self2.categories.Parent = self2.container
  1509. self2.sidebar.Parent = self2.container
  1510. self2.topbar.Parent = self2.container
  1511. self2.tip.Parent = self2.topbar
  1512.  
  1513. return self2, finityData
  1514. end
  1515.  
  1516. return finity
Add Comment
Please, Sign In to add comment