Advertisement
MrScripter2

chatGPT menu

Jan 19th, 2025
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 8.10 KB | Gaming | 0 0
  1. local ScreenGui = Instance.new("ScreenGui")
  2. local MainFrame = Instance.new("Frame")
  3. local Tabs = Instance.new("Frame")
  4. local HomeTab = Instance.new("TextButton")
  5. local AimingTab = Instance.new("TextButton")
  6. local BlatantTab = Instance.new("TextButton")
  7. local VisualsTab = Instance.new("TextButton")
  8. local MiscellaneousTab = Instance.new("TextButton")
  9. local ThemeTab = Instance.new("TextButton")
  10. local SettingsTab = Instance.new("TextButton")
  11. local TabContent = Instance.new("Frame")
  12.  
  13. -- ScreenGui setup
  14. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  15. ScreenGui.ResetOnSpawn = false
  16.  
  17. -- MainFrame setup
  18. MainFrame.Parent = ScreenGui
  19. MainFrame.Size = UDim2.new(0, 700, 0, 500)
  20. MainFrame.Position = UDim2.new(0.5, -350, 0.5, -250)
  21. MainFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
  22. MainFrame.BorderSizePixel = 0
  23.  
  24. -- Make MainFrame draggable
  25. local UIS = game:GetService("UserInputService")
  26. local dragToggle = false
  27. local dragStart = nil
  28. local startPos = nil
  29.  
  30. MainFrame.InputBegan:Connect(function(input)
  31.     if input.UserInputType == Enum.UserInputType.MouseButton1 then
  32.         dragToggle = true
  33.         dragStart = input.Position
  34.         startPos = MainFrame.Position
  35.     end
  36. end)
  37.  
  38. MainFrame.InputEnded:Connect(function(input)
  39.     if input.UserInputType == Enum.UserInputType.MouseButton1 then
  40.         dragToggle = false
  41.     end
  42. end)
  43.  
  44. UIS.InputChanged:Connect(function(input)
  45.     if dragToggle and input.UserInputType == Enum.UserInputType.MouseMovement then
  46.         local delta = input.Position - dragStart
  47.         MainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  48.     end
  49. end)
  50.  
  51. -- Tabs setup
  52. Tabs.Parent = MainFrame
  53. Tabs.Size = UDim2.new(1, -2, 0, 30) -- Adjusted width to fit inside MainFrame
  54. Tabs.Position = UDim2.new(0, 1, 0, 0) -- Slight inward offset
  55. Tabs.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  56. Tabs.BorderSizePixel = 0
  57.  
  58. local function createTab(name, positionX)
  59.     local Tab = Instance.new("TextButton")
  60.     Tab.Parent = Tabs
  61.     Tab.Size = UDim2.new(0, 100, 1, 0)
  62.     Tab.Position = UDim2.new(0, positionX, 0, 0)
  63.     Tab.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  64.     Tab.Text = name
  65.     Tab.TextColor3 = Color3.fromRGB(200, 200, 200)
  66.     Tab.Font = Enum.Font.SourceSans
  67.     Tab.TextSize = 16
  68.     return Tab
  69. end
  70.  
  71. HomeTab = createTab("Home", 0)
  72. AimingTab = createTab("Aiming", 100)
  73. BlatantTab = createTab("Blatant", 200)
  74. VisualsTab = createTab("Visuals", 300)
  75. MiscellaneousTab = createTab("Misc", 400)
  76. ThemeTab = createTab("Theme", 500)
  77. SettingsTab = createTab("Settings", 600)
  78.  
  79. -- TabContent setup
  80. TabContent.Parent = MainFrame
  81. TabContent.Position = UDim2.new(0, 0, 0, 30)
  82. TabContent.Size = UDim2.new(1, 0, 1, -30)
  83. TabContent.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
  84. TabContent.BorderSizePixel = 0
  85.  
  86. -- Tab functionality
  87. local tabs = {
  88.     ["Home"] = nil,
  89.     ["Aiming"] = nil,
  90.     ["Blatant"] = nil,
  91.     ["Visuals"] = nil,
  92.     ["Misc"] = nil,
  93.     ["Theme"] = nil,
  94.     ["Settings"] = nil
  95. }
  96.  
  97. local function switchTab(tabName)
  98.     for name, content in pairs(tabs) do
  99.         if content then
  100.             content.Visible = (name == tabName)
  101.         end
  102.     end
  103. end
  104.  
  105. HomeTab.MouseButton1Click:Connect(function() switchTab("Home") end)
  106. AimingTab.MouseButton1Click:Connect(function() switchTab("Aiming") end)
  107. BlatantTab.MouseButton1Click:Connect(function() switchTab("Blatant") end)
  108. VisualsTab.MouseButton1Click:Connect(function() switchTab("Visuals") end)
  109. MiscellaneousTab.MouseButton1Click:Connect(function() switchTab("Misc") end)
  110. ThemeTab.MouseButton1Click:Connect(function() switchTab("Theme") end)
  111. SettingsTab.MouseButton1Click:Connect(function() switchTab("Settings") end)
  112.  
  113. switchTab("Settings")
  114.  
  115. -- Toggle visibility with Insert key
  116. UIS.InputBegan:Connect(function(input, processed)
  117.     if not processed and input.KeyCode == Enum.KeyCode.Insert then
  118.         MainFrame.Visible = not MainFrame.Visible
  119.     end
  120. end)
  121.  
  122. -- Functions setup
  123. local function createLabel(parent, text)
  124.     local label = Instance.new("TextLabel")
  125.     label.Parent = parent
  126.     label.Size = UDim2.new(1, 0, 0, 30)
  127.     label.BackgroundTransparency = 1
  128.     label.Text = text
  129.     label.TextColor3 = Color3.fromRGB(200, 200, 200)
  130.     label.Font = Enum.Font.SourceSans
  131.     label.TextSize = 16
  132.     return label
  133. end
  134.  
  135. local function createButton(parent, text, callback)
  136.     local button = Instance.new("TextButton")
  137.     button.Parent = parent
  138.     button.Size = UDim2.new(1, 0, 0, 30)
  139.     button.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  140.     button.Text = text
  141.     button.TextColor3 = Color3.fromRGB(200, 200, 200)
  142.     button.Font = Enum.Font.SourceSans
  143.     button.TextSize = 16
  144.     button.MouseButton1Click:Connect(callback)
  145.     return button
  146. end
  147.  
  148. local function createToggle(parent, text, callback)
  149.     local toggle = Instance.new("Frame")
  150.     toggle.Parent = parent
  151.     toggle.Size = UDim2.new(1, 0, 0, 30)
  152.     toggle.BackgroundTransparency = 1
  153.  
  154.     local button = Instance.new("TextButton")
  155.     button.Parent = toggle
  156.     button.Size = UDim2.new(0, 30, 1, 0)
  157.     button.Position = UDim2.new(0, 0, 0, 0)
  158.     button.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
  159.  
  160.     local label = Instance.new("TextLabel")
  161.     label.Parent = toggle
  162.     label.Size = UDim2.new(1, -40, 1, 0)
  163.     label.Position = UDim2.new(0, 40, 0, 0)
  164.     label.Text = text
  165.     label.TextColor3 = Color3.fromRGB(200, 200, 200)
  166.     label.Font = Enum.Font.SourceSans
  167.     label.TextSize = 16
  168.  
  169.     button.MouseButton1Click:Connect(callback)
  170.     return toggle
  171. end
  172.  
  173. local function createDropdown(parent, options, callback)
  174.     local dropdown = Instance.new("Frame")
  175.     dropdown.Parent = parent
  176.     dropdown.Size = UDim2.new(1, 0, 0, 30)
  177.     dropdown.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  178.  
  179.     local button = Instance.new("TextButton")
  180.     button.Parent = dropdown
  181.     button.Size = UDim2.new(1, 0, 1, 0)
  182.     button.Text = "Select"
  183.     button.TextColor3 = Color3.fromRGB(200, 200, 200)
  184.     button.Font = Enum.Font.SourceSans
  185.     button.TextSize = 16
  186.  
  187.     local list = Instance.new("Frame")
  188.     list.Parent = dropdown
  189.     list.Size = UDim2.new(1, 0, 0, #options * 30)
  190.     list.Position = UDim2.new(0, 0, 1, 0)
  191.     list.Visible = false
  192.  
  193.     for _, option in ipairs(options) do
  194.         local item = Instance.new("TextButton")
  195.         item.Parent = list
  196.         item.Size = UDim2.new(1, 0, 0, 30)
  197.         item.Text = option
  198.         item.TextColor3 = Color3.fromRGB(200, 200, 200)
  199.         item.Font = Enum.Font.SourceSans
  200.         item.TextSize = 16
  201.         item.MouseButton1Click:Connect(function()
  202.             button.Text = option
  203.             list.Visible = false
  204.             callback(option)
  205.         end)
  206.     end
  207.  
  208.     button.MouseButton1Click:Connect(function()
  209.         list.Visible = not list.Visible
  210.     end)
  211.  
  212.     return dropdown
  213. end
  214.  
  215. local function createSlider(parent, min, max, callback)
  216.     local slider = Instance.new("Frame")
  217.     slider.Parent = parent
  218.     slider.Size = UDim2.new(1, 0, 0, 30)
  219.     slider.BackgroundTransparency = 1
  220.  
  221.     local bar = Instance.new("Frame")
  222.     bar.Parent = slider
  223.     bar.Size = UDim2.new(1, 0, 0, 5)
  224.     bar.Position = UDim2.new(0, 0, 0.5, -2.5)
  225.     bar.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  226.  
  227.     local knob = Instance.new("TextButton")
  228.     knob.Parent = bar
  229.     knob.Size = UDim2.new(0, 10, 1, 0)
  230.     knob.BackgroundColor3 = Color3.fromRGB(200, 200, 200)
  231.  
  232.     local dragging = false
  233.  
  234.     knob.MouseButton1Down:Connect(function()
  235.         dragging = true
  236.     end)
  237.  
  238.     UIS.InputEnded:Connect(function(input)
  239.         if input.UserInputType == Enum.UserInputType.MouseButton1 then
  240.             dragging = false
  241.         end
  242.     end)
  243.  
  244.     UIS.InputChanged:Connect(function(input)
  245.         if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
  246.             local relativePos = math.clamp((input.Position.X - bar.AbsolutePosition.X) / bar.AbsoluteSize.X, 0, 1)
  247.             knob.Position = UDim2.new(relativePos, -5, 0, 0)
  248.             callback(min + (max - min) * relativePos)
  249.         end
  250.     end)
  251.  
  252.     return slider
  253. end
  254.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement