Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Custom UI Framework
- local UserInputService = game:GetService("UserInputService")
- local TweenService = game:GetService("TweenService")
- local CoreGui = game:GetService("CoreGui")
- -- Create main UI elements
- local ScreenGui = Instance.new("ScreenGui")
- local MainFrame = Instance.new("Frame")
- local TopBar = Instance.new("Frame")
- local Title = Instance.new("TextLabel")
- local Container = Instance.new("Frame")
- local ScriptBox = Instance.new("TextBox")
- local ExecuteButton = Instance.new("TextButton")
- local ClearButton = Instance.new("TextButton")
- local UNCLabel = Instance.new("TextLabel")
- -- UI Properties
- ScreenGui.Name = "PowerExecutor"
- ScreenGui.Parent = CoreGui
- ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- MainFrame.Name = "MainFrame"
- MainFrame.Size = UDim2.new(0, 500, 0, 300)
- MainFrame.Position = UDim2.new(0.5, -250, 0.5, -150)
- MainFrame.BackgroundColor3 = Color3.fromRGB(30, 24, 45)
- MainFrame.BorderSizePixel = 0
- MainFrame.Parent = ScreenGui
- TopBar.Name = "TopBar"
- TopBar.Size = UDim2.new(1, 0, 0, 30)
- TopBar.BackgroundColor3 = Color3.fromRGB(48, 37, 82)
- TopBar.BorderSizePixel = 0
- TopBar.Parent = MainFrame
- Title.Name = "Title"
- Title.Size = UDim2.new(1, 0, 1, 0)
- Title.BackgroundTransparency = 1
- Title.Text = "💫 Power Executor V2"
- Title.TextColor3 = Color3.fromRGB(255, 255, 255)
- Title.TextSize = 16
- Title.Font = Enum.Font.GothamBold
- Title.Parent = TopBar
- Container.Name = "Container"
- Container.Size = UDim2.new(1, -20, 1, -40)
- Container.Position = UDim2.new(0, 10, 0, 35)
- Container.BackgroundTransparency = 1
- Container.Parent = MainFrame
- ScriptBox.Name = "ScriptBox"
- ScriptBox.Size = UDim2.new(1, 0, 0.8, -10)
- ScriptBox.BackgroundColor3 = Color3.fromRGB(38, 30, 64)
- ScriptBox.TextColor3 = Color3.fromRGB(255, 255, 255)
- ScriptBox.PlaceholderText = "-- Enter your script here"
- ScriptBox.PlaceholderColor3 = Color3.fromRGB(147, 112, 219)
- ScriptBox.TextXAlignment = Enum.TextXAlignment.Left
- ScriptBox.TextYAlignment = Enum.TextYAlignment.Top
- ScriptBox.Font = Enum.Font.Code
- ScriptBox.TextSize = 14
- ScriptBox.MultiLine = true
- ScriptBox.ClearTextOnFocus = false
- ScriptBox.Parent = Container
- ExecuteButton.Name = "ExecuteButton"
- ExecuteButton.Size = UDim2.new(0.48, 0, 0.15, 0)
- ExecuteButton.Position = UDim2.new(0, 0, 0.85, 0)
- ExecuteButton.BackgroundColor3 = Color3.fromRGB(147, 112, 219)
- ExecuteButton.Text = "▶️ Execute"
- ExecuteButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- ExecuteButton.Font = Enum.Font.GothamBold
- ExecuteButton.TextSize = 14
- ExecuteButton.Parent = Container
- ClearButton.Name = "ClearButton"
- ClearButton.Size = UDim2.new(0.48, 0, 0.15, 0)
- ClearButton.Position = UDim2.new(0.52, 0, 0.85, 0)
- ClearButton.BackgroundColor3 = Color3.fromRGB(147, 112, 219)
- ClearButton.Text = "🗑️ Clear"
- ClearButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- ClearButton.Font = Enum.Font.GothamBold
- ClearButton.TextSize = 14
- ClearButton.Parent = Container
- -- Add functionality
- ExecuteButton.MouseButton1Click:Connect(function()
- loadstring(ScriptBox.Text)()
- end)
- ClearButton.MouseButton1Click:Connect(function()
- ScriptBox.Text = ""
- end)
- -- Make UI draggable
- local dragging
- local dragInput
- local dragStart
- local startPos
- TopBar.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragging = true
- dragStart = input.Position
- startPos = MainFrame.Position
- end
- end)
- TopBar.InputEnded:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragging = false
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement then
- dragInput = input
- end
- end)
- game:GetService("RunService").RenderStepped:Connect(function()
- if dragging and dragInput then
- local delta = dragInput.Position - dragStart
- MainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- end)
- -- Round corners
- local function addCorners(instance)
- local corner = Instance.new("UICorner")
- corner.CornerRadius = UDim.new(0, 6)
- corner.Parent = instance
- end
- addCorners(MainFrame)
- addCorners(ScriptBox)
- addCorners(ExecuteButton)
- addCorners(ClearButton)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement