Advertisement
brianops1

Finity

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