Advertisement
kill21_2

renzo hello

Jun 19th, 2025 (edited)
8
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local player = Players.LocalPlayer
  3. local playerGui = player:WaitForChild("PlayerGui")
  4.  
  5. -- Создаем ScreenGui
  6. local screenGui = Instance.new("ScreenGui")
  7. screenGui.Name = "RenzooGui"
  8. screenGui.Parent = playerGui
  9.  
  10. -- Создаем основной Frame
  11. local mainFrame = Instance.new("Frame")
  12. mainFrame.Name = "MainFrame"
  13. mainFrame.Size = UDim2.new(0, 200, 0, 150)
  14. mainFrame.Position = UDim2.new(0.5, -100, 0.5, -75) -- Центр экрана
  15. mainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  16. mainFrame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  17. mainFrame.BorderSizePixel = 0
  18. mainFrame.Parent = screenGui
  19.  
  20. -- Добавляем текст
  21. local textLabel = Instance.new("TextLabel")
  22. textLabel.Name = "TextLabel"
  23. textLabel.Size = UDim2.new(0.8, 0, 0.6, 0)
  24. textLabel.Position = UDim2.new(0.1, 0, 0.1, 0)
  25. textLabel.BackgroundTransparency = 1
  26. textLabel.Text = "hbsbhs1201"
  27. textLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  28. textLabel.TextScaled = true
  29. textLabel.Font = Enum.Font.SourceSansBold
  30. textLabel.Parent = mainFrame
  31.  
  32. -- Добавляем кнопку закрытия
  33. local closeButton = Instance.new("TextButton")
  34. closeButton.Name = "CloseButton"
  35. closeButton.Size = UDim2.new(0.6, 0, 0.2, 0)
  36. closeButton.Position = UDim2.new(0.2, 0, 0.75, 0)
  37. closeButton.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
  38. closeButton.BorderSizePixel = 0
  39. closeButton.Text = "Close"
  40. closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  41. closeButton.Font = Enum.Font.SourceSans
  42. closeButton.TextScaled = true
  43. closeButton.Parent = mainFrame
  44.  
  45. -- Функция закрытия GUI
  46. local function closeGui()
  47. screenGui:Destroy()
  48. end
  49.  
  50. -- Подключаем функцию к кнопке
  51. closeButton.MouseButton1Click:Connect(closeGui)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement