evannik23

Roblox exploit gui lib

Mar 20th, 2022 (edited)
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 14.23 KB | None | 0 0
  1. local Lib = {}
  2. function Lib:MakeDropdownMenuWButton(Parent, Title,LayoutOrder, Table)
  3.     local Dropdown = Instance.new("Frame",Parent)
  4.     local Button = Instance.new("TextButton",Dropdown)
  5.     local DropdownMenu = Instance.new("ScrollingFrame",Dropdown)
  6.     local UIListLayout = Instance.new("UIListLayout")
  7.     local Arrow = Instance.new("ImageButton")
  8.     local DownSize = UDim2.fromOffset(134,141)
  9.     local UpSize = UDim2.new(0, 134,0, 48)
  10.     local UpImage = ("rbxassetid://")..(67496189)
  11.     local DownImage = ("rbxassetid://")..(53411462)
  12.    
  13.     Dropdown.Name = "Dropdown"
  14.     Dropdown.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  15.     Dropdown.Size = UDim2.new(0, 292, 0, 84)
  16.     Dropdown.LayoutOrder = LayoutOrder
  17.     DropdownMenu.Name = "DropdownMenu"
  18.     DropdownMenu.Parent = Dropdown
  19.     DropdownMenu.Active = true
  20.     DropdownMenu.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  21.     DropdownMenu.Position = UDim2.new(0.465201378, 0, 0, 0)
  22.     DropdownMenu.Size = UDim2.new(0, 134,0, 48)
  23.     DropdownMenu.ScrollingEnabled = false
  24.     DropdownMenu.ScrollBarImageTransparency = 1
  25.     Button.Name = Title
  26.     Button.Parent = Dropdown
  27.     Button.BackgroundColor3 = Color3.fromRGB(170, 0, 0)
  28.     Button.Position = UDim2.new(0, 0, 0.119047627, 0)
  29.     Button.Size = UDim2.new(0, 135, 0, 64)
  30.     Button.Font = Enum.Font.SourceSans
  31.     Button.Text = Title
  32.     Button.TextColor3 = Color3.fromRGB(0, 0, 0)
  33.     Button.TextScaled = true
  34.     Button.TextSize = 14.000
  35.     Button.TextWrapped = true
  36.     UIListLayout.Parent = DropdownMenu
  37.     UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  38.     Arrow.Name = "Arrow"
  39.     Arrow.Parent = Dropdown
  40.     Arrow.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  41.     Arrow.Position = UDim2.new(0.924105525, 0, 0.119047619, 0)
  42.     Arrow.Size = UDim2.new(0, 22, 0, 43)
  43.     Arrow.Image = UpImage
  44.     local SelectedBox = Instance.new("Frame", Dropdown)
  45.     SelectedBox.Name = "SelectedBox"
  46.     SelectedBox.Size = UDim2.new(0, 145, 0, 48)
  47.     SelectedBox.Position = DropdownMenu.Position
  48.     SelectedBox.Size = UDim2.new(0, 134,0, 48)
  49.     SelectedBox.Visible = true
  50.     local SafeStore = Instance.new("Folder", SelectedBox.Parent)
  51.     DropdownMenu.Visible = false
  52.     Arrow.ZIndex = 3
  53.    
  54.     Arrow.MouseButton1Click:Connect(function()
  55.         if DropdownMenu.ScrollingEnabled == false then
  56.             DropdownMenu.Size = DownSize
  57.             DropdownMenu.ScrollingEnabled = true
  58.             SelectedBox.Visible = false
  59.             DropdownMenu.Visible = true
  60.             Arrow.Image = DownImage
  61.         elseif DropdownMenu.ScrollingEnabled == true then
  62.             DropdownMenu.Size = UpSize
  63.             DropdownMenu.ScrollingEnabled = false
  64.             Arrow.Image = UpImage
  65.             SelectedBox.Visible = true
  66.             DropdownMenu.Visible = false
  67.         end
  68.     end)
  69.     for i,v in pairs(SelectedBox:GetChildren()) do
  70.         if v:IsA("TextButton") then
  71.             v:Destroy()
  72.         end
  73.        
  74.     end
  75.     wait(0.1)
  76.    
  77.     for i,v in pairs(Table) do
  78.         local Place = Instance.new("TextButton")
  79.         Place.Name = v
  80.         Place.Parent = DropdownMenu
  81.         Place.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  82.         Place.Size = UDim2.new(0, 145, 0, 48)
  83.         Place.Font = Enum.Font.PatrickHand
  84.         Place.TextColor3 = Color3.fromRGB(255, 255, 255)
  85.         Place.TextScaled = true
  86.         Place.TextSize = 14.000
  87.         Place.TextWrapped = true
  88.         Place.LayoutOrder = i
  89.         Place.Text = v
  90.         if Place.LayoutOrder == 1 then
  91.             local PlaceC = Place:Clone()
  92.             PlaceC.Parent = SelectedBox
  93.             PlaceC.Position = DropdownMenu.Position
  94.             PlaceC.Position = UDim2.fromScale(-0.005,0)
  95.             PlaceC.Active = false
  96.         end
  97.         SelectedBox.Visible = true
  98.         DropdownMenu.Size = UpSize
  99.         DropdownMenu.ScrollingEnabled = false
  100.         Arrow.Image = UpImage
  101.         DropdownMenu.Visible = false
  102.        
  103.         Place.MouseButton1Click:Connect(function()
  104.            
  105.             for i,v in pairs(SelectedBox:GetChildren()) do
  106.                 if v:IsA("TextButton") then
  107.                     v:Destroy()
  108.                 end
  109.             end
  110.             wait(0.1)
  111.             local PlaceC = Place:Clone()
  112.             PlaceC.Parent = SelectedBox
  113.             PlaceC.Position = DropdownMenu.Position
  114.             PlaceC.Position = UDim2.fromScale(-0.005,0)
  115.             SelectedBox.Visible = true
  116.             DropdownMenu.Size = UpSize
  117.             DropdownMenu.ScrollingEnabled = false
  118.             Arrow.Image = UpImage
  119.             DropdownMenu.Visible = false
  120.             PlaceC.Active = false
  121.            
  122.         end)
  123.     end
  124.     return {Dropdown, Button, DropdownMenu}
  125. end;
  126. function Lib:Dragify(frame)
  127.     local gui = frame
  128.     local UserInputService = game:GetService("UserInputService")
  129.     local dragging
  130.     local dragInput
  131.     local dragStart
  132.     local startPos
  133.  
  134.     local function update(input)
  135.         local delta = input.Position - dragStart
  136.         gui.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  137.     end
  138.  
  139.     gui.InputBegan:Connect(function(input)
  140.         if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  141.             dragging = true
  142.             dragStart = input.Position
  143.             startPos = gui.Position
  144.  
  145.             input.Changed:Connect(function()
  146.                 if input.UserInputState == Enum.UserInputState.End then
  147.                     dragging = false
  148.                 end
  149.             end)
  150.         end
  151.     end)
  152.  
  153.     gui.InputChanged:Connect(function(input)
  154.         if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  155.             dragInput = input
  156.         end
  157.     end)
  158.  
  159.     UserInputService.InputChanged:Connect(function(input)
  160.         if input == dragInput and dragging then
  161.             update(input)
  162.         end
  163.     end)
  164. end;
  165. function Lib:MakeBoolFrame(Parent, Text, LayoutOrder)
  166.     local CheckDecal = "http://www.roblox.com/asset/?id=9324353939"
  167.     local UnCheckDecal = "http://www.roblox.com/asset/?id=48138474"
  168.     local Bool = Instance.new("Frame")
  169.     local TextLabel = Instance.new("TextLabel")
  170.     local ImageButton = Instance.new("ImageButton")
  171.  
  172.     --Properties:
  173.     local val = Instance.new("BoolValue", Bool)
  174.     val.Name = "Checked"
  175.     val.Value = false
  176.     Bool.Name = "Bool"
  177.     Bool.Parent = Parent
  178.     Bool.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  179.     Bool.Size = UDim2.new(0, 292, 0, 86)
  180.     Bool.LayoutOrder = LayoutOrder
  181.     TextLabel.Parent = Bool
  182.     TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  183.     TextLabel.Position = UDim2.new(0, 0, 0.209302321, 0)
  184.     TextLabel.Size = UDim2.new(0, 200, 0, 50)
  185.     TextLabel.Font = Enum.Font.SourceSans
  186.     TextLabel.Text = Text
  187.     TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
  188.     TextLabel.TextScaled = true
  189.     TextLabel.TextSize = 14.000
  190.     TextLabel.TextWrapped = true
  191.  
  192.     ImageButton.Parent = Bool
  193.     ImageButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  194.     ImageButton.Position = UDim2.new(0.712328792, 0, 0.116279073, 0)
  195.     ImageButton.Size = UDim2.new(0, 73, 0, 64)
  196.     ImageButton.Image = UnCheckDecal
  197.     ImageButton.MouseButton1Click:Connect(function()
  198.         if val.Value == true then val.Value = false ImageButton.Image = UnCheckDecal elseif val.Value == false then val.Value = true ImageButton.Image = CheckDecal end
  199.     end)    
  200.     return Bool
  201. end;
  202. function Lib:MakeButtonFrame(Parent, Text, LayoutOrder, IsImage, Image)
  203.     print("Making Frame")
  204.     local Button = nil
  205.     if IsImage then
  206.         Button = Instance.new("ImageButton")
  207.         Button.Image = Image
  208.     else
  209.         Button = Instance.new("TextButton")
  210.     end    
  211.     local ButtonFrame = Instance.new("Frame")
  212.     ButtonFrame.Parent = Parent
  213.     ButtonFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  214.     ButtonFrame.Size = UDim2.new(0, 292, 0, 86)
  215.     ButtonFrame.LayoutOrder = LayoutOrder
  216.     Button.Parent = ButtonFrame
  217.     Button.Text = Text
  218.     Button.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  219.     Button.Position = ButtonFrame.Position
  220.     Button.Size = ButtonFrame.Size
  221.     Button.TextScaled = true
  222.     return Button
  223. end;
  224. function Lib:MakeGUI(parent,name,title)
  225.     for i,v in pairs(parent:GetChildren()) do
  226.  
  227.         if v.Name == name then
  228.             if syn then
  229.                 syn.unprotect_gui(v)
  230.             end
  231.             v:Destroy()
  232.             print("extera destroyed")
  233.         end    
  234.     end
  235.  
  236.     local ExploitGui = Instance.new("ScreenGui")
  237.     ExploitGui.Name = name
  238.     ExploitGui.Parent = parent
  239.     ExploitGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  240.    
  241.     local Frame = Instance.new("Frame")
  242.     Frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  243.     Frame.Position = UDim2.new(0.24955909, 0, 0.243103445, 0)
  244.     Frame.Size = UDim2.new(0, 548, 0, 294)
  245.     Frame.Parent = ExploitGui
  246.     if syn then
  247.         syn.protect_gui(ExploitGui)
  248.     end  
  249.     local TextLabel = Instance.new("TextLabel")
  250.     TextLabel.Parent = Frame
  251.     TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  252.     TextLabel.Position = UDim2.new(0, 0, -0.170068026, 0)
  253.     TextLabel.Size = UDim2.new(0, 307, 0, 50)
  254.     TextLabel.Font = Enum.Font.SourceSans
  255.     TextLabel.Text = title
  256.     TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
  257.     TextLabel.TextScaled = true
  258.     TextLabel.TextSize = 14.000
  259.     TextLabel.TextWrapped = true  
  260.     return ExploitGui
  261. end;
  262. function Lib:MakeMainFrame(Parent)
  263.     local Main = Instance.new("ScrollingFrame")
  264.     Main.Name = "Main"
  265.     Main.Parent = Parent
  266.     Main.Active = true
  267.     Main.ScrollBarImageColor3 = Color3.new(0,0,0)
  268.     Main.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  269.     Main.Position = UDim2.new(0.0273722634, 0, 0.0690593496, 0)
  270.     Main.Size = UDim2.new(0, 517, 0, 253)
  271.     local UIListLayout = Instance.new("UIListLayout", Main)
  272.  
  273.     UIListLayout.FillDirection = Enum.FillDirection.Vertical
  274.     UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  275.     return Main
  276. end;
  277. function Lib:MakeSettings(parent)
  278.    
  279.     local Frame = parent
  280.     local X = Instance.new("TextButton")
  281.     local Settingsb = Instance.new("ImageButton")
  282.     local SettingsFrame = Instance.new("ScrollingFrame")
  283.     local TextLabel_2 = Instance.new("TextLabel")
  284.  
  285.     local UIListLayout = Instance.new("UIListLayout", SettingsFrame)
  286.  
  287.     UIListLayout.FillDirection = Enum.FillDirection.Vertical
  288.     UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  289.     local SettingsX = Instance.new("TextButton")
  290.  
  291.     X.Name = "X"
  292.     X.Parent = Frame
  293.     X.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  294.     X.Position = UDim2.new(0.916058421, 0, -0.132653058, 0)
  295.     X.Size = UDim2.new(0, 46, 0, 39)
  296.     X.Font = Enum.Font.SourceSans
  297.     X.Text = "X"
  298.     X.TextColor3 = Color3.fromRGB(0, 0, 0)
  299.     X.TextScaled = true
  300.     X.TextSize = 14.000
  301.     X.TextWrapped = true
  302.  
  303.     Settingsb.Name = "Settingsb"
  304.     Settingsb.Parent = Frame
  305.     Settingsb.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  306.     Settingsb.Position = UDim2.new(0.824817538, 0, -0.132653058, 0)
  307.     Settingsb.Size = UDim2.new(0, 50, 0, 39)
  308.     Settingsb.Image = "http://www.roblox.com/asset/?id=2484550853"
  309.     Settingsb.ImageColor3 = Color3.fromRGB(0, 0, 0)
  310.  
  311.     SettingsFrame.Name = "Settings"
  312.     SettingsFrame.Parent = Frame
  313.     SettingsFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  314.     SettingsFrame.Size = UDim2.new(0, 548, 0, 294)
  315.     SettingsFrame.Visible = false
  316.     SettingsFrame.ZIndex = 2
  317.  
  318.     TextLabel_2.Parent = SettingsFrame.Parent
  319.     TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  320.     TextLabel_2.Size = UDim2.new(0, 200, 0, 50)
  321.     TextLabel_2.ZIndex = 3
  322.     TextLabel_2.Font = Enum.Font.SourceSans
  323.     TextLabel_2.Text = "Settings"
  324.     TextLabel_2.TextColor3 = Color3.fromRGB(0, 0, 0)
  325.     TextLabel_2.TextScaled = true
  326.     TextLabel_2.TextSize = 14.000
  327.     TextLabel_2.TextWrapped = true
  328. TextLabel_2.Visible = false
  329.  
  330. Settingsb.Visible = true
  331.  
  332.  
  333.     SettingsX.Name = "SettingsX"
  334.     SettingsX.Parent = SettingsFrame.Parent
  335.     SettingsX.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  336.     SettingsX.Position = UDim2.new(0.899635017, 0, 0, 0)
  337.     SettingsX.Size = UDim2.new(0, 55, 0, 50)
  338.     SettingsX.ZIndex = 3
  339.     SettingsX.Font = Enum.Font.SourceSans
  340.     SettingsX.Text = "X"
  341.     SettingsX.TextColor3 = Color3.fromRGB(0, 0, 0)
  342.     SettingsX.TextScaled = true
  343.     SettingsX.TextSize = 14.000
  344.     SettingsX.TextWrapped = true
  345.     SettingsX.Visible = false
  346.     SettingsFrame.ScrollBarImageColor3 = Color3.new(0,0,0)
  347.     SettingsX.MouseButton1Click:Connect(function()
  348.         SettingsFrame.Visible = false
  349.         SettingsX.Visible = false
  350.         TextLabel_2.Visible = false
  351.     end)
  352.     X.MouseButton1Click:Connect(function()
  353.         parent.Parent.Enabled = false
  354.     end)
  355.     Settingsb.MouseButton1Click:Connect(function()
  356.         SettingsFrame.Visible = true
  357.         SettingsX.Visible = true
  358.         TextLabel_2.Visible = true
  359.     end)
  360.     return SettingsFrame
  361. end;
  362. function Lib:ConnectKeyBind(textbox, Key, func)
  363.     local TextBox = textbox
  364.     local KeyConnection = nil
  365.    
  366.     local UIS = game:GetService("UserInputService")
  367.     local InputKey = nil
  368.     if typeof(Key) == nil then
  369.         InputKey = Enum.KeyCode["E"]
  370.     elseif typeof(Key) == "string" then
  371.         InputKey = Enum.KeyCode[Key]
  372.         TextBox.Text = Key
  373.     elseif typeof(Key) == "EnumItem" then
  374.         InputKey = Key
  375.         TextBox.Text = Key.Name
  376.     else
  377.         error("EnumItem, string, or nil expected ".."Got "..(typeof(Key)))    
  378.     end  
  379.  
  380.  
  381. local editkeymode = false
  382. TextBox.Focused:Connect(function()
  383.     KeyConnection = UIS.InputBegan:Connect(function(input,gameProcessedEvent)
  384.         if input.KeyCode.Name == "Unknown" then else
  385.             InputKey = input.KeyCode
  386.             TextBox.Text = input.KeyCode.Name
  387.             TextBox:ReleaseFocus()
  388.             editkeymode = true
  389.         end
  390.     end)
  391. end)
  392. TextBox.FocusLost:Connect(function()
  393.     KeyConnection:Disconnect()
  394.     KeyConnection = nil
  395.     print("Disconnect")
  396.     wait(0.1)
  397.     editkeymode = false
  398.  
  399. end)
  400. if typeof(func)==nil then
  401.     error("Function expected got "..(typeof(func)))
  402. end    
  403. UIS.InputBegan:Connect(function(input,gameProcessedEvent)
  404.     if not editkeymode then
  405.         if input.KeyCode == InputKey and not gameProcessedEvent then
  406.             func()
  407.         end
  408.     end
  409. end)
  410. end;
  411. function Lib:MakeKeyBindFrame(parent, title,LayoutOrder)
  412.     local Bool = Instance.new("Frame")
  413.     local TextLabel = Instance.new("TextLabel")
  414.     local TextBox = Instance.new("TextBox")
  415.     Bool.Name = "Bool"
  416.     Bool.Parent = parent
  417.     Bool.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  418.     Bool.Size = UDim2.new(0, 292, 0, 86)
  419.     Bool.LayoutOrder = LayoutOrder
  420.     TextLabel.Parent = Bool
  421.     TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  422.     TextLabel.Position = UDim2.new(0, 0, 0.209302321, 0)
  423.     TextLabel.Size = UDim2.new(0, 200, 0, 50)
  424.     TextLabel.Font = Enum.Font.SourceSans
  425.     TextLabel.Text = title
  426.     TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
  427.     TextLabel.TextScaled = true
  428.     TextLabel.TextSize = 14.000
  429.     TextLabel.TextWrapped = true
  430.     TextBox.Text = "KeyBind here"
  431.     TextBox.Parent = Bool
  432.     TextBox.TextScaled = true
  433.     TextBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  434.     TextBox.Position = UDim2.new(0.712328792, 0, 0.116279073, 0)
  435.     TextBox.Size = UDim2.new(0, 73, 0, 64)
  436.     return TextBox
  437. end;    
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446. function Lib:FindRemoteEvent(instance, Name)
  447.  
  448.     for i,v in pairs(instance:GetDescendants())do
  449.         if v.Name == Name then
  450.             return v
  451.         end end
  452.  
  453. end;    
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461. function Lib:SendNotif(title, text, delay)
  462.     game.StarterGui:SetCore("SendNotification", {Title = title,Text = text,Duration = delay})
  463. end;
  464.  
  465. return Lib;
Add Comment
Please, Sign In to add comment