Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local player = Players.LocalPlayer
- local playerGui = player:WaitForChild("PlayerGui")
- -- Создаем ScreenGui
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "RenzooGui"
- screenGui.Parent = playerGui
- -- Создаем основной Frame
- local mainFrame = Instance.new("Frame")
- mainFrame.Name = "MainFrame"
- mainFrame.Size = UDim2.new(0, 200, 0, 150)
- mainFrame.Position = UDim2.new(0.5, -100, 0.5, -75) -- Центр экрана
- mainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
- mainFrame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- mainFrame.BorderSizePixel = 0
- mainFrame.Parent = screenGui
- -- Добавляем текст
- local textLabel = Instance.new("TextLabel")
- textLabel.Name = "TextLabel"
- textLabel.Size = UDim2.new(0.8, 0, 0.6, 0)
- textLabel.Position = UDim2.new(0.1, 0, 0.1, 0)
- textLabel.BackgroundTransparency = 1
- textLabel.Text = "hbsbhs1201"
- textLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- textLabel.TextScaled = true
- textLabel.Font = Enum.Font.SourceSansBold
- textLabel.Parent = mainFrame
- -- Добавляем кнопку закрытия
- local closeButton = Instance.new("TextButton")
- closeButton.Name = "CloseButton"
- closeButton.Size = UDim2.new(0.6, 0, 0.2, 0)
- closeButton.Position = UDim2.new(0.2, 0, 0.75, 0)
- closeButton.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
- closeButton.BorderSizePixel = 0
- closeButton.Text = "Close"
- closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- closeButton.Font = Enum.Font.SourceSans
- closeButton.TextScaled = true
- closeButton.Parent = mainFrame
- -- Функция закрытия GUI
- local function closeGui()
- screenGui:Destroy()
- end
- -- Подключаем функцию к кнопке
- closeButton.MouseButton1Click:Connect(closeGui)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement