Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Blukez UTG Style UI с возможностью добавления кнопок
- local player = game.Players.LocalPlayer
- local mouse = player:GetMouse()
- -- UI
- local ScreenGui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))
- ScreenGui.Name = "UTGv3_Custom"
- local mainFrame = Instance.new("Frame")
- mainFrame.Size = UDim2.new(0, 220, 0, 300)
- mainFrame.Position = UDim2.new(0.02, 0, 0.2, 0)
- mainFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
- mainFrame.BorderSizePixel = 0
- mainFrame.Active = true
- mainFrame.Draggable = true
- mainFrame.Parent = ScreenGui
- local titleLabel = Instance.new("TextLabel", mainFrame)
- titleLabel.Size = UDim2.new(1, 0, 0, 30)
- titleLabel.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- titleLabel.Text = "Ultimate Trolling GUI v3"
- titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- titleLabel.TextSize = 16
- titleLabel.Font = Enum.Font.SourceSansBold
- titleLabel.BorderSizePixel = 0
- local UIListLayout = Instance.new("UIListLayout", mainFrame)
- UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
- UIListLayout.Padding = UDim.new(0, 5)
- titleLabel.LayoutOrder = 0
- -- Функция для создания кнопок
- local function createButton(text, callback)
- local button = Instance.new("TextButton")
- button.Size = UDim2.new(1, -10, 0, 30)
- button.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- button.TextColor3 = Color3.fromRGB(255, 255, 255)
- button.TextSize = 14
- button.Font = Enum.Font.SourceSansBold
- button.Text = text
- button.Parent = mainFrame
- button.LayoutOrder = #mainFrame:GetChildren()
- button.MouseButton1Click:Connect(function()
- pcall(callback)
- end)
- end
- -- Глобальная функция
- _G.UTG = {
- AddButton = function(text, func)
- createButton(text, func)
- end
- }
- -- Пример кнопки
- _G.UTG.AddButton("Пример кнопки", function()
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "Кнопка нажата!",
- Color = Color3.fromRGB(0,255,0),
- Font = Enum.Font.SourceSansBold,
- FontSize = Enum.FontSize.Size24
- })
- end)
Advertisement
Add Comment
Please, Sign In to add comment