Script searcher
Key RequiredUniversal

Script searcher

Universal ScriptTonicostaTonicosta 1.2K views 101 executesUpdated Dec 31, 2025
3.3/ 5(3 votes)
2167% Positive
Lua Script•326 lines (11538 chars)
--[[ 
    SIMPLE SCRIPTBLOX HUB 
    Criado por: AI Assistant
    Funcionalidades: Drag, Scroll, Minimize, Search API
]]

local UserInputService = game:GetService("UserInputService")
local HttpService = game:GetService("HttpService")
local CoreGui = game:GetService("CoreGui")

-- Detectar função de request do executor
local requestFunc = http_request or request or (syn and syn.request) or (fluxus and fluxus.request)
if not requestFunc then
    game.StarterGui:SetCore("SendNotification", {
        Title = "Erro";
        Text = "Seu executor não suporta requisições HTTP!";
        Duration = 5;
    })
    return
end

-- Limpar UI antiga se existir
if CoreGui:FindFirstChild("ScriptBloxHub") then
    CoreGui:FindFirstChild("ScriptBloxHub"):Destroy()
end

-- 1. CRIAÇÃO DA UI PRINCIPAL
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "ScriptBloxHub"
ScreenGui.Parent = CoreGui

-- Frame Principal
local MainFrame = Instance.new("Frame")
MainFrame.Name = "MainFrame"
MainFrame.Size = UDim2.new(0, 500, 0, 350)
MainFrame.Position = UDim2.new(0.5, -250, 0.5, -175)
MainFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
MainFrame.BorderSizePixel = 0
MainFrame.Parent = ScreenGui

-- Bordas arredondadas
local UICorner = Instance.new("UICorner")
UICorner.CornerRadius = UDim.new(0, 8)
UICorner.Parent = MainFrame

-- Barra de Título (Para arrastar)
local TopBar = Instance.new("Frame")
TopBar.Name = "TopBar"
TopBar.Size = UDim2.new(1, 0, 0, 30)
TopBar.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
TopBar.BorderSizePixel = 0
TopBar.Parent = MainFrame

local TopCorner = Instance.new("UICorner")
TopCorner.CornerRadius = UDim.new(0, 8)
TopCorner.Parent = TopBar

-- Título
local Title = Instance.new("TextLabel")
Title.Text = "ScriptBlox Searcher"
Title.Size = UDim2.new(1, -60, 1, 0)
Title.Position = UDim2.new(0, 10, 0, 0)
Title.BackgroundTransparency = 1
Title.TextColor3 = Color3.fromRGB(255, 255, 255)
Title.Font = Enum.Font.GothamBold
Title.TextSize = 14
Title.TextXAlignment = Enum.TextXAlignment.Left
Title.Parent = TopBar

-- Botão de Minimizar
local MinButton = Instance.new("TextButton")
MinButton.Text = "-"
MinButton.Size = UDim2.new(0, 30, 0, 30)
MinButton.Position = UDim2.new(1, -30, 0, 0)
MinButton.BackgroundTransparency = 1
MinButton.TextColor3 = Color3.fromRGB(255, 255, 255)
MinButton.Font = Enum.Font.GothamBold
MinButton.TextSize = 18
MinButton.Parent = TopBar

-- Botão de Abrir (Fica invisível inicialmente)
local OpenButton = Instance.new("TextButton")
OpenButton.Name = "OpenButton"
OpenButton.Size = UDim2.new(0, 50, 0, 50)
OpenButton.Position = UDim2.new(0, 20, 0.5, 0)
OpenButton.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
OpenButton.Text = "HUB"
OpenButton.TextColor3 = Color3.fromRGB(255, 255, 255)
OpenButton.Font = Enum.Font.GothamBold
OpenButton.Visible = false
OpenButton.Parent = ScreenGui

local OpenCorner = Instance.new("UICorner")
OpenCorner.CornerRadius = UDim.new(0, 25) -- Redondo
OpenCorner.Parent = OpenButton

-- 2. SISTEMA DE DRAG (ARRASTAR)
local dragging, dragInput, dragStart, startPos

local function update(input)
    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

TopBar.InputBegan:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
        dragging = true
        dragStart = input.Position
        startPos = MainFrame.Position
        
        input.Changed:Connect(function()
            if input.UserInputState == Enum.UserInputState.End then
                dragging = false
            end
        end)
    end
end)

TopBar.InputChanged:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
        dragInput = input
    end
end)

UserInputService.InputChanged:Connect(function(input)
    if input == dragInput and dragging then
        update(input)
    end
end)

-- Lógica do Minimizar/Voltar
MinButton.MouseButton1Click:Connect(function()
    MainFrame.Visible = false
    OpenButton.Visible = true
end)

OpenButton.MouseButton1Click:Connect(function()
    MainFrame.Visible = true
    OpenButton.Visible = false
end)

-- 3. BARRA DE PESQUISA E CONTEÚDO
local SearchBox = Instance.new("TextBox")
SearchBox.PlaceholderText = "Pesquise um script (ex: Blox Fruits)..."
SearchBox.Text = ""
SearchBox.Size = UDim2.new(1, -70, 0, 35)
SearchBox.Position = UDim2.new(0, 10, 0, 40)
SearchBox.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
SearchBox.TextColor3 = Color3.fromRGB(255, 255, 255)
SearchBox.Font = Enum.Font.Gotham
SearchBox.TextSize = 14
SearchBox.Parent = MainFrame

local SearchCorner = Instance.new("UICorner")
SearchCorner.Parent = SearchBox

local SearchBtn = Instance.new("TextButton")
SearchBtn.Text = "🔍"
SearchBtn.Size = UDim2.new(0, 40, 0, 35)
SearchBtn.Position = UDim2.new(1, -50, 0, 40)
SearchBtn.BackgroundColor3 = Color3.fromRGB(0, 120, 215)
SearchBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
SearchBtn.Font = Enum.Font.GothamBold
SearchBtn.TextSize = 18
SearchBtn.Parent = MainFrame

local BtnCorner = Instance.new("UICorner")
BtnCorner.Parent = SearchBtn

-- Área de Scroll para Resultados
local ScrollFrame = Instance.new("ScrollingFrame")
ScrollFrame.Size = UDim2.new(1, -20, 1, -90)
ScrollFrame.Position = UDim2.new(0, 10, 0, 85)
ScrollFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
ScrollFrame.ScrollBarThickness = 4
ScrollFrame.BorderSizePixel = 0
ScrollFrame.Parent = MainFrame

local UIListLayout = Instance.new("UIListLayout")
UIListLayout.Padding = UDim.new(0, 5)
UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
UIListLayout.Parent = ScrollFrame

-- 4. FUNÇÃO DE BUSCA (SCRIPTBLOX API)
function SearchScripts(query)
    -- Limpa resultados anteriores
    for _, child in pairs(ScrollFrame:GetChildren()) do
        if not child:IsA("UIListLayout") then child:Destroy() end
    end

    if query == "" then return end
    
    SearchBox.TextEditable = false
    SearchBox.PlaceholderText = "Buscando..."

    -- Chamada API (Modo Free para evitar scripts pagos/privados)
    -- API oficial da ScriptBlox
    local url = "https://scriptblox.com/api/script/search?q="..HttpService:UrlEncode(query).."&mode=free&page=1"
    
    local success, response = pcall(function()
        return requestFunc({
            Url = url,
            Method = "GET"
        })
    end)

    if success and response.StatusCode == 200 then
        local data = HttpService:JSONDecode(response.Body)
        local scripts = data.result.scripts
        
        if #scripts == 0 then
             local ErrLabel = Instance.new("TextLabel")
             ErrLabel.Text = "Nenhum resultado encontrado."
             ErrLabel.Size = UDim2.new(1, 0, 0, 30)
             ErrLabel.TextColor3 = Color3.fromRGB(150, 150, 150)
             ErrLabel.BackgroundTransparency = 1
             ErrLabel.Parent = ScrollFrame
        end

        for i, scriptData in pairs(scripts) do
            -- Criar Cartão do Script
            local Card = Instance.new("Frame")
            Card.Size = UDim2.new(1, -10, 0, 80)
            Card.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
            Card.Parent = ScrollFrame
            
            local CardCorner = Instance.new("UICorner")
            CardCorner.Parent = Card
            
            -- Nome do Jogo
            local GameName = Instance.new("TextLabel")
            GameName.Text = "Jogo: " .. (scriptData.game.name or "Unknown")
            GameName.Size = UDim2.new(1, -10, 0, 20)
            GameName.Position = UDim2.new(0, 10, 0, 5)
            GameName.BackgroundTransparency = 1
            GameName.TextColor3 = Color3.fromRGB(100, 255, 100)
            GameName.Font = Enum.Font.GothamBold
            GameName.TextSize = 12
            GameName.TextXAlignment = Enum.TextXAlignment.Left
            GameName.Parent = Card
            
            -- Título do Script
            local ScriptTitle = Instance.new("TextLabel")
            ScriptTitle.Text = scriptData.title
            ScriptTitle.Size = UDim2.new(1, -80, 0, 20)
            ScriptTitle.Position = UDim2.new(0, 10, 0, 25)
            ScriptTitle.BackgroundTransparency = 1
            ScriptTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
            ScriptTitle.Font = Enum.Font.Gotham
            ScriptTitle.TextSize = 13
            ScriptTitle.TextXAlignment = Enum.TextXAlignment.Left
            ScriptTitle.TextTruncate = Enum.TextTruncate.AtEnd
            ScriptTitle.Parent = Card
            
            -- Botão de Copiar (Loadstring ou Script)
            local CopyBtn = Instance.new("TextButton")
            CopyBtn.Text = "Copy"
            CopyBtn.Size = UDim2.new(0, 60, 0, 25)
            CopyBtn.Position = UDim2.new(1, -70, 0.5, -12)
            CopyBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
            CopyBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
            CopyBtn.Font = Enum.Font.GothamBold
            CopyBtn.TextSize = 12
            CopyBtn.Parent = Card
            
            local CopyCorner = Instance.new("UICorner")
            CopyCorner.Parent = CopyBtn
            
            -- Função de Copiar
            CopyBtn.MouseButton1Click:Connect(function()
                -- ScriptBlox as vezes retorna o script direto ou o loadstring
                -- A API retorna o slug, precisamos buscar o script ou montar o script
                -- Para simplificar, vamos tentar pegar o script direto se disponivel, 
                -- se for muito grande, copiaremos o link scriptblox.
                
                -- Em muitos casos ScriptBlox requer clicar para ver, mas a API retorna 'script' se for raw
                local scriptContent = scriptData.script
                
                if scriptContent then
                    setclipboard(scriptContent)
                    CopyBtn.Text = "Copied!"
                    wait(1)
                    CopyBtn.Text = "Copy"
                else
                    -- Fallback se o script não vier no JSON de busca (raro)
                    CopyBtn.Text = "Error"
                end
            end)
            
            -- Views count
            local Views = Instance.new("TextLabel")
            Views.Text = "Views: " .. tostring(scriptData.views)
            Views.Size = UDim2.new(0, 100, 0, 20)
            Views.Position = UDim2.new(0, 10, 0, 50)
            Views.BackgroundTransparency = 1
            Views.TextColor3 = Color3.fromRGB(150, 150, 150)
            Views.Font = Enum.Font.Gotham
            Views.TextSize = 11
            Views.TextXAlignment = Enum.TextXAlignment.Left
            Views.Parent = Card
        end
        
        -- Atualiza tamanho do scroll
        ScrollFrame.CanvasSize = UDim2.new(0, 0, 0, UIListLayout.AbsoluteContentSize.Y + 10)
    else
        warn("Erro ao conectar na ScriptBlox: " .. tostring(response.StatusCode))
        local ErrLabel = Instance.new("TextLabel")
        ErrLabel.Text = "Erro na API."
        ErrLabel.Parent = ScrollFrame
    end

    SearchBox.TextEditable = true
    SearchBox.PlaceholderText = "Pesquise um script..."
end

-- Evento de clique na busca
SearchBtn.MouseButton1Click:Connect(function()
    SearchScripts(SearchBox.Text)
end)

-- Evento de Enter na caixa de texto
SearchBox.FocusLost:Connect(function(enterPressed)
    if enterPressed then
        SearchScripts(SearchBox.Text)
    end
end)

Features & Information

Scriptblox Searcher

Community Comments (2)

RobinsonFRobinsonFDec 31, 2025

Awesome work!!

awakener676awakener676Sep 20, 2026

opa km

More Scripts for Universal Scripts