BailTaashev

Untitled

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