Run it
Copy the script and paste it into your executor.
LogService = :()
UserInputService = :()
RunService = :()
CoreGui = :()
DraggingSystem = {}
DraggingSystem.(pos1, pos2)
.((pos2.X - pos1.X)^ + (pos2.Y - pos1.Y)^)
DraggingSystem.(Frame, Position)
AbsPos, AbsSize = Frame.AbsolutePosition, Frame.AbsoluteSize
Position.X >= AbsPos.X Position.X <= AbsPos.X + AbsSize.X Position.Y >= AbsPos.Y Position.Y <= AbsPos.Y + AbsSize.Y
DraggingSystem.(MainFrame, DragFrame, CallbackTable)
MainFrame DragFrame
dragging =
dragStart =
startPos =
dragDistance =
DRAG_THRESHOLD =
originalZIndex = MainFrame.ZIndex
isDraggingStarted =
currentTouch =
()
.CurrentCamera.ViewportSize
(input)
dragging dragStart
delta = input.Position - dragStart
dragDistance = .(delta.X^ + delta.Y^)
screenSize = ()
newOffsetX = startPos.X.Offset + delta.X
newOffsetY = startPos.Y.Offset + delta.Y
newScaleX = startPos.X.Scale
newScaleY = startPos.Y.Scale
startPos.X.Scale >
scaleOffsetX = (screenSize.X * startPos.X.Scale) + startPos.X.Offset
newAbsoluteX = scaleOffsetX + delta.X
newScaleX = newAbsoluteX / screenSize.X
newOffsetX =
startPos.Y.Scale >
scaleOffsetY = (screenSize.Y * startPos.Y.Scale) + startPos.Y.Offset
newAbsoluteY = scaleOffsetY + delta.Y
newScaleY = newAbsoluteY / screenSize.Y
newOffsetY =
MainFrame.Position = .(newScaleX, newOffsetX, newScaleY, newOffsetY)
CallbackTable CallbackTable.OnDragUpdate
CallbackTable.(MainFrame.Position, dragDistance)
()
dragging =
dragStart =
startPos =
dragDistance =
isDraggingStarted =
currentTouch =
mouseButton1Connection =
touchEndedConnection =
movementConnection =
()
dragging
wasDragged = dragDistance > DRAG_THRESHOLD
wasDragged CallbackTable CallbackTable.OnClick
CallbackTable.()
wasDragged isDraggingStarted
MainFrame.ZIndex = originalZIndex
CallbackTable CallbackTable.OnDragEnd
CallbackTable.(MainFrame.Position, wasDragged)
()
mouseButton1Connection
mouseButton1Connection:()
mouseButton1Connection =
touchEndedConnection
touchEndedConnection:()
touchEndedConnection =
movementConnection
movementConnection:()
movementConnection =
(endInput)
dragging
endInput.UserInputType == .UserInputType.MouseButton1
()
endInput.UserInputType == .UserInputType.Touch endInput == currentTouch
()
(input)
dragging (input.UserInputType == .UserInputType.MouseMovement input == currentTouch)
isDraggingStarted dragDistance > DRAG_THRESHOLD
isDraggingStarted =
CallbackTable CallbackTable.OnDragStart
CallbackTable.()
(input)
(input)
(input.UserInputType == .UserInputType.MouseButton1 input.UserInputType == .UserInputType.Touch) input.UserInputState == .UserInputState.Begin dragging
DraggingSystem.(DragFrame, input.Position)
dragging =
dragStart = input.Position
startPos = MainFrame.Position
dragDistance =
isDraggingStarted =
input.UserInputType == .UserInputType.Touch
currentTouch = input
currentTouch =
mouseButton1Connection = UserInputService.InputEnded:((endInput)
endInput.UserInputType == .UserInputType.MouseButton1
(endInput)
)
touchEndedConnection = UserInputService.InputEnded:((endInput)
endInput.UserInputType == .UserInputType.Touch
(endInput)
)
movementConnection = UserInputService.InputChanged:((moveInput)
moveInput.UserInputType == .UserInputType.MouseMovement moveInput.UserInputType == .UserInputType.Touch
(moveInput)
)
inputBeganConnection = DragFrame.InputBegan:(onInputBegan)
cleanupFunction = ()
inputBeganConnection:()
mouseButton1Connection mouseButton1Connection:()
touchEndedConnection touchEndedConnection:()
movementConnection movementConnection:()
cleanupFunction
ResizeSystem = {}
ResizeSystem.(MainFrame, ResizeHandle, CallbackTable)
MainFrame ResizeHandle
resizing =
resizeStart =
startSize =
startPosition =
resizeMode =
activeTouch =
(input)
resizing resizeStart
delta = input.Position - resizeStart
newWidth = startSize.X.Offset
newHeight = startSize.Y.Offset
newX = startPosition.X.Offset
newY = startPosition.Y.Offset
resizeMode ==
newWidth = .(, startSize.X.Offset + delta.X)
MainFrame.Size = .(, newWidth, , newHeight)
resizeMode ==
newWidth = .(, startSize.X.Offset - delta.X)
newX = startPosition.X.Offset + (startSize.X.Offset - newWidth)
MainFrame.Size = .(, newWidth, , newHeight)
MainFrame.Position = .(startPosition.X.Scale, newX, startPosition.Y.Scale, newY)
resizeMode ==
newHeight = .(, startSize.Y.Offset + delta.Y)
MainFrame.Size = .(, newWidth, , newHeight)
resizeMode ==
newHeight = .(, startSize.Y.Offset - delta.Y)
newY = startPosition.Y.Offset + (startSize.Y.Offset - newHeight)
MainFrame.Size = .(, newWidth, , newHeight)
MainFrame.Position = .(startPosition.X.Scale, newX, startPosition.Y.Scale, newY)
resizeMode ==
newWidth = .(, startSize.X.Offset + delta.X)
newHeight = .(, startSize.Y.Offset + delta.Y)
MainFrame.Size = .(, newWidth, , newHeight)
resizeMode ==
newWidth = .(, startSize.X.Offset - delta.X)
newHeight = .(, startSize.Y.Offset + delta.Y)
newX = startPosition.X.Offset + (startSize.X.Offset - newWidth)
MainFrame.Size = .(, newWidth, , newHeight)
MainFrame.Position = .(startPosition.X.Scale, newX, startPosition.Y.Scale, newY)
resizeMode ==
newWidth = .(, startSize.X.Offset + delta.X)
newHeight = .(, startSize.Y.Offset - delta.Y)
newY = startPosition.Y.Offset + (startSize.Y.Offset - newHeight)
MainFrame.Size = .(, newWidth, , newHeight)
MainFrame.Position = .(startPosition.X.Scale, newX, startPosition.Y.Scale, newY)
resizeMode ==
newWidth = .(, startSize.X.Offset - delta.X)
newHeight = .(, startSize.Y.Offset - delta.Y)
newX = startPosition.X.Offset + (startSize.X.Offset - newWidth)
newY = startPosition.Y.Offset + (startSize.Y.Offset - newHeight)
MainFrame.Size = .(, newWidth, , newHeight)
MainFrame.Position = .(startPosition.X.Scale, newX, startPosition.Y.Scale, newY)
CallbackTable CallbackTable.OnResizeUpdate
CallbackTable.(MainFrame.Size, MainFrame.Position)
()
()
resizing =
resizeStart =
startSize =
startPosition =
activeTouch =
mouseConnection =
touchConnection =
moveConnection =
()
resizing
CallbackTable CallbackTable.OnResizeEnd
CallbackTable.(MainFrame.Size)
()
mouseConnection mouseConnection:()
touchConnection touchConnection:()
moveConnection moveConnection:()
(input)
resizing
input.UserInputType == .UserInputType.MouseMovement
(input)
input.UserInputType == .UserInputType.Touch input == activeTouch
(input)
(input)
(input.UserInputType == .UserInputType.MouseButton1 input.UserInputType == .UserInputType.Touch) input.UserInputState == .UserInputState.Begin resizing
DraggingSystem.(ResizeHandle, input.Position)
resizing =
resizeStart = input.Position
startSize = MainFrame.Size
startPosition = MainFrame.Position
input.UserInputType == .UserInputType.Touch
activeTouch = input
activeTouch =
ResizeHandle.Name ==
resizeMode =
ResizeHandle.Name ==
resizeMode =
ResizeHandle.Name ==
resizeMode =
ResizeHandle.Name ==
resizeMode =
ResizeHandle.Name ==
resizeMode =
ResizeHandle.Name ==
resizeMode =
ResizeHandle.Name ==
resizeMode =
ResizeHandle.Name ==
resizeMode =
CallbackTable CallbackTable.OnResizeStart
CallbackTable.()
mouseConnection = UserInputService.InputEnded:((endInput)
endInput.UserInputType == .UserInputType.MouseButton1
()
)
touchConnection = UserInputService.InputEnded:((endInput)
endInput.UserInputType == .UserInputType.Touch endInput == activeTouch
()
)
moveConnection = UserInputService.InputChanged:((moveInput)
moveInput.UserInputType == .UserInputType.MouseMovement
(moveInput)
moveInput.UserInputType == .UserInputType.Touch moveInput == activeTouch
(moveInput)
)
inputBeganConnection = ResizeHandle.InputBegan:(onResizeBegan)
cleanupFunction = ()
inputBeganConnection:()
mouseConnection mouseConnection:()
touchConnection touchConnection:()
moveConnection moveConnection:()
cleanupFunction
()
()
.()
containerHeight = logContainer.AbsoluteSize.Y
contentHeight = logList.AbsoluteContentSize.Y
contentHeight > containerHeight
logContainer.ScrollBarThickness =
logContainer.ScrollingEnabled =
logContainer.ScrollBarThickness =
logContainer.ScrollingEnabled =
autoScroll =
textSize =
screenGui = .()
screenGui.Name =
screenGui.ResetOnSpawn =
screenGui.Enabled =
screenGui.Parent = CoreGui
mainFrame = .()
mainFrame.Name =
mainFrame.Size = .(, , , )
mainFrame.Position = .(, -, , -)
mainFrame.BackgroundColor3 = .(, , )
mainFrame.BackgroundTransparency =
mainFrame.BorderSizePixel =
mainFrame.Active =
mainFrame.Parent = screenGui
uiScale = .()
uiScale.Scale = ()
uiScale.Parent = mainFrame
uiCorner = .()
uiCorner.CornerRadius = .(, )
uiCorner.Parent = mainFrame
uiStroke = .()
uiStroke.Color = .(, , )
uiStroke.Thickness =
uiStroke.Parent = mainFrame
titleBar = .()
titleBar.Name =
titleBar.Size = .(, , , )
titleBar.BackgroundColor3 = .(, , )
titleBar.BackgroundTransparency =
titleBar.BorderSizePixel =
titleBar.Parent = mainFrame
tbCorner = .()
tbCorner.CornerRadius = .(, )
tbCorner.Parent = titleBar
title = .()
title.Size = .(, -, , )
title.Position = .(, , , )
title.BackgroundTransparency =
title.Text =
title.TextColor3 = .(, , )
title.TextXAlignment = .TextXAlignment.Left
title.Font = .Font.GothamBold
title.TextSize =
title.Parent = titleBar
controls = .()
controls.Size = .(, , , )
controls.Position = .(, -, , )
controls.BackgroundTransparency =
controls.Parent = titleBar
controlList = .()
controlList.SortOrder = .SortOrder.LayoutOrder
controlList.FillDirection = .FillDirection.Horizontal
controlList.HorizontalAlignment = .HorizontalAlignment.Right
controlList.VerticalAlignment = .VerticalAlignment.Center
controlList.Padding = .(, )
controlList.Parent = controls
(name, text, color)
btn = .()
btn.Name = name
btn.Size = .(, , , )
btn.BackgroundColor3 = color
btn.BackgroundTransparency =
btn.Text = text
btn.TextColor3 = .(, , )
btn.Font = .Font.GothamBold
btn.TextSize =
btn.BorderSizePixel =
btn.Parent = controls
.(, btn).CornerRadius = .(, )
btn
autoScrollBtn = (, , .(, , ))
copyAllBtn = (, , .(, , ))
clearBtn = (, , .(, , ))
textSizeBox = .()
textSizeBox.Size = .(, , , )
textSizeBox.BackgroundColor3 = .(, , )
textSizeBox.BackgroundTransparency =
textSizeBox.Text =
textSizeBox.TextColor3 = .(, , )
textSizeBox.Font = .Font.GothamBold
textSizeBox.TextSize =
textSizeBox.PlaceholderText =
textSizeBox.Parent = controls
.(, textSizeBox).CornerRadius = .(, )
closeBtn = (, , .(, , ))
closeBtn.Size = .(, , , )
()
newSize = (textSizeBox.Text)
newSize
textSize = newSize
_, logFrame (logContainer:())
logFrame:()
textLabel = logFrame:()
textLabel
textLabel.TextSize = textSize
textSizeBox.FocusLost:(()
()
)
logContainer = .()
logContainer.Name =
logContainer.Size = .(, -, , -)
logContainer.Position = .(, , , )
logContainer.BackgroundColor3 = .(, , )
logContainer.BackgroundTransparency =
logContainer.BorderSizePixel =
logContainer.ScrollBarThickness =
logContainer.ScrollingEnabled =
logContainer.AutomaticCanvasSize = .AutomaticSize.Y
logContainer.CanvasSize = .(, , , )
logContainer.Parent = mainFrame
logList = .()
logList.SortOrder = .SortOrder.LayoutOrder
logList.Padding = .(, )
logList.Parent = logContainer
.(, logContainer).PaddingLeft = .(, )
logList:():(updateScrollability)
logContainer:():(updateScrollability)
(name, position, size)
handle = .()
handle.Name = name
handle.Size = size
handle.Position = position
handle.BackgroundTransparency =
handle.Text =
handle.AutoButtonColor =
handle.Parent = mainFrame
handle
resizeRight = (, .(, -, , ), .(, , , ))
resizeLeft = (, .(, -, , ), .(, , , ))
resizeBottom = (, .(, , , -), .(, , , ))
resizeTop = (, .(, , , -), .(, , , ))
resizeBottomRight = (, .(, -, , -), .(, , , ))
resizeBottomLeft = (, .(, -, , -), .(, , , ))
resizeTopRight = (, .(, -, , -), .(, , , ))
resizeTopLeft = (, .(, -, , -), .(, , , ))
DraggingSystem.(mainFrame, titleBar, {
OnClick = ()
})
ResizeSystem.(mainFrame, resizeRight, {})
ResizeSystem.(mainFrame, resizeLeft, {})
ResizeSystem.(mainFrame, resizeBottom, {})
ResizeSystem.(mainFrame, resizeTop, {})
ResizeSystem.(mainFrame, resizeBottomRight, {})
ResizeSystem.(mainFrame, resizeBottomLeft, {})
ResizeSystem.(mainFrame, resizeTopRight, {})
ResizeSystem.(mainFrame, resizeTopLeft, {})
(message, color, messageType)
logFrame = .()
logFrame.Size = .(, -, , )
logFrame.BackgroundTransparency =
logFrame.AutomaticSize = .AutomaticSize.Y
logFrame.Parent = logContainer
iconLabel = .()
iconLabel.Size = .(, , , )
iconLabel.Position = .(, , , )
iconLabel.BackgroundTransparency =
iconLabel.Parent = logFrame
messageType == .MessageType.MessageError
iconLabel.Image =
messageType == .MessageType.MessageWarning
iconLabel.Image =
iconLabel.Image =
textLabel = .()
textLabel.Size = .(, -, , )
textLabel.Position = .(, , , )
textLabel.BackgroundTransparency =
textLabel.Text = message
textLabel.TextColor3 = color
textLabel.Font = .Font.Code
textLabel.TextSize = textSize
textLabel.TextWrapped =
textLabel.TextXAlignment = .TextXAlignment.Left
textLabel.AutomaticSize = .AutomaticSize.Y
textLabel.Parent = logFrame
copyBtn = .()
copyBtn.Size = .(, , , )
copyBtn.Position = .(, -, , )
copyBtn.BackgroundColor3 = .(, , )
copyBtn.BackgroundTransparency =
copyBtn.Text =
copyBtn.TextColor3 = .(, , )
copyBtn.Font = .Font.Gotham
copyBtn.TextSize =
copyBtn.Parent = logFrame
.(, copyBtn).CornerRadius = .(, )
copyBtn.MouseButton1Click:(()
setclipboard
(message)
copyBtn.Text =
.()
copyBtn.Text =
)
autoScroll
.()
logContainer.CanvasPosition = .(, logContainer.AbsoluteCanvasSize.Y)
()
autoScrollBtn.MouseButton1Click:(()
autoScroll = autoScroll
autoScrollBtn.Text = .. (autoScroll )
autoScrollBtn.BackgroundColor3 = autoScroll .(, , ) .(, , )
)
clearBtn.MouseButton1Click:(()
_, child (logContainer:())
child:() child:()
()
)
copyAllBtn.MouseButton1Click:(()
allLogs = {}
_, child (logContainer:())
child:() child:()
.(allLogs, child.TextLabel.Text)
setclipboard (.(allLogs, ))
)
closeBtn.MouseButton1Click:(() screenGui.Enabled = )
UserInputService.InputBegan:((input, gpe)
gpe input.KeyCode == .KeyCode.F2
screenGui.Enabled = screenGui.Enabled
)
LogService.MessageOut:((message, messageType)
color = .(, , )
messageType == .MessageType.MessageError
color = .(, , )
messageType == .MessageType.MessageWarning
color = .(, , )
(.(, .(), message), color, messageType)
)
()
Universal