Kotyara19k-Official

Untitled

Apr 4th, 2025
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. -- Blukez UTG Style UI с возможностью добавления кнопок
  2. local player = game.Players.LocalPlayer
  3. local mouse = player:GetMouse()
  4.  
  5. -- UI
  6. local ScreenGui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))
  7. ScreenGui.Name = "UTGv3_Custom"
  8.  
  9. local mainFrame = Instance.new("Frame")
  10. mainFrame.Size = UDim2.new(0, 220, 0, 300)
  11. mainFrame.Position = UDim2.new(0.02, 0, 0.2, 0)
  12. mainFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
  13. mainFrame.BorderSizePixel = 0
  14. mainFrame.Active = true
  15. mainFrame.Draggable = true
  16. mainFrame.Parent = ScreenGui
  17.  
  18. local titleLabel = Instance.new("TextLabel", mainFrame)
  19. titleLabel.Size = UDim2.new(1, 0, 0, 30)
  20. titleLabel.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  21. titleLabel.Text = "Ultimate Trolling GUI v3"
  22. titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  23. titleLabel.TextSize = 16
  24. titleLabel.Font = Enum.Font.SourceSansBold
  25. titleLabel.BorderSizePixel = 0
  26.  
  27. local UIListLayout = Instance.new("UIListLayout", mainFrame)
  28. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  29. UIListLayout.Padding = UDim.new(0, 5)
  30.  
  31. titleLabel.LayoutOrder = 0
  32.  
  33. -- Функция для создания кнопок
  34. local function createButton(text, callback)
  35. local button = Instance.new("TextButton")
  36. button.Size = UDim2.new(1, -10, 0, 30)
  37. button.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  38. button.TextColor3 = Color3.fromRGB(255, 255, 255)
  39. button.TextSize = 14
  40. button.Font = Enum.Font.SourceSansBold
  41. button.Text = text
  42. button.Parent = mainFrame
  43. button.LayoutOrder = #mainFrame:GetChildren()
  44.  
  45. button.MouseButton1Click:Connect(function()
  46. pcall(callback)
  47. end)
  48. end
  49.  
  50. -- Глобальная функция
  51. _G.UTG = {
  52. AddButton = function(text, func)
  53. createButton(text, func)
  54. end
  55. }
  56.  
  57. -- Пример кнопки
  58. _G.UTG.AddButton("Пример кнопки", function()
  59. game.StarterGui:SetCore("ChatMakeSystemMessage", {
  60. Text = "Кнопка нажата!",
  61. Color = Color3.fromRGB(0,255,0),
  62. Font = Enum.Font.SourceSansBold,
  63. FontSize = Enum.FontSize.Size24
  64. })
  65. end)
  66.  
Advertisement
Add Comment
Please, Sign In to add comment