-- 添加隐藏按钮 local HideButton = Instance.new("TextButton") HideButton.Text = "隐藏" HideButton.Size = UDim2.new(1, -20, 0, 30) HideButton.Position = UDim2.new(0, 10, 1, -80) HideButton.Parent = Frame

-- 隐藏函数 local function HideUI() for _, child in ipairs(Frame:GetChildren()) do if child ~= HideButton then child.Visible = false end end end

-- 显示函数 local function ShowUI() for _, child in ipairs(Frame:GetChildren()) do child.Visible = true end end

-- 隐藏按钮的点击事件 HideButton.MouseButton1Click:Connect(function() HideUI() end)

-- 显示所有图形界面 ShowUI()

-- 添加到PlayerGui ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")

-- 创建UIlocal ScreenGui = InstancenewScreenGuiScreenGuiName = MusicPlayerlocal Frame = InstancenewFrameFramePosition = UDim2new05 -50 05 -25FrameSize = UDim2new0 100 0 90FrameBackgroundColor3 = Color3n

原文地址: https://www.cveoy.top/t/topic/bGBv 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录