Team lolz music fixed
Key RequiredUniversal

Team lolz music fixed

Universal ScriptHulseyteaHulseytea 16.9K views 12 executesUpdated Apr 13, 2025
Unrated
00
Lua Script•198 lines (6272 chars)
--[[
    WARNING: Heads up! This script has not been verified by ScriptBlox. Use at your own risk!
]]
-- Create GUI
local player = game.Players.LocalPlayer
local screenGui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))
local frame = Instance.new("Frame", screenGui)

-- Frame properties
frame.Size = UDim2.new(0.5, 0, 0.5, 0)
frame.Position = UDim2.new(0.25, 0, 0.25, 0)
frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
frame.BackgroundTransparency = 0.5
frame.Active = true
frame.Draggable = true
frame.Visible = false

-- Create title label
local titleLabel = Instance.new("TextLabel", frame)
titleLabel.Text = "Team Lolz by hulseytea3 and teamredkidd"  -- Updated title text
titleLabel.Size = UDim2.new(1, 0, 0.1, 0)
titleLabel.Position = UDim2.new(0, 0, 0, 0)
titleLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
titleLabel.TextScaled = true

-- Table to keep track of currently playing sounds
local currentlyPlayingSounds = {}

-- Function to create buttons
local function createButton(name, soundId, position)
    local button = Instance.new("TextButton", frame)
    button.Text = name
    button.Size = UDim2.new(0.8, 0, 0.1, 0)
    button.Position = position
    button.BackgroundColor3 = Color3.fromRGB(200, 200, 200)
    button.Active = true

    button.MouseButton1Click:Connect(function()
        print(name .. " button clicked.") -- Debug: Button click
        -- Stop all currently playing sounds
        for _, sound in ipairs(currentlyPlayingSounds) do
            sound:Stop()
        end

        -- Create and play the new sound
        local sound = Instance.new("Sound", workspace)
        sound.SoundId = "rbxassetid://" .. soundId
        sound.Volume = 1 -- Set volume to 100%

        -- Check if the sound can be played before storing it
        local success, errorMessage = pcall(function()
            sound:Play()
        end)

        if success then
            table.insert(currentlyPlayingSounds, sound)
            print(name .. " is now playing.") -- Debug: Sound playing
        else
            print("Error: Unable to play " .. name .. ": " .. errorMessage) -- Debug: Error message
        end

        -- Clean up for finished sounds
        sound.Ended:Connect(function()
            for i, s in ipairs(currentlyPlayingSounds) do
                if s == sound then
                    table.remove(currentlyPlayingSounds, i)
                    break
                end
            end
        end)
    end)
end

-- Create music buttons with updated sound IDs in order
local musicIds = {
    "93218265275853", -- ID for button 1
    "97819883348155", -- ID for button 2 (Music Button 2)
    "97463170359026", -- ID for button 3
    "18841891232", -- ID for button 4
    "89180730857801", -- ID for button 5
    "138397903891342", -- ID for button 6
    "135881205397136", -- ID for button 7
    "16831108393", -- ID for button 8
    "72928510467705", -- ID for button 9
    "70386399207262", -- ID for button 10
    "5410085763", -- ID for button 11
    "123039027577735" -- ID for button 12
}

local musicNames = {
    "Play Music 1",
    "Music Button 2", -- Updated name for button 2
    "Play Music 3",
    "Play Music 4",
    "Play Music 5",
    "Play Music 6",
    "Play Music 7",
    "Play Music 8",
    "Play Music 9",
    "Play Music 10",
    "Play Music 11",
    "Team Lolz Theme" -- Name for button 12
}

-- Create buttons for music IDs in order
for i, id in ipairs(musicIds) do
    createButton(musicNames[i], id, UDim2.new(0.1, 0, 0.1 * (i + 1), 0)) -- Adjust position accordingly
end

-- Create close button
local closeButton = Instance.new("TextButton", frame)
closeButton.Text = "Close"
closeButton.Size = UDim2.new(0.3, 0, 0.1, 0)
closeButton.Position = UDim2.new(0.1, 0, 0.85, 0)
closeButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)

closeButton.MouseButton1Click:Connect(function()
    frame.Visible = false -- Hide the GUI
end)

-- Create stop music button
local stopButton = Instance.new("TextButton", frame)
stopButton.Text = "Stop Music"
stopButton.Size = UDim2.new(0.3, 0, 0.1, 0)
stopButton.Position = UDim2.new(0.6, 0, 0.85, 0)
stopButton.BackgroundColor3 = Color3.fromRGB(255, 255, 0)

stopButton.MouseButton1Click:Connect(function()
    -- Stop all currently playing sounds
    for _, sound in ipairs(currentlyPlayingSounds) do
        sound:Stop()
    end
    -- Clear the currentlyPlayingSounds table
    currentlyPlayingSounds = {}
end)

-- Create open button
local openButton = Instance.new("TextButton", screenGui)
openButton.Text = "Open"
openButton.Size = UDim2.new(0.3, 0, 0.1, 0)
openButton.Position = UDim2.new(0.35, 0, 0.9, 0)
openButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0)

openButton.MouseButton1Click:Connect(function()
    frame.Visible = true -- Show the GUI
end)

-- Make the close and stop buttons draggable
local function makeButtonDraggable(button)
    local dragging
    local dragInput
    local startPos

    button.InputBegan:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 then
            dragging = true
            startPos = input.Position - button.Position

            input.Changed:Connect(function()
                if input.UserInputState == Enum.UserInputState.End then
                    dragging = false
                end
            end)
        end
    end)

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

    game:GetService("UserInputService").InputChanged:Connect(function(input)
        if dragging and input == dragInput then
            button.Position = UDim2.new(0, input.Position.X - startPos.X, 0, input.Position.Y - startPos.Y)
        end
    end)
end

-- Make the close and stop buttons draggable
makeButtonDraggable(closeButton)
makeButtonDraggable(stopButton)

-- RGB Effect for Frame
while wait(0.1) do
    for i = 0, 255, 5 do
        frame.BackgroundColor3 = Color3.fromRGB(i, 0, 255 - i)
        wait(0.1)
    end
    for i = 0, 255, 5 do
        frame.BackgroundColor3 = Color3.fromRGB(255 - i, i, 0)
        wait(0.1)
    end
    for i = 0, 255, 5 do
        frame.BackgroundColor3 = Color3.fromRGB(0, 255 - i, i)
        wait(0.1)
    end
end

Features & Information

Not fe bypass

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts