Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ScreenGui = Instance.new("ScreenGui")
- local MainFrame = Instance.new("Frame")
- local Tabs = Instance.new("Frame")
- local HomeTab = Instance.new("TextButton")
- local AimingTab = Instance.new("TextButton")
- local BlatantTab = Instance.new("TextButton")
- local VisualsTab = Instance.new("TextButton")
- local MiscellaneousTab = Instance.new("TextButton")
- local ThemeTab = Instance.new("TextButton")
- local SettingsTab = Instance.new("TextButton")
- local TabContent = Instance.new("Frame")
- -- ScreenGui setup
- ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- ScreenGui.ResetOnSpawn = false
- -- MainFrame setup
- MainFrame.Parent = ScreenGui
- MainFrame.Size = UDim2.new(0, 700, 0, 500)
- MainFrame.Position = UDim2.new(0.5, -350, 0.5, -250)
- MainFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
- MainFrame.BorderSizePixel = 0
- -- Make MainFrame draggable
- local UIS = game:GetService("UserInputService")
- local dragToggle = false
- local dragStart = nil
- local startPos = nil
- MainFrame.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragToggle = true
- dragStart = input.Position
- startPos = MainFrame.Position
- end
- end)
- MainFrame.InputEnded:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragToggle = false
- end
- end)
- UIS.InputChanged:Connect(function(input)
- if dragToggle and input.UserInputType == Enum.UserInputType.MouseMovement then
- local delta = input.Position - dragStart
- MainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- end)
- -- Tabs setup
- Tabs.Parent = MainFrame
- Tabs.Size = UDim2.new(1, -2, 0, 30) -- Adjusted width to fit inside MainFrame
- Tabs.Position = UDim2.new(0, 1, 0, 0) -- Slight inward offset
- Tabs.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- Tabs.BorderSizePixel = 0
- local function createTab(name, positionX)
- local Tab = Instance.new("TextButton")
- Tab.Parent = Tabs
- Tab.Size = UDim2.new(0, 100, 1, 0)
- Tab.Position = UDim2.new(0, positionX, 0, 0)
- Tab.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- Tab.Text = name
- Tab.TextColor3 = Color3.fromRGB(200, 200, 200)
- Tab.Font = Enum.Font.SourceSans
- Tab.TextSize = 16
- return Tab
- end
- HomeTab = createTab("Home", 0)
- AimingTab = createTab("Aiming", 100)
- BlatantTab = createTab("Blatant", 200)
- VisualsTab = createTab("Visuals", 300)
- MiscellaneousTab = createTab("Misc", 400)
- ThemeTab = createTab("Theme", 500)
- SettingsTab = createTab("Settings", 600)
- -- TabContent setup
- TabContent.Parent = MainFrame
- TabContent.Position = UDim2.new(0, 0, 0, 30)
- TabContent.Size = UDim2.new(1, 0, 1, -30)
- TabContent.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
- TabContent.BorderSizePixel = 0
- -- Tab functionality
- local tabs = {
- ["Home"] = nil,
- ["Aiming"] = nil,
- ["Blatant"] = nil,
- ["Visuals"] = nil,
- ["Misc"] = nil,
- ["Theme"] = nil,
- ["Settings"] = nil
- }
- local function switchTab(tabName)
- for name, content in pairs(tabs) do
- if content then
- content.Visible = (name == tabName)
- end
- end
- end
- HomeTab.MouseButton1Click:Connect(function() switchTab("Home") end)
- AimingTab.MouseButton1Click:Connect(function() switchTab("Aiming") end)
- BlatantTab.MouseButton1Click:Connect(function() switchTab("Blatant") end)
- VisualsTab.MouseButton1Click:Connect(function() switchTab("Visuals") end)
- MiscellaneousTab.MouseButton1Click:Connect(function() switchTab("Misc") end)
- ThemeTab.MouseButton1Click:Connect(function() switchTab("Theme") end)
- SettingsTab.MouseButton1Click:Connect(function() switchTab("Settings") end)
- switchTab("Settings")
- -- Toggle visibility with Insert key
- UIS.InputBegan:Connect(function(input, processed)
- if not processed and input.KeyCode == Enum.KeyCode.Insert then
- MainFrame.Visible = not MainFrame.Visible
- end
- end)
- -- Functions setup
- local function createLabel(parent, text)
- local label = Instance.new("TextLabel")
- label.Parent = parent
- label.Size = UDim2.new(1, 0, 0, 30)
- label.BackgroundTransparency = 1
- label.Text = text
- label.TextColor3 = Color3.fromRGB(200, 200, 200)
- label.Font = Enum.Font.SourceSans
- label.TextSize = 16
- return label
- end
- local function createButton(parent, text, callback)
- local button = Instance.new("TextButton")
- button.Parent = parent
- button.Size = UDim2.new(1, 0, 0, 30)
- button.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- button.Text = text
- button.TextColor3 = Color3.fromRGB(200, 200, 200)
- button.Font = Enum.Font.SourceSans
- button.TextSize = 16
- button.MouseButton1Click:Connect(callback)
- return button
- end
- local function createToggle(parent, text, callback)
- local toggle = Instance.new("Frame")
- toggle.Parent = parent
- toggle.Size = UDim2.new(1, 0, 0, 30)
- toggle.BackgroundTransparency = 1
- local button = Instance.new("TextButton")
- button.Parent = toggle
- button.Size = UDim2.new(0, 30, 1, 0)
- button.Position = UDim2.new(0, 0, 0, 0)
- button.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
- local label = Instance.new("TextLabel")
- label.Parent = toggle
- label.Size = UDim2.new(1, -40, 1, 0)
- label.Position = UDim2.new(0, 40, 0, 0)
- label.Text = text
- label.TextColor3 = Color3.fromRGB(200, 200, 200)
- label.Font = Enum.Font.SourceSans
- label.TextSize = 16
- button.MouseButton1Click:Connect(callback)
- return toggle
- end
- local function createDropdown(parent, options, callback)
- local dropdown = Instance.new("Frame")
- dropdown.Parent = parent
- dropdown.Size = UDim2.new(1, 0, 0, 30)
- dropdown.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- local button = Instance.new("TextButton")
- button.Parent = dropdown
- button.Size = UDim2.new(1, 0, 1, 0)
- button.Text = "Select"
- button.TextColor3 = Color3.fromRGB(200, 200, 200)
- button.Font = Enum.Font.SourceSans
- button.TextSize = 16
- local list = Instance.new("Frame")
- list.Parent = dropdown
- list.Size = UDim2.new(1, 0, 0, #options * 30)
- list.Position = UDim2.new(0, 0, 1, 0)
- list.Visible = false
- for _, option in ipairs(options) do
- local item = Instance.new("TextButton")
- item.Parent = list
- item.Size = UDim2.new(1, 0, 0, 30)
- item.Text = option
- item.TextColor3 = Color3.fromRGB(200, 200, 200)
- item.Font = Enum.Font.SourceSans
- item.TextSize = 16
- item.MouseButton1Click:Connect(function()
- button.Text = option
- list.Visible = false
- callback(option)
- end)
- end
- button.MouseButton1Click:Connect(function()
- list.Visible = not list.Visible
- end)
- return dropdown
- end
- local function createSlider(parent, min, max, callback)
- local slider = Instance.new("Frame")
- slider.Parent = parent
- slider.Size = UDim2.new(1, 0, 0, 30)
- slider.BackgroundTransparency = 1
- local bar = Instance.new("Frame")
- bar.Parent = slider
- bar.Size = UDim2.new(1, 0, 0, 5)
- bar.Position = UDim2.new(0, 0, 0.5, -2.5)
- bar.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- local knob = Instance.new("TextButton")
- knob.Parent = bar
- knob.Size = UDim2.new(0, 10, 1, 0)
- knob.BackgroundColor3 = Color3.fromRGB(200, 200, 200)
- local dragging = false
- knob.MouseButton1Down:Connect(function()
- dragging = true
- end)
- UIS.InputEnded:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragging = false
- end
- end)
- UIS.InputChanged:Connect(function(input)
- if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
- local relativePos = math.clamp((input.Position.X - bar.AbsolutePosition.X) / bar.AbsoluteSize.X, 0, 1)
- knob.Position = UDim2.new(relativePos, -5, 0, 0)
- callback(min + (max - min) * relativePos)
- end
- end)
- return slider
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement