
KeylessUniversal

-- KRNL Script: Серая кнопка со звуком
local function createGrayButtonWithSound()
-- Создаем ScreenGui
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "GrayButtonGui"
screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
-- Создаем Frame (кнопка)
local button = Instance.new("TextButton")
button.Name = "GrayButton64x48"
button.Size = UDim2.new(0, 64, 0, 48) -- 64x48 пикселей
button.Position = UDim2.new(0.5, -32, 0.5, -24) -- Центр экрана
button.AnchorPoint = Vector2.new(0.5, 0.5)
button.BackgroundColor3 = Color3.fromRGB(128, 128, 128) -- Серый цвет
button.BorderSizePixel = 2
button.BorderColor3 = Color3.fromRGB(80, 80, 80)
-- Настройки текста
button.Text = "Нажми"
button.TextColor3 = Color3.fromRGB(255, 255, 255) -- Белый текст
button.TextScaled = true
button.Font = Enum.Font.SourceSansBold
-- Эффекты при наведении
button.MouseEnter:Connect(function()
button.BackgroundColor3 = Color3.fromRGB(140, 140, 140)
end)
button.MouseLeave:Connect(function()
button.BackgroundColor3 = Color3.fromRGB(128, 128, 128)
end)
-- Звук при нажатии
button.MouseButton1Click:Connect(function()
-- Создаем звук
local sound = Instance.new("Sound")
sound.SoundId = "rbxassetid://4809574295"
sound.Volume = 0.7
sound.Parent = game.Workspace
-- Эффект нажатия
button.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
button.Text = "♪"
-- Проигрываем звук
sound:Play()
-- Возвращаем исходный вид через 0.3 секунды
wait(0.3)
button.BackgroundColor3 = Color3.fromRGB(128, 128, 128)
button.Text = "Нажми"
-- Удаляем звук после проигрывания
wait(2)
sound:Destroy()
end)
button.Parent = screenGui
print("Серая кнопка 64×48 создана! Нажмите для звука.")
return button
end
-- Запускаем функцию
createGrayButtonWithSound()
-- Функция для удаления кнопки
local function removeButton()
local playerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
local screenGui = playerGui:FindFirstChild("GrayButtonGui")
if screenGui then
screenGui:Destroy()
print("Кнопка удалена!")
end
end
-- Автоудаление через 60 секунд (раскомментируйте если нужно)
-- wait(60)
-- removeButton()No comments yet for this script.



