Pastebin

Paste #36178: No description

< previous paste - next paste>

Pasted by Ss

Download View as text

local player = game.Players.LocalPlayer
local rs = game:GetService("ReplicatedStorage")
local stylesFolder = rs:WaitForChild("LightsaberModules"):WaitForChild("Styles")
local setStyle = rs:WaitForChild("LightsaberRemotes"):WaitForChild("SetStyle")
local unequip = rs.LightsaberRemotes:FindFirstChild("Unequip")
local equip = rs.LightsaberRemotes:FindFirstChild("Equip")
local lightsaberRemotes = rs:WaitForChild("LightsaberRemotes")
local players = game:GetService("Players")




-- Função para tocar o som de clique
local function playClickSound()
    local sound = Instance.new("Sound")
    sound.SoundId = "rbxassetid://17208361335"
    sound.Volume = 1
    sound.PlayOnRemove = true
    sound.Parent = workspace
    sound:Destroy() -- Toca e remove imediatamente (por causa do PlayOnRemove)
end

local function createUI()
    local playerGui = player:WaitForChild("PlayerGui")

    if playerGui:FindFirstChild("SaberSelector") then
        playerGui:FindFirstChild("SaberSelector"):Destroy()
    end

    local screenGui = Instance.new("ScreenGui")
    screenGui.Name = "SaberSelector"
    screenGui.ResetOnSpawn = false
    screenGui.Parent = playerGui

    local background = Instance.new("Frame")
    background.Size = UDim2.new(0, 380, 0, 420)
    background.Position = UDim2.new(0.5, -150, 0.5, -200)
    background.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
    background.Parent = screenGui

    Instance.new("UICorner", background).CornerRadius = UDim.new(0, 12)
    Instance.new("UIStroke", background).Color = Color3.fromRGB(100, 100, 100)

    local dragHandle = Instance.new("Frame")
    dragHandle.Size = UDim2.new(1, 0, 0, 50)
    dragHandle.Position = UDim2.new(0, 0, 0, 0)
    dragHandle.BackgroundTransparency = 1
    dragHandle.Parent = background

    local title = Instance.new("TextLabel")
    title.Size = UDim2.new(1, -40, 0, 30)
    title.Position = UDim2.new(0, 20, 0, 10)
    title.Text = "🏏 SB"
    title.TextColor3 = Color3.fromRGB(255, 255, 255)
    title.TextSize = 23
    title.Font = Enum.Font.GothamBold
    title.BackgroundTransparency = 1
    title.TextXAlignment = Enum.TextXAlignment.Left
    title.Parent = background

    local minimizeBtn = Instance.new("TextButton")
    minimizeBtn.Size = UDim2.new(0, 30, 0, 30)
    minimizeBtn.Position = UDim2.new(1, -35, 0, 10)
    minimizeBtn.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
    minimizeBtn.Text = "🔽"
    minimizeBtn.TextSize = 20
    minimizeBtn.TextColor3 = Color3.new(1, 1, 1)
    minimizeBtn.Font = Enum.Font.GothamBold
    minimizeBtn.Parent = background
    Instance.new("UICorner", minimizeBtn).CornerRadius = UDim.new(0, 6)

    local closeBtn = Instance.new("TextButton")
    closeBtn.Size = UDim2.new(0, 30, 0, 30)
    closeBtn.Position = UDim2.new(1, -70, 0, 10)
    closeBtn.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
    closeBtn.Text = "X"
    closeBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
    closeBtn.Font = Enum.Font.GothamBold
    closeBtn.TextSize = 20
    closeBtn.Parent = background
    Instance.new("UICorner", closeBtn).CornerRadius = UDim.new(0, 6)

    closeBtn.MouseButton1Click:Connect(function()
        playClickSound()
        screenGui:Destroy()
    end)

    local contentFrame = Instance.new("Frame")
    contentFrame.Size = UDim2.new(1, 0, 1, -50)
    contentFrame.Position = UDim2.new(0, 0, 0, 50)
    contentFrame.BackgroundTransparency = 1
    contentFrame.Parent = background

    local button = Instance.new("TextButton")
    button.Size = UDim2.new(1, -25, 0, 40)
    button.Position = UDim2.new(0, 12.2, 0, 10)
    button.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
    button.Text = "GOD MODE / KILL AURA [OFF]"
    button.TextColor3 = Color3.new(1, 1, 1)
    button.Font = Enum.Font.Gotham
    button.TextSize = 20
    button.Parent = contentFrame
    Instance.new("UICorner", button).CornerRadius = UDim.new(0, 8)

    local godModeActive = false
    button.MouseButton1Click:Connect(function()
        playClickSound()
        godModeActive = not godModeActive
        button.BackgroundColor3 = godModeActive and Color3.fromRGB(80, 80, 80) or Color3.fromRGB(40, 40, 40)
        button.Text = godModeActive and l
    end)

    

    local dropdown = Instance.new("TextButton")
    dropdown.Size = UDim2.new(0.8, 0, 0, 35)
    dropdown.Position = UDim2.new(0.1, 0, 0, 60)
    dropdown.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
    dropdown.TextColor3 = Color3.new(1, 1, 1)
    dropdown.Text = "Select Saber"
    dropdown.Font = Enum.Font.GothamBold
    dropdown.TextScaled = true
    dropdown.Parent = contentFrame
    Instance.new("UICorner", dropdown).CornerRadius = UDim.new(0, 8)

    local listFrame = Instance.new("ScrollingFrame")
    listFrame.Size = UDim2.new(0.8, 0, 0, 0)
    listFrame.Position = UDim2.new(0.1, 0, 0, 100)
    listFrame.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
    listFrame.Visible = false
    listFrame.ScrollBarThickness = 6
    listFrame.ClipsDescendants = true
    listFrame.AutomaticCanvasSize = Enum.AutomaticSize.Y
    listFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
    listFrame.Parent = contentFrame
    Instance.new("UICorner", listFrame).CornerRadius = UDim.new(0, 8)

    local layout = Instance.new("UIListLayout", listFrame)
    layout.SortOrder = Enum.SortOrder.LayoutOrder
    layout.Padding = UDim.new(0, 2)

    dropdown.MouseButton1Click:Connect(function()
        playClickSound()
        listFrame.Visible = not listFrame.Visible
        listFrame.Size = listFrame.Visible and UDim2.new(0.8, 0, 0, 150) or UDim2.new(0.8, 0, 0, 0)
    end)

    for _, style in ipairs(stylesFolder:GetChildren()) do
        local btn = Instance.new("TextButton")
        btn.Size = UDim2.new(1, 0, 0, 30)
        btn.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
        btn.TextColor3 = Color3.new(1, 1, 1)
        btn.Text = style.Name
        btn.Font = Enum.Font.Gotham
        btn.TextScaled = true
        btn.Parent = listFrame
        Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 8)

        btn.MouseButton1Click:Connect(function()
            playClickSound()
            setStyle:FireServer(style.Name)
            if unequip and equip then
                unequip:FireServer()
                task.wait(0.1)
                equip:FireServer()
            end
            dropdown.Text = "Selected: " .. style.Name
            listFrame.Visible = false
            listFrame.Size = UDim2.new(0.8, 0, 0, 0)
        end)
    end

    local minimized = false
    minimizeBtn.MouseButton1Click:Connect(function()
        playClickSound()
        minimized = not minimized
        contentFrame.Visible = not minimized
        minimizeBtn.Text = minimized and "🔼" or "🔽"
        background.Size = minimized and UDim2.new(0, 300, 0, 50) or UDim2.new(0, 380, 0, 420)
        title.TextXAlignment = minimized and Enum.TextXAlignment.Center or Enum.TextXAlignment.Left
    end)

    local dragging = false
    local dragStart, startPos

    dragHandle.InputBegan:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 then
            dragging = true
            dragStart = input.Position
            startPos = background.Position
        end
    end)

    dragHandle.InputChanged:Connect(function(input)
        if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
            local delta = input.Position - dragStart
            background.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X,
                                            startPos.Y.Scale, startPos.Y.Offset + delta.Y)
        end
    end)

    dragHandle.InputEnded:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 then
            dragging = false
        end
    end)
end

createUI()

New Paste


Do not write anything in this field if you're a human.

Go to most recent paste.