Kotyara19k-Official

Untitled

Apr 4th, 2025
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. local UTG = {}
  2.  
  3. function UTG:CreateGui()
  4. local player = game.Players.LocalPlayer
  5. local gui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))
  6. gui.Name = "UTGMenu"
  7. gui.ResetOnSpawn = false
  8.  
  9. local main = Instance.new("Frame", gui)
  10. main.Name = "Main"
  11. main.Size = UDim2.new(0, 300, 0, 40)
  12. main.Position = UDim2.new(0, 20, 0.3, 0)
  13. main.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  14. main.Active = true
  15. main.Draggable = true
  16.  
  17. local uiCorner = Instance.new("UICorner", main)
  18. uiCorner.CornerRadius = UDim.new(0, 4)
  19.  
  20. local title = Instance.new("TextLabel", main)
  21. title.Name = "Title"
  22. title.Size = UDim2.new(1, 0, 1, 0)
  23. title.BackgroundTransparency = 1
  24. title.Text = "Ultimate Trolling GUI"
  25. title.Font = Enum.Font.Code
  26. title.TextColor3 = Color3.fromRGB(255, 0, 0)
  27. title.TextScaled = true
  28.  
  29. local buttonHolder = Instance.new("Frame", gui)
  30. buttonHolder.Name = "Buttons"
  31. buttonHolder.Size = UDim2.new(0, 300, 0, 0)
  32. buttonHolder.Position = main.Position + UDim2.new(0, 0, 0, 45)
  33. buttonHolder.BackgroundTransparency = 1
  34.  
  35. local layout = Instance.new("UIListLayout", buttonHolder)
  36. layout.SortOrder = Enum.SortOrder.LayoutOrder
  37. layout.Padding = UDim.new(0, 5)
  38.  
  39. return {
  40. AddButton = function(_, text, callback)
  41. local btn = Instance.new("TextButton", buttonHolder)
  42. btn.Size = UDim2.new(1, 0, 0, 40)
  43. btn.BackgroundColor3 = Color3.fromRGB(30, 0, 0)
  44. btn.Text = text
  45. btn.TextColor3 = Color3.fromRGB(255, 0, 0)
  46. btn.Font = Enum.Font.Code
  47. btn.TextScaled = true
  48.  
  49. local corner = Instance.new("UICorner", btn)
  50. corner.CornerRadius = UDim.new(0, 4)
  51.  
  52. local stroke = Instance.new("UIStroke", btn)
  53. stroke.Color = Color3.fromRGB(255, 0, 0)
  54. stroke.Thickness = 1
  55.  
  56. btn.MouseButton1Click:Connect(callback)
  57.  
  58. -- Обновим размер фрейма
  59. buttonHolder.Size = UDim2.new(0, 300, 0, layout.AbsoluteContentSize.Y)
  60. layout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
  61. buttonHolder.Size = UDim2.new(0, 300, 0, layout.AbsoluteContentSize.Y)
  62. end)
  63. end
  64. }
  65. end
  66.  
  67. return UTG
  68.  
Advertisement
Add Comment
Please, Sign In to add comment