local gui = Instance.new("ScreenGui") gui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 400, 0, 250) frame.Position = UDim2.new(0.5, -200, 0.5, -125) frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0) frame.BorderSizePixel = 0 frame.Parent = gui local title = Instance.new("TextLabel") title.Size = UDim2.new(1, 0, 0, 50) title.BackgroundTransparency = 1 title.Text = "GHOST EXECUTOR SCRIPT" title.TextColor3 = Color3.fromRGB(255, 255, 255) title.TextScaled = true title.RichText = true title.Parent = frame local box = Instance.new("TextBox") box.Size = UDim2.new(1, -20, 0, 120) box.Position = UDim2.new(0, 10, 0, 60) box.BackgroundColor3 = Color3.fromRGB(20, 20, 20) box.TextColor3 = Color3.fromRGB(255, 255, 255) box.Text = "" box.TextWrapped = true box.ClearTextOnFocus = false box.Parent = frame local exec = Instance.new("TextButton") exec.Size = UDim2.new(0.45, 0, 0, 40) exec.Position = UDim2.new(0.05, 0, 0, 190) exec.BackgroundColor3 = Color3.fromRGB(40, 40, 40) exec.TextColor3 = Color3.fromRGB(255, 255, 255) exec.Text = "Execute" exec.Parent = frame local clear = Instance.new("TextButton") clear.Size = UDim2.new(0.45, 0, 0, 40) clear.Position = UDim2.new(0.50, 0, 0, 190) clear.BackgroundColor3 = Color3.fromRGB(40, 40, 40) clear.TextColor3 = Color3.fromRGB(255, 255, 255) clear.Text = "Clear" clear.Parent = frame exec.MouseButton1Click:Connect(function() print("This is a test.") end) clear.MouseButton1Click:Connect(function() box.Text = "" end) local UIS = game:GetService("UserInputService") local dragging local dragInput local dragStart local startPos local function update(input) local delta = input.Position - dragStart frame.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y ) end frame.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = true dragStart = input.Position startPos = frame.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) frame.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseMovement then dragInput = input end end) UIS.InputChanged:Connect(function(input) if input == dragInput and dragging then update(input) end end)