Script music
Key RequiredUniversal

Script music

Universal ScriptMariarosangeladejesMariarosangeladejes 4.3K views 118 executesUpdated Aug 26, 2025
Unrated
00
Lua Script•1 lines (7272 chars)
--[[ 	WARNING: Heads up! This script has not been verified by ScriptBlox. Use at your own risk! ]] -- Hub de Áudio com Intro de 10s e Repetição Temporizada -- LocalScript  local Players = game:GetService("Players") local player = Players.LocalPlayer  -- Criar GUI principal local gui = Instance.new("ScreenGui") gui.Name = "AudioHub" gui.ResetOnSpawn = false gui.Parent = player:WaitForChild("PlayerGui")  -- === INTRO (Tela Vermelha) === local introFrame = Instance.new("Frame") introFrame.Size = UDim2.new(1,0,1,0) introFrame.BackgroundColor3 = Color3.fromRGB(200,0,0) introFrame.Parent = gui  local msg = Instance.new("TextLabel") msg.Size = UDim2.new(1,0,1,0) msg.BackgroundTransparency = 1 msg.Text = "⚠️ Esse script faz que só você escute.\nObrigado por executar!\n\nSeu Hub vai ser carregado em 10 segundos..." msg.TextScaled = true msg.Font = Enum.Font.GothamBold msg.TextColor3 = Color3.fromRGB(255,255,255) msg.Parent = introFrame  -- Timer de 10 segundos task.delay(10, function() 	introFrame:Destroy() -- remove tela vermelha end)  -- === HUB (aparece depois de 10s) === task.delay(10, function() 	-- Botão Tirar/Voltar 	local toggleUIBtn = Instance.new("TextButton") 	toggleUIBtn.Size = UDim2.new(0, 120, 0, 36) 	toggleUIBtn.Position = UDim2.new(0.5, -60, 0, 20) 	toggleUIBtn.Text = "Tirar" 	toggleUIBtn.TextScaled = true 	toggleUIBtn.Font = Enum.Font.GothamBold 	toggleUIBtn.BackgroundColor3 = Color3.fromRGB(200, 40, 40) 	toggleUIBtn.TextColor3 = Color3.fromRGB(255, 255, 255) 	toggleUIBtn.Parent = gui 	Instance.new("UICorner", toggleUIBtn).CornerRadius = UDim.new(0, 12)  	-- Janela principal (aumentada para caber a nova opção) 	local mainFrame = Instance.new("Frame") 	mainFrame.Size = UDim2.new(0, 280, 0, 240) 	mainFrame.Position = UDim2.new(0.5, -140, 0.5, -120) 	mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) 	mainFrame.Parent = gui 	Instance.new("UICorner", mainFrame).CornerRadius = UDim.new(0, 16)  	-- Caixa de ID 	local box = Instance.new("TextBox") 	box.Size = UDim2.new(0.8, -10, 0, 40) 	box.Position = UDim2.new(0.1, 0, 0.08, 0) 	box.PlaceholderText = "Coloque o ID do áudio" 	box.TextScaled = true 	box.Font = Enum.Font.GothamBold 	box.TextColor3 = Color3.fromRGB(255, 255, 255) 	box.BackgroundColor3 = Color3.fromRGB(50, 50, 50) 	box.Parent = mainFrame 	Instance.new("UICorner", box).CornerRadius = UDim.new(0, 8)  	-- Botão Play 	local playBtn = Instance.new("TextButton") 	playBtn.Size = UDim2.new(0.35, 0, 0, 36) 	playBtn.Position = UDim2.new(0.1, 0, 0.32, 0) 	playBtn.Text = "▶️ Play" 	playBtn.TextScaled = true 	playBtn.Font = Enum.Font.GothamBold 	playBtn.BackgroundColor3 = Color3.fromRGB(80, 80, 80) 	playBtn.TextColor3 = Color3.fromRGB(255, 255, 255) 	playBtn.Parent = mainFrame 	Instance.new("UICorner", playBtn).CornerRadius = UDim.new(0, 8)  	-- Botão Stop 	local stopBtn = Instance.new("TextButton") 	stopBtn.Size = UDim2.new(0.35, 0, 0, 36) 	stopBtn.Position = UDim2.new(0.55, 0, 0.32, 0) 	stopBtn.Text = "⏹ Stop" 	stopBtn.TextScaled = true 	stopBtn.Font = Enum.Font.GothamBold 	stopBtn.BackgroundColor3 = Color3.fromRGB(80, 80, 80) 	stopBtn.TextColor3 = Color3.fromRGB(255, 255, 255) 	stopBtn.Parent = mainFrame 	Instance.new("UICorner", stopBtn).CornerRadius = UDim.new(0, 8)  	-- Slider Volume (simples com TextBox) 	local volBox = Instance.new("TextBox") 	volBox.Size = UDim2.new(0.8, -10, 0, 36) 	volBox.Position = UDim2.new(0.1, 0, 0.56, 0) 	volBox.Text = "Volume: 3 (0–10)" 	volBox.TextScaled = true 	volBox.Font = Enum.Font.GothamBold 	volBox.TextColor3 = Color3.fromRGB(255, 255, 255) 	volBox.BackgroundColor3 = Color3.fromRGB(50, 50, 50) 	volBox.Parent = mainFrame 	Instance.new("UICorner", volBox).CornerRadius = UDim.new(0, 8)  	-- === NOVO: OPÇÃO DE REPETIÇÃO TEMPORIZADA === 	local repeatFrame = Instance.new("Frame") 	repeatFrame.Size = UDim2.new(0.8, -10, 0, 60) 	repeatFrame.Position = UDim2.new(0.1, 0, 0.78, 0) 	repeatFrame.BackgroundTransparency = 1 	repeatFrame.Parent = mainFrame  	-- Caixa de tempo de repetição 	local repeatBox = Instance.new("TextBox") 	repeatBox.Size = UDim2.new(1, 0, 0, 30) 	repeatBox.Position = UDim2.new(0, 0, 0, 0) 	repeatBox.Text = "Repetir por: 0 (min/horas)" 	repeatBox.TextScaled = true 	repeatBox.Font = Enum.Font.GothamBold 	repeatBox.TextColor3 = Color3.fromRGB(255, 255, 255) 	repeatBox.BackgroundColor3 = Color3.fromRGB(50, 50, 50) 	repeatBox.Parent = repeatFrame 	Instance.new("UICorner", repeatBox).CornerRadius = UDim.new(0, 8)  	-- Botão para escolher entre minutos/horas 	local timeTypeBtn = Instance.new("TextButton") 	timeTypeBtn.Size = UDim2.new(0.45, 0, 0, 25) 	timeTypeBtn.Position = UDim2.new(0.27, 0, 0.55, 0) 	timeTypeBtn.Text = "Minutos" 	timeTypeBtn.TextScaled = true 	timeTypeBtn.Font = Enum.Font.GothamBold 	timeTypeBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 60) 	timeTypeBtn.TextColor3 = Color3.fromRGB(255, 255, 255) 	timeTypeBtn.Parent = repeatFrame 	Instance.new("UICorner", timeTypeBtn).CornerRadius = UDim.new(0, 8)  	-- Sound 	local sound = Instance.new("Sound") 	sound.Looped = true 	sound.Volume = 3 	sound.Parent = workspace  	-- Variáveis para controle de repetição 	local repeatTime = 0 	local isMinutes = true 	local repeatConnection = nil  	-- Funções 	playBtn.MouseButton1Click:Connect(function() 		local id = tonumber(box.Text) 		if id then 			sound.SoundId = "rbxassetid://" .. id 			sound:Play()  			-- Se houver tempo de repetição definido, agenda o parada 			if repeatTime > 0 then 				local totalSeconds = isMinutes and (repeatTime * 60) or (repeatTime * 3600) 				 				-- Cancela qualquer agendamento anterior 				if repeatConnection then 					repeatConnection:Disconnect() 				end  				repeatConnection = task.delay(totalSeconds, function() 					sound:Stop() 					warn("Música parada automaticamente após " .. repeatTime .. " " .. (isMinutes and "minutos" or "horas")) 				end) 			end 		end 	end)  	stopBtn.MouseButton1Click:Connect(function() 		sound:Stop() 		-- Cancela agendamento de parada 		if repeatConnection then 			repeatConnection:Disconnect() 			repeatConnection = nil 		end 	end)  	volBox.FocusLost:Connect(function() 		local num = tonumber(volBox.Text:match("%d+")) 		if num then 			if num > 10 then num = 10 end 			if num < 0 then num = 0 end 			sound.Volume = num 			volBox.Text = "Volume: " .. num .. " (0–10)" 		end 	end)  	-- Controle da caixa de repetição 	repeatBox.FocusLost:Connect(function() 		local num = tonumber(repeatBox.Text:match("%d+")) 		if num then 			if num < 0 then num = 0 end 			repeatTime = num 			repeatBox.Text = "Repetir por: " .. num .. " (" .. (isMinutes and "minutos" or "horas") .. ")" 		end 	end)  	-- Alternar entre minutos e horas 	timeTypeBtn.MouseButton1Click:Connect(function() 		isMinutes = not isMinutes 		timeTypeBtn.Text = isMinutes and "Minutos" or "Horas" 		repeatBox.Text = "Repetir por: " .. repeatTime .. " (" .. (isMinutes and "minutos" or "horas") .. ")" 	end)  	-- Mostrar/ocultar interface 	local uiVisible = true 	toggleUIBtn.MouseButton1Click:Connect(function() 		uiVisible = not uiVisible 		mainFrame.Visible = uiVisible 		if uiVisible then 			toggleUIBtn.Text = "Tirar" 			toggleUIBtn.BackgroundColor3 = Color3.fromRGB(200, 40, 40) 		else 			toggleUIBtn.Text = "Voltar" 			toggleUIBtn.BackgroundColor3 = Color3.fromRGB(40, 200, 40) 		end 	end) end)

Features & Information

Music

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts