Bad sad GUI
Key RequiredUniversal

Bad sad GUI

Universal ScriptBobi_topBobi_top 1.3K views 141 executesUpdated Oct 31, 2025
3.3/ 5(3 votes)
2167% Positive
Lua Script•300 lines (10649 chars)
-- LocalScript (colocar en StarterGui)
-- Valk_X8 UI v0.1
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")

-- Helpers
local function HSV(h,s,v) return Color3.fromHSV(h%1, math.clamp(s,0,1), math.clamp(v,0,1)) end

-- Root ScreenGui
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "ValkX8_GUI"
screenGui.ResetOnSpawn = false
screenGui.Parent = playerGui

-- MAIN container (holds buttons)
local mainContainerOuter = Instance.new("Frame")
mainContainerOuter.Name = "MainOuter"
mainContainerOuter.AnchorPoint = Vector2.new(0,0)
mainContainerOuter.Position = UDim2.new(0, 0, 0, 10)
mainContainerOuter.Size = UDim2.new(0, 1000, 0, 260) -- ancho grande para filas horizontales
mainContainerOuter.BackgroundTransparency = 1
mainContainerOuter.Parent = screenGui

-- function to create a rainbow-border framed element (outer border animates)
local function createRainbowFrame(parent, pos, size, cornerRadius)
    local outer = Instance.new("Frame")
    outer.AnchorPoint = Vector2.new(0,0)
    outer.Position = pos
    outer.Size = size
    outer.BackgroundColor3 = HSV(0,1,1)
    outer.BorderSizePixel = 0
    outer.Parent = parent

    local uic = Instance.new("UICorner", outer)
    uic.CornerRadius = cornerRadius or UDim.new(0,0)

    local inner = Instance.new("Frame")
    inner.Size = UDim2.new(1, -4, 1, -4)
    inner.Position = UDim2.new(0, 2, 0, 2)
    inner.BackgroundColor3 = Color3.new(0,0,0)
    inner.BorderSizePixel = 0
    inner.Parent = outer

    Instance.new("UICorner", inner).CornerRadius = cornerRadius or UDim.new(0,0)

    return outer, inner
end

-- animate rainbow color for a frame (cycles hue)
local function animateRainbow(frame, speed)
    speed = speed or 0.1
    local hue = 0
    -- store a connection to stop later if needed
    local conn
    conn = RunService.Heartbeat:Connect(function(dt)
        if not frame.Parent then
            conn:Disconnect()
            return
        end
        hue = hue + dt * speed
        frame.BackgroundColor3 = HSV(hue, 1, 1)
    end)
    return conn
end

-- Create button factory (black inner + rainbow border)
local function createButton(parent, name, pos, size, onClick)
    local outer, inner = createRainbowFrame(parent, pos, size, UDim.new(0,0.15))
    local btn = Instance.new("TextButton")
    btn.Size = UDim2.new(1,0,1,0)
    btn.Position = UDim2.new(0,0,0,0)
    btn.Text = name
    btn.TextColor3 = Color3.new(1,1,1)
    btn.BackgroundTransparency = 1
    btn.BorderSizePixel = 0
    btn.Font = Enum.Font.SourceSansBold
    btn.TextScaled = true
    btn.Parent = inner
    btn.MouseButton1Click:Connect(function()
        pcall(onClick)
    end)
    -- animate the outer border
    animateRainbow(outer, 0.6)
    return btn, outer, inner
end

-- Ensure character/humanoid refs update on respawn
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:FindFirstChildOfClass("Humanoid") or character:WaitForChild("Humanoid")
local rootPart = character:FindFirstChild("HumanoidRootPart") or character:WaitForChild("HumanoidRootPart")
player.CharacterAdded:Connect(function(char)
    character = char
    humanoid = char:WaitForChild("Humanoid")
    rootPart = char:WaitForChild("HumanoidRootPart")
end)

-- BUTTON LAYOUT SETTINGS
local btnW, btnH = 32, 14 -- aún más compactos
local gapX, gapY = 6, 6
local perRow = 25 -- cuantos botones por fila (horizontalidad)
local startX, startY = 6, 6

-- Velocities (S1..S100)
local speedLabelYOffset = startY
for i = 1, 100 do
    local idx = i - 1
    local row = math.floor(idx / perRow)
    local col = idx % perRow
    local x = startX + (btnW + gapX) * col
    local y = speedLabelYOffset + (btnH + gapY) * row
    createButton(mainContainerOuter, "S"..i, UDim2.new(0, x, 0, y), UDim2.new(0, btnW, 0, btnH), function()
        if humanoid and humanoid.Parent then
            humanoid.WalkSpeed = i
        end
    end)
end

-- Jump buttons (J1..J100) placed debajo speeds with small separation
local jumpStartY = speedLabelYOffset + math.ceil(100 / perRow) * (btnH + gapY) + 10
for i = 1, 100 do
    local idx = i - 1
    local row = math.floor(idx / perRow)
    local col = idx % perRow
    local x = startX + (btnW + gapX) * col
    local y = jumpStartY + (btnH + gapY) * row
    createButton(mainContainerOuter, "J"..i, UDim2.new(0, x, 0, y), UDim2.new(0, btnW, 0, btnH), function()
        if humanoid and humanoid.Parent then
            -- En Roblox moderno JumpPower puede usarse o JumpHeight; usamos JumpPower por compatibilidad
            pcall(function() humanoid.JumpPower = i end)
            pcall(function() humanoid.JumpHeight = nil end)
        end
    end)
end

-- Special buttons area (fly, noclip, morir) to the right of the main block
local specialX = startX + (btnW + gapX) * (perRow + 1)
local specialY = startY

-- Fly
local flying = false
local bv = nil
local flySpeed = 80
createButton(mainContainerOuter, "Fly", UDim2.new(0, specialX, 0, specialY), UDim2.new(0, 64, 0, 20), function()
    flying = not flying
    if flying then
        if rootPart then
            bv = Instance.new("BodyVelocity")
            bv.MaxForce = Vector3.new(1e5,1e5,1e5)
            bv.Velocity = Vector3.new(0,0,0)
            bv.Parent = rootPart
        end
    else
        if bv and bv.Parent then bv:Destroy() end
        bv = nil
    end
end)

-- Noclip
local noclip = false
createButton(mainContainerOuter, "Noclip", UDim2.new(0, specialX, 0, specialY + 26), UDim2.new(0, 64, 0, 20), function()
    noclip = not noclip
end)

-- Morir
createButton(mainContainerOuter, "Morir", UDim2.new(0, specialX, 0, specialY + 52), UDim2.new(0, 64, 0, 20), function()
    if humanoid and humanoid.Parent then
        humanoid.Health = 0
    end
end)

-- Fly movement handling
local UserInputService = game:GetService("UserInputService")
RunService.RenderStepped:Connect(function(dt)
    if flying and bv and rootPart and workspace.CurrentCamera then
        local cam = workspace.CurrentCamera
        local move = Vector3.new()
        if UserInputService:IsKeyDown(Enum.KeyCode.W) then move = move + cam.CFrame.LookVector end
        if UserInputService:IsKeyDown(Enum.KeyCode.S) then move = move - cam.CFrame.LookVector end
        if UserInputService:IsKeyDown(Enum.KeyCode.A) then move = move - cam.CFrame.RightVector end
        if UserInputService:IsKeyDown(Enum.KeyCode.D) then move = move + cam.CFrame.RightVector end
        if UserInputService:IsKeyDown(Enum.KeyCode.Space) then move = move + Vector3.new(0,1,0) end
        if UserInputService:IsKeyDown(Enum.KeyCode.LeftControl) then move = move - Vector3.new(0,1,0) end
        if move.Magnitude > 0.01 then
            bv.Velocity = move.Unit * flySpeed
        else
            bv.Velocity = Vector3.new(0,0,0)
        end
    end
end)

-- Noclip handling
RunService.Stepped:Connect(function()
    if character and character.Parent then
        for _, part in pairs(character:GetDescendants()) do
            if part:IsA("BasePart") then
                part.CanCollide = not noclip
            end
        end
    end
end)

-- CENTER TITLE "Valk_X8 9997 V0.1"
local titleOuter, titleInner = createRainbowFrame(screenGui, UDim2.new(0.5, -180, 0.5, -30), UDim2.new(0, 360, 0, 60), UDim.new(0,0.2))
local titleLabel = Instance.new("TextLabel", titleInner)
titleLabel.Size = UDim2.new(1,0,1,0)
titleLabel.BackgroundTransparency = 1
titleLabel.Text = "Valk_X8 9997 V0.1"
titleLabel.TextColor3 = Color3.new(1,1,1)
titleLabel.Font = Enum.Font.GothamBold
titleLabel.TextScaled = true
titleLabel.TextStrokeTransparency = 0.6
titleLabel.Parent = titleInner
animateRainbow(titleOuter, 0.25)

-- BOTTOM-LEFT toggle circle (black inside, rainbow border). Minimiza/Restaurar GUI
local toggleOuter, toggleInner = createRainbowFrame(screenGui, UDim2.new(0, 10, 1, -60), UDim2.new(0, 48, 0, 48), UDim.new(1,0))
local toggleBtn = Instance.new("TextButton")
toggleBtn.Size = UDim2.new(1,1,1,1)
toggleBtn.Position = UDim2.new(0,0,0,0)
toggleBtn.BackgroundTransparency = 1
toggleBtn.Text = ""
toggleBtn.Parent = toggleInner

local minimized = false
local function setMinimized(m)
    minimized = m
    if minimized then
        mainContainerOuter.Visible = false
        titleOuter.Visible = false
        -- shrink toggle to smaller circle to indicate minimized
        tween = TweenService:Create(toggleOuter, TweenInfo.new(0.15), {Size = UDim2.new(0,40,0,40)})
        tween:Play()
    else
        mainContainerOuter.Visible = true
        titleOuter.Visible = true
        tween = TweenService:Create(toggleOuter, TweenInfo.new(0.15), {Size = UDim2.new(0,48,0,48)})
        tween:Play()
    end
end

toggleBtn.MouseButton1Click:Connect(function()
    setMinimized(not minimized)
end)

-- Make sure the GUI follows character respawn state (rebinds done above)
player.CharacterAdded:Connect(function()
    -- ensure references update (handled earlier)
    wait(0.5)
    -- if flying was active, remove BV to avoid errors
    if bv and bv.Parent then
        bv:Destroy()
        bv = nil
        flying = false
    end
end)

-- END OF SCRIPT-- Hacer draggable el título central
do
    local dragging = false
    local dragStart = Vector2.new()
    local guiStart = Vector2.new()
    
    local function updatePosition(input)
        local delta = input.Position - dragStart
        titleOuter.Position = UDim2.new(0, guiStart.X + delta.X, 0, guiStart.Y + delta.Y)
    end

    local mouse = player:GetMouse()

    titleOuter.InputBegan:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 then
            dragging = true
            dragStart = input.Position
            guiStart = Vector2.new(titleOuter.Position.X.Offset, titleOuter.Position.Y.Offset)
            input.Changed:Connect(function()
                if input.UserInputState == Enum.UserInputState.End then
                    dragging = false
                end
            end)
        end
    end)

    titleOuter.InputChanged:Connect(function(input)
        if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
            updatePosition(input)
        end
    end)

    -- También actualizar mientras se mueve el mouse (para smooth drag)
    mouse.Move:Connect(function()
        if dragging then
            local delta = mouse.X - dragStart.X
            local deltaY = mouse.Y - dragStart.Y
            titleOuter.Position = UDim2.new(0, guiStart.X + delta, 0, guiStart.Y + deltaY)
        end
    end)
end

Features & Information

Sad

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts