Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Services
- local Players = game:GetService("Players")
- local UserInputService = game:GetService("UserInputService")
- local RunService = game:GetService("RunService")
- local player = Players.LocalPlayer
- local playerGui = player:WaitForChild("PlayerGui")
- -- Check if the GUI is already loaded
- if playerGui:FindFirstChild("Helper") then
- playerGui.Helper:Destroy() -- Remove existing instance
- end
- -- Create the main GUI
- local gui = Instance.new("ScreenGui", playerGui)
- gui.Name = "Helper"
- -- Main frame
- local mainFrame = Instance.new("Frame", gui)
- mainFrame.Size = UDim2.new(0, 400, 0, 300)
- mainFrame.Position = UDim2.new(0.5, -200, 0.5, -150)
- mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) -- Dark background
- mainFrame.BorderSizePixel = 0
- mainFrame.Visible = true
- -- UI Corner for rounded edges
- local uiCorner = Instance.new("UICorner", mainFrame)
- uiCorner.CornerRadius = UDim.new(0, 10)
- -- Title
- local title = Instance.new("TextLabel", mainFrame)
- title.Size = UDim2.new(1, 0, 0, 50)
- title.Position = UDim2.new(0, 0, 0, 0)
- title.Text = "Helper"
- title.TextColor3 = Color3.fromRGB(255, 255, 255)
- title.BackgroundTransparency = 1
- title.Font = Enum.Font.SourceSansBold
- title.TextSize = 24
- -- Search bar
- local searchBar = Instance.new("TextBox", mainFrame)
- searchBar.Size = UDim2.new(0.9, 0, 0, 30)
- searchBar.Position = UDim2.new(0.05, 0, 0, 60)
- searchBar.PlaceholderText = "Search scripts..."
- searchBar.Text = ""
- searchBar.Font = Enum.Font.SourceSans
- searchBar.TextSize = 18
- searchBar.TextColor3 = Color3.fromRGB(255, 255, 255)
- searchBar.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- searchBar.BorderSizePixel = 0
- local searchBarCorner = Instance.new("UICorner", searchBar)
- searchBarCorner.CornerRadius = UDim.new(0, 5)
- -- Script container
- local scriptContainer = Instance.new("ScrollingFrame", mainFrame)
- scriptContainer.Size = UDim2.new(0.9, 0, 0.65, 0)
- scriptContainer.Position = UDim2.new(0.05, 0, 0, 100)
- scriptContainer.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
- scriptContainer.BorderSizePixel = 0
- scriptContainer.CanvasSize = UDim2.new(0, 0, 0, 0)
- scriptContainer.ScrollBarThickness = 8
- local containerCorner = Instance.new("UICorner", scriptContainer)
- containerCorner.CornerRadius = UDim.new(0, 5)
- -- Minimize button
- local minimizeButton = Instance.new("TextButton", mainFrame)
- minimizeButton.Size = UDim2.new(0, 30, 0, 30)
- minimizeButton.Position = UDim2.new(1, -40, 0, 10)
- minimizeButton.Text = "-"
- minimizeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- minimizeButton.Font = Enum.Font.SourceSansBold
- minimizeButton.TextSize = 18
- minimizeButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- local minimizeCorner = Instance.new("UICorner", minimizeButton)
- minimizeCorner.CornerRadius = UDim.new(0, 5)
- -- Minimized button
- local minimizedButton = Instance.new("TextButton", gui)
- minimizedButton.Size = UDim2.new(0, 50, 0, 30)
- minimizedButton.Position = UDim2.new(0.5, -25, 0.5, -15)
- minimizedButton.Text = "Helper"
- minimizedButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- minimizedButton.Font = Enum.Font.SourceSansBold
- minimizedButton.TextSize = 14
- minimizedButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- minimizedButton.Visible = false
- local minimizedCorner = Instance.new("UICorner", minimizedButton)
- minimizedCorner.CornerRadius = UDim.new(0, 5)
- -- Dragging functionality
- local dragging = false
- local dragStart, startPos
- local dragInput
- local function enableDragging(frame)
- frame.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragging = true
- dragStart = Vector2.new(input.Position.X, input.Position.Y)
- startPos = frame.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- frame.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement then
- dragInput = input
- end
- end)
- RunService.RenderStepped:Connect(function()
- if dragging and dragInput then
- local mouseLocation = UserInputService:GetMouseLocation()
- local delta = mouseLocation - dragStart
- frame.Position = UDim2.new(
- startPos.X.Scale,
- startPos.X.Offset + delta.X,
- startPos.Y.Scale,
- startPos.Y.Offset + delta.Y
- )
- end
- end)
- end
- -- Enable dragging for both main and minimized buttons
- enableDragging(mainFrame)
- enableDragging(minimizedButton)
- -- Minimize behavior
- minimizeButton.MouseButton1Click:Connect(function()
- mainFrame.Visible = false
- minimizedButton.Visible = true
- end)
- minimizedButton.MouseButton1Click:Connect(function()
- mainFrame.Visible = true
- minimizedButton.Visible = false
- end)
- -- Toggle GUI with hotkey (default: F)
- UserInputService.InputBegan:Connect(function(input, gameProcessed)
- if not gameProcessed and input.KeyCode == Enum.KeyCode.F then
- gui.Enabled = not gui.Enabled
- end
- end)
- -- Script data
- local scripts = {
- {name = "Place ID", url = "https://pastebin.com/raw/sc7V2A06"},
- {name = "Standing Location", url = "https://pastebin.com/raw/qc6dJZmA"},
- {name = "Infinite Yield", url = "https://pastebin.com/raw/mEiFuw9c"},
- }
- -- Add scripts to the container
- local function updateScripts(filter)
- scriptContainer:ClearAllChildren()
- local yOffset = 0
- for _, scriptData in ipairs(scripts) do
- if not filter or scriptData.name:lower():find(filter:lower()) then
- local scriptButton = Instance.new("TextButton", scriptContainer)
- scriptButton.Size = UDim2.new(1, -10, 0, 40)
- scriptButton.Position = UDim2.new(0, 5, 0, yOffset)
- scriptButton.Text = scriptData.name
- scriptButton.Font = Enum.Font.SourceSansBold
- scriptButton.TextSize = 18
- scriptButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- scriptButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- scriptButton.BorderSizePixel = 0
- local buttonCorner = Instance.new("UICorner", scriptButton)
- buttonCorner.CornerRadius = UDim.new(0, 5)
- -- Execute script on click
- scriptButton.MouseButton1Click:Connect(function()
- local http = game:GetService("HttpService")
- local response = http:GetAsync(scriptData.url)
- loadstring(response)()
- end)
- yOffset = yOffset + 45
- end
- end
- scriptContainer.CanvasSize = UDim2.new(0, 0, 0, yOffset)
- end
- -- Search bar listener
- searchBar:GetPropertyChangedSignal("Text"):Connect(function()
- updateScripts(searchBar.Text)
- end)
- -- Initial update
- updateScripts()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement