MaxproGlitcher

Better cosole not mine

Apr 28th, 2026
45
0
Never
6
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.85 KB | None | 0 0
  1.  
  2. LogService = game:GetService("LogService")
  3. UserInputService = game:GetService("UserInputService")
  4. RunService = game:GetService("RunService")
  5. CoreGui = game:GetService("CoreGui")
  6.  
  7. DraggingSystem = {}
  8.  
  9. function DraggingSystem.GetDistance(pos1, pos2)
  10. return math.sqrt((pos2.X - pos1.X)^2 + (pos2.Y - pos1.Y)^2)
  11. end
  12.  
  13. function DraggingSystem.IsMouseOverFrame(Frame, Position)
  14. AbsPos, AbsSize = Frame.AbsolutePosition, Frame.AbsoluteSize
  15. return Position.X >= AbsPos.X and Position.X <= AbsPos.X + AbsSize.X and Position.Y >= AbsPos.Y and Position.Y <= AbsPos.Y + AbsSize.Y
  16. end
  17.  
  18. function DraggingSystem.MakeDraggable(MainFrame, DragFrame, CallbackTable)
  19. if not MainFrame or not DragFrame then return end
  20.  
  21. dragging = false
  22. dragStart = nil
  23. startPos = nil
  24. dragDistance = 0
  25. DRAG_THRESHOLD = 5
  26. originalZIndex = MainFrame.ZIndex
  27. isDraggingStarted = false
  28. currentTouch = nil
  29.  
  30. function getScreenSize()
  31. return workspace.CurrentCamera.ViewportSize
  32. end
  33.  
  34. function updatePosition(input)
  35. if not dragging or not dragStart then return end
  36. delta = input.Position - dragStart
  37. dragDistance = math.sqrt(delta.X^2 + delta.Y^2)
  38.  
  39. screenSize = getScreenSize()
  40. newOffsetX = startPos.X.Offset + delta.X
  41. newOffsetY = startPos.Y.Offset + delta.Y
  42.  
  43. newScaleX = startPos.X.Scale
  44. newScaleY = startPos.Y.Scale
  45.  
  46. if startPos.X.Scale > 0 then
  47. scaleOffsetX = (screenSize.X * startPos.X.Scale) + startPos.X.Offset
  48. newAbsoluteX = scaleOffsetX + delta.X
  49. newScaleX = newAbsoluteX / screenSize.X
  50. newOffsetX = 0
  51. end
  52.  
  53. if startPos.Y.Scale > 0 then
  54. scaleOffsetY = (screenSize.Y * startPos.Y.Scale) + startPos.Y.Offset
  55. newAbsoluteY = scaleOffsetY + delta.Y
  56. newScaleY = newAbsoluteY / screenSize.Y
  57. newOffsetY = 0
  58. end
  59.  
  60. MainFrame.Position = UDim2.new(newScaleX, newOffsetX, newScaleY, newOffsetY)
  61.  
  62. if CallbackTable and CallbackTable.OnDragUpdate then
  63. CallbackTable.OnDragUpdate(MainFrame.Position, dragDistance)
  64. end
  65. end
  66.  
  67. function resetDragState()
  68. dragging = false
  69. dragStart = nil
  70. startPos = nil
  71. dragDistance = 0
  72. isDraggingStarted = false
  73. currentTouch = nil
  74. end
  75.  
  76. mouseButton1Connection = nil
  77. touchEndedConnection = nil
  78. movementConnection = nil
  79.  
  80. function onInputEnded()
  81. if dragging then
  82. wasDragged = dragDistance > DRAG_THRESHOLD
  83. if not wasDragged and CallbackTable and CallbackTable.OnClick then
  84. CallbackTable.OnClick()
  85. end
  86. if wasDragged and isDraggingStarted then
  87. MainFrame.ZIndex = originalZIndex
  88. if CallbackTable and CallbackTable.OnDragEnd then
  89. CallbackTable.OnDragEnd(MainFrame.Position, wasDragged)
  90. end
  91. end
  92. resetDragState()
  93. if mouseButton1Connection then
  94. mouseButton1Connection:Disconnect()
  95. mouseButton1Connection = nil
  96. end
  97. if touchEndedConnection then
  98. touchEndedConnection:Disconnect()
  99. touchEndedConnection = nil
  100. end
  101. if movementConnection then
  102. movementConnection:Disconnect()
  103. movementConnection = nil
  104. end
  105. end
  106. end
  107.  
  108. function onInputEndedHandler(endInput)
  109. if dragging then
  110. if endInput.UserInputType == Enum.UserInputType.MouseButton1 then
  111. onInputEnded()
  112. elseif endInput.UserInputType == Enum.UserInputType.Touch and endInput == currentTouch then
  113. onInputEnded()
  114. end
  115. end
  116. end
  117.  
  118. function onMovement(input)
  119. if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input == currentTouch) then
  120. if not isDraggingStarted and dragDistance > DRAG_THRESHOLD then
  121. isDraggingStarted = true
  122. if CallbackTable and CallbackTable.OnDragStart then
  123. CallbackTable.OnDragStart()
  124. end
  125. end
  126. updatePosition(input)
  127. end
  128. end
  129.  
  130. function onInputBegan(input)
  131. if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) and input.UserInputState == Enum.UserInputState.Begin and not dragging then
  132. if DraggingSystem.IsMouseOverFrame(DragFrame, input.Position) then
  133. dragging = true
  134. dragStart = input.Position
  135. startPos = MainFrame.Position
  136. dragDistance = 0
  137. isDraggingStarted = false
  138. if input.UserInputType == Enum.UserInputType.Touch then
  139. currentTouch = input
  140. else
  141. currentTouch = nil
  142. end
  143.  
  144. mouseButton1Connection = UserInputService.InputEnded:Connect(function(endInput)
  145. if endInput.UserInputType == Enum.UserInputType.MouseButton1 then
  146. onInputEndedHandler(endInput)
  147. end
  148. end)
  149. touchEndedConnection = UserInputService.InputEnded:Connect(function(endInput)
  150. if endInput.UserInputType == Enum.UserInputType.Touch then
  151. onInputEndedHandler(endInput)
  152. end
  153. end)
  154. movementConnection = UserInputService.InputChanged:Connect(function(moveInput)
  155. if moveInput.UserInputType == Enum.UserInputType.MouseMovement or moveInput.UserInputType == Enum.UserInputType.Touch then
  156. onMovement(moveInput)
  157. end
  158. end)
  159. end
  160. end
  161. end
  162.  
  163. inputBeganConnection = DragFrame.InputBegan:Connect(onInputBegan)
  164.  
  165. cleanupFunction = function()
  166. inputBeganConnection:Disconnect()
  167. if mouseButton1Connection then mouseButton1Connection:Disconnect() end
  168. if touchEndedConnection then touchEndedConnection:Disconnect() end
  169. if movementConnection then movementConnection:Disconnect() end
  170. end
  171.  
  172. return cleanupFunction
  173. end
  174.  
  175. ResizeSystem = {}
  176.  
  177. function ResizeSystem.MakeResizable(MainFrame, ResizeHandle, CallbackTable)
  178. if not MainFrame or not ResizeHandle then return end
  179.  
  180. resizing = false
  181. resizeStart = nil
  182. startSize = nil
  183. startPosition = nil
  184. resizeMode = "right"
  185. activeTouch = nil
  186.  
  187. function updateResize(input)
  188. if not resizing or not resizeStart then return end
  189.  
  190. delta = input.Position - resizeStart
  191. newWidth = startSize.X.Offset
  192. newHeight = startSize.Y.Offset
  193. newX = startPosition.X.Offset
  194. newY = startPosition.Y.Offset
  195.  
  196. if resizeMode == "right" then
  197. newWidth = math.max(396, startSize.X.Offset + delta.X)
  198. MainFrame.Size = UDim2.new(0, newWidth, 0, newHeight)
  199.  
  200. elseif resizeMode == "left" then
  201. newWidth = math.max(396, startSize.X.Offset - delta.X)
  202. newX = startPosition.X.Offset + (startSize.X.Offset - newWidth)
  203. MainFrame.Size = UDim2.new(0, newWidth, 0, newHeight)
  204. MainFrame.Position = UDim2.new(startPosition.X.Scale, newX, startPosition.Y.Scale, newY)
  205.  
  206. elseif resizeMode == "bottom" then
  207. newHeight = math.max(200, startSize.Y.Offset + delta.Y)
  208. MainFrame.Size = UDim2.new(0, newWidth, 0, newHeight)
  209.  
  210. elseif resizeMode == "top" then
  211. newHeight = math.max(200, startSize.Y.Offset - delta.Y)
  212. newY = startPosition.Y.Offset + (startSize.Y.Offset - newHeight)
  213. MainFrame.Size = UDim2.new(0, newWidth, 0, newHeight)
  214. MainFrame.Position = UDim2.new(startPosition.X.Scale, newX, startPosition.Y.Scale, newY)
  215.  
  216. elseif resizeMode == "bottomRight" then
  217. newWidth = math.max(396, startSize.X.Offset + delta.X)
  218. newHeight = math.max(200, startSize.Y.Offset + delta.Y)
  219. MainFrame.Size = UDim2.new(0, newWidth, 0, newHeight)
  220.  
  221. elseif resizeMode == "bottomLeft" then
  222. newWidth = math.max(396, startSize.X.Offset - delta.X)
  223. newHeight = math.max(200, startSize.Y.Offset + delta.Y)
  224. newX = startPosition.X.Offset + (startSize.X.Offset - newWidth)
  225. MainFrame.Size = UDim2.new(0, newWidth, 0, newHeight)
  226. MainFrame.Position = UDim2.new(startPosition.X.Scale, newX, startPosition.Y.Scale, newY)
  227.  
  228. elseif resizeMode == "topRight" then
  229. newWidth = math.max(396, startSize.X.Offset + delta.X)
  230. newHeight = math.max(200, startSize.Y.Offset - delta.Y)
  231. newY = startPosition.Y.Offset + (startSize.Y.Offset - newHeight)
  232. MainFrame.Size = UDim2.new(0, newWidth, 0, newHeight)
  233. MainFrame.Position = UDim2.new(startPosition.X.Scale, newX, startPosition.Y.Scale, newY)
  234.  
  235. elseif resizeMode == "topLeft" then
  236. newWidth = math.max(396, startSize.X.Offset - delta.X)
  237. newHeight = math.max(200, startSize.Y.Offset - delta.Y)
  238. newX = startPosition.X.Offset + (startSize.X.Offset - newWidth)
  239. newY = startPosition.Y.Offset + (startSize.Y.Offset - newHeight)
  240. MainFrame.Size = UDim2.new(0, newWidth, 0, newHeight)
  241. MainFrame.Position = UDim2.new(startPosition.X.Scale, newX, startPosition.Y.Scale, newY)
  242. end
  243.  
  244. if CallbackTable and CallbackTable.OnResizeUpdate then
  245. CallbackTable.OnResizeUpdate(MainFrame.Size, MainFrame.Position)
  246. end
  247.  
  248. updateScrollability()
  249. end
  250.  
  251. function resetResizeState()
  252. resizing = false
  253. resizeStart = nil
  254. startSize = nil
  255. startPosition = nil
  256. activeTouch = nil
  257. end
  258.  
  259. mouseConnection = nil
  260. touchConnection = nil
  261. moveConnection = nil
  262.  
  263. function onResizeEnd()
  264. if resizing then
  265. if CallbackTable and CallbackTable.OnResizeEnd then
  266. CallbackTable.OnResizeEnd(MainFrame.Size)
  267. end
  268. resetResizeState()
  269. if mouseConnection then mouseConnection:Disconnect() end
  270. if touchConnection then touchConnection:Disconnect() end
  271. if moveConnection then moveConnection:Disconnect() end
  272. end
  273. end
  274.  
  275. function onResizeMovement(input)
  276. if resizing then
  277. if input.UserInputType == Enum.UserInputType.MouseMovement then
  278. updateResize(input)
  279. elseif input.UserInputType == Enum.UserInputType.Touch and input == activeTouch then
  280. updateResize(input)
  281. end
  282. end
  283. end
  284.  
  285. function onResizeBegan(input)
  286. if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) and input.UserInputState == Enum.UserInputState.Begin and not resizing then
  287. if DraggingSystem.IsMouseOverFrame(ResizeHandle, input.Position) then
  288. resizing = true
  289. resizeStart = input.Position
  290. startSize = MainFrame.Size
  291. startPosition = MainFrame.Position
  292.  
  293. if input.UserInputType == Enum.UserInputType.Touch then
  294. activeTouch = input
  295. else
  296. activeTouch = nil
  297. end
  298.  
  299. if ResizeHandle.Name == "ResizeRight" then
  300. resizeMode = "right"
  301. elseif ResizeHandle.Name == "ResizeLeft" then
  302. resizeMode = "left"
  303. elseif ResizeHandle.Name == "ResizeBottom" then
  304. resizeMode = "bottom"
  305. elseif ResizeHandle.Name == "ResizeTop" then
  306. resizeMode = "top"
  307. elseif ResizeHandle.Name == "ResizeBottomRight" then
  308. resizeMode = "bottomRight"
  309. elseif ResizeHandle.Name == "ResizeBottomLeft" then
  310. resizeMode = "bottomLeft"
  311. elseif ResizeHandle.Name == "ResizeTopRight" then
  312. resizeMode = "topRight"
  313. elseif ResizeHandle.Name == "ResizeTopLeft" then
  314. resizeMode = "topLeft"
  315. end
  316.  
  317. if CallbackTable and CallbackTable.OnResizeStart then
  318. CallbackTable.OnResizeStart()
  319. end
  320.  
  321. mouseConnection = UserInputService.InputEnded:Connect(function(endInput)
  322. if endInput.UserInputType == Enum.UserInputType.MouseButton1 then
  323. onResizeEnd()
  324. end
  325. end)
  326. touchConnection = UserInputService.InputEnded:Connect(function(endInput)
  327. if endInput.UserInputType == Enum.UserInputType.Touch and endInput == activeTouch then
  328. onResizeEnd()
  329. end
  330. end)
  331. moveConnection = UserInputService.InputChanged:Connect(function(moveInput)
  332. if moveInput.UserInputType == Enum.UserInputType.MouseMovement then
  333. onResizeMovement(moveInput)
  334. elseif moveInput.UserInputType == Enum.UserInputType.Touch and moveInput == activeTouch then
  335. onResizeMovement(moveInput)
  336. end
  337. end)
  338. end
  339. end
  340. end
  341.  
  342. inputBeganConnection = ResizeHandle.InputBegan:Connect(onResizeBegan)
  343.  
  344. cleanupFunction = function()
  345. inputBeganConnection:Disconnect()
  346. if mouseConnection then mouseConnection:Disconnect() end
  347. if touchConnection then touchConnection:Disconnect() end
  348. if moveConnection then moveConnection:Disconnect() end
  349. end
  350.  
  351. return cleanupFunction
  352. end
  353.  
  354. function getDPIScale()
  355. return 0.9
  356. end
  357.  
  358. function updateScrollability()
  359. task.wait()
  360. local containerHeight = logContainer.AbsoluteSize.Y
  361. local contentHeight = logList.AbsoluteContentSize.Y
  362.  
  363. if contentHeight > containerHeight then
  364. logContainer.ScrollBarThickness = 6
  365. logContainer.ScrollingEnabled = true
  366. else
  367. logContainer.ScrollBarThickness = 0
  368. logContainer.ScrollingEnabled = false
  369. end
  370. end
  371.  
  372. autoScroll = true
  373. textSize = 12
  374.  
  375. screenGui = Instance.new("ScreenGui")
  376. screenGui.Name = "RBXConsole"
  377. screenGui.ResetOnSpawn = false
  378. screenGui.Enabled = false
  379. screenGui.Parent = CoreGui
  380.  
  381. mainFrame = Instance.new("Frame")
  382. mainFrame.Name = "Main"
  383. mainFrame.Size = UDim2.new(0, 550, 0, 400)
  384. mainFrame.Position = UDim2.new(0.5, -275, 0.5, -200)
  385. mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 35)
  386. mainFrame.BackgroundTransparency = 0.3
  387. mainFrame.BorderSizePixel = 0
  388. mainFrame.Active = true
  389. mainFrame.Parent = screenGui
  390.  
  391. uiScale = Instance.new("UIScale")
  392. uiScale.Scale = getDPIScale()
  393. uiScale.Parent = mainFrame
  394.  
  395. uiCorner = Instance.new("UICorner")
  396. uiCorner.CornerRadius = UDim.new(0, 8)
  397. uiCorner.Parent = mainFrame
  398.  
  399. uiStroke = Instance.new("UIStroke")
  400. uiStroke.Color = Color3.fromRGB(60, 60, 70)
  401. uiStroke.Thickness = 1
  402. uiStroke.Parent = mainFrame
  403.  
  404. titleBar = Instance.new("Frame")
  405. titleBar.Name = "TitleBar"
  406. titleBar.Size = UDim2.new(1, 0, 0, 40)
  407. titleBar.BackgroundColor3 = Color3.fromRGB(40, 40, 45)
  408. titleBar.BackgroundTransparency = 0.3
  409. titleBar.BorderSizePixel = 0
  410. titleBar.Parent = mainFrame
  411.  
  412. tbCorner = Instance.new("UICorner")
  413. tbCorner.CornerRadius = UDim.new(0, 8)
  414. tbCorner.Parent = titleBar
  415.  
  416. title = Instance.new("TextLabel")
  417. title.Size = UDim2.new(1, -60, 1, 0)
  418. title.Position = UDim2.new(0, 15, 0, 0)
  419. title.BackgroundTransparency = 1
  420. title.Text = "RBX Console"
  421. title.TextColor3 = Color3.fromRGB(240, 240, 240)
  422. title.TextXAlignment = Enum.TextXAlignment.Left
  423. title.Font = Enum.Font.GothamBold
  424. title.TextSize = 14
  425. title.Parent = titleBar
  426.  
  427. controls = Instance.new("Frame")
  428. controls.Size = UDim2.new(0, 340, 1, 0)
  429. controls.Position = UDim2.new(1, -345, 0, 0)
  430. controls.BackgroundTransparency = 1
  431. controls.Parent = titleBar
  432.  
  433. controlList = Instance.new("UIListLayout")
  434. controlList.SortOrder = Enum.SortOrder.LayoutOrder
  435. controlList.FillDirection = Enum.FillDirection.Horizontal
  436. controlList.HorizontalAlignment = Enum.HorizontalAlignment.Right
  437. controlList.VerticalAlignment = Enum.VerticalAlignment.Center
  438. controlList.Padding = UDim.new(0, 5)
  439. controlList.Parent = controls
  440.  
  441. function createButton(name, text, color)
  442. btn = Instance.new("TextButton")
  443. btn.Name = name
  444. btn.Size = UDim2.new(0, 65, 0, 25)
  445. btn.BackgroundColor3 = color
  446. btn.BackgroundTransparency = 0.2
  447. btn.Text = text
  448. btn.TextColor3 = Color3.fromRGB(255, 255, 255)
  449. btn.Font = Enum.Font.GothamBold
  450. btn.TextSize = 11
  451. btn.BorderSizePixel = 0
  452. btn.Parent = controls
  453. Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 4)
  454. return btn
  455. end
  456.  
  457. autoScrollBtn = createButton("AutoScroll", "Scroll: ON", Color3.fromRGB(60, 100, 180))
  458. copyAllBtn = createButton("CopyAll", "Copy All", Color3.fromRGB(60, 120, 60))
  459. clearBtn = createButton("Clear", "Clear", Color3.fromRGB(80, 80, 85))
  460.  
  461. textSizeBox = Instance.new("TextBox")
  462. textSizeBox.Size = UDim2.new(0, 50, 0, 25)
  463. textSizeBox.BackgroundColor3 = Color3.fromRGB(80, 80, 85)
  464. textSizeBox.BackgroundTransparency = 0.2
  465. textSizeBox.Text = "12"
  466. textSizeBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  467. textSizeBox.Font = Enum.Font.GothamBold
  468. textSizeBox.TextSize = 11
  469. textSizeBox.PlaceholderText = "Size"
  470. textSizeBox.Parent = controls
  471. Instance.new("UICorner", textSizeBox).CornerRadius = UDim.new(0, 4)
  472.  
  473. closeBtn = createButton("Close", "X", Color3.fromRGB(180, 60, 60))
  474. closeBtn.Size = UDim2.new(0, 30, 0, 25)
  475.  
  476. function updateTextSize()
  477. local newSize = tonumber(textSizeBox.Text)
  478. if newSize then
  479. textSize = newSize
  480. for _, logFrame in ipairs(logContainer:GetChildren()) do
  481. if logFrame:IsA("Frame") then
  482. textLabel = logFrame:FindFirstChild("TextLabel")
  483. if textLabel then
  484. textLabel.TextSize = textSize
  485. end
  486. end
  487. end
  488. end
  489. end
  490.  
  491. textSizeBox.FocusLost:Connect(function()
  492. updateTextSize()
  493. end)
  494.  
  495. logContainer = Instance.new("ScrollingFrame")
  496. logContainer.Name = "Logs"
  497. logContainer.Size = UDim2.new(1, -20, 1, -60)
  498. logContainer.Position = UDim2.new(0, 10, 0, 50)
  499. logContainer.BackgroundColor3 = Color3.fromRGB(20, 20, 23)
  500. logContainer.BackgroundTransparency = 0.5
  501. logContainer.BorderSizePixel = 0
  502. logContainer.ScrollBarThickness = 0
  503. logContainer.ScrollingEnabled = false
  504. logContainer.AutomaticCanvasSize = Enum.AutomaticSize.Y
  505. logContainer.CanvasSize = UDim2.new(0, 0, 0, 0)
  506. logContainer.Parent = mainFrame
  507.  
  508. logList = Instance.new("UIListLayout")
  509. logList.SortOrder = Enum.SortOrder.LayoutOrder
  510. logList.Padding = UDim.new(0, 4)
  511. logList.Parent = logContainer
  512.  
  513. Instance.new("UIPadding", logContainer).PaddingLeft = UDim.new(0, 5)
  514.  
  515. logList:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(updateScrollability)
  516. logContainer:GetPropertyChangedSignal("AbsoluteSize"):Connect(updateScrollability)
  517.  
  518. function createResizeHandle(name, position, size)
  519. handle = Instance.new("TextButton")
  520. handle.Name = name
  521. handle.Size = size
  522. handle.Position = position
  523. handle.BackgroundTransparency = 1
  524. handle.Text = ""
  525. handle.AutoButtonColor = false
  526. handle.Parent = mainFrame
  527. return handle
  528. end
  529.  
  530. resizeRight = createResizeHandle("ResizeRight", UDim2.new(1, -4, 0, 0), UDim2.new(0, 8, 1, 0))
  531. resizeLeft = createResizeHandle("ResizeLeft", UDim2.new(0, -4, 0, 0), UDim2.new(0, 8, 1, 0))
  532. resizeBottom = createResizeHandle("ResizeBottom", UDim2.new(0, 0, 1, -4), UDim2.new(1, 0, 0, 8))
  533. resizeTop = createResizeHandle("ResizeTop", UDim2.new(0, 0, 0, -4), UDim2.new(1, 0, 0, 8))
  534.  
  535. resizeBottomRight = createResizeHandle("ResizeBottomRight", UDim2.new(1, -8, 1, -8), UDim2.new(0, 16, 0, 16))
  536. resizeBottomLeft = createResizeHandle("ResizeBottomLeft", UDim2.new(0, -8, 1, -8), UDim2.new(0, 16, 0, 16))
  537. resizeTopRight = createResizeHandle("ResizeTopRight", UDim2.new(1, -8, 0, -8), UDim2.new(0, 16, 0, 16))
  538. resizeTopLeft = createResizeHandle("ResizeTopLeft", UDim2.new(0, -8, 0, -8), UDim2.new(0, 16, 0, 16))
  539.  
  540. DraggingSystem.MakeDraggable(mainFrame, titleBar, {
  541. OnClick = function() end
  542. })
  543.  
  544. ResizeSystem.MakeResizable(mainFrame, resizeRight, {})
  545. ResizeSystem.MakeResizable(mainFrame, resizeLeft, {})
  546. ResizeSystem.MakeResizable(mainFrame, resizeBottom, {})
  547. ResizeSystem.MakeResizable(mainFrame, resizeTop, {})
  548.  
  549. ResizeSystem.MakeResizable(mainFrame, resizeBottomRight, {})
  550. ResizeSystem.MakeResizable(mainFrame, resizeBottomLeft, {})
  551. ResizeSystem.MakeResizable(mainFrame, resizeTopRight, {})
  552. ResizeSystem.MakeResizable(mainFrame, resizeTopLeft, {})
  553.  
  554. function addLog(message, color, messageType)
  555. logFrame = Instance.new("Frame")
  556. logFrame.Size = UDim2.new(1, -10, 0, 0)
  557. logFrame.BackgroundTransparency = 1
  558. logFrame.AutomaticSize = Enum.AutomaticSize.Y
  559. logFrame.Parent = logContainer
  560.  
  561. iconLabel = Instance.new("ImageLabel")
  562. iconLabel.Size = UDim2.new(0, 20, 0, 20)
  563. iconLabel.Position = UDim2.new(0, 0, 0, 2)
  564. iconLabel.BackgroundTransparency = 1
  565. iconLabel.Parent = logFrame
  566.  
  567. if messageType == Enum.MessageType.MessageError then
  568. iconLabel.Image = "rbxasset://textures/DevConsole/Error.png"
  569. elseif messageType == Enum.MessageType.MessageWarning then
  570. iconLabel.Image = "rbxasset://textures/DevConsole/Warning.png"
  571. else
  572. iconLabel.Image = "rbxasset://textures/DevConsole/Info.png"
  573. end
  574.  
  575. textLabel = Instance.new("TextLabel")
  576. textLabel.Size = UDim2.new(1, -75, 0, 0)
  577. textLabel.Position = UDim2.new(0, 25, 0, 0)
  578. textLabel.BackgroundTransparency = 1
  579. textLabel.Text = message
  580. textLabel.TextColor3 = color
  581. textLabel.Font = Enum.Font.Code
  582. textLabel.TextSize = textSize
  583. textLabel.TextWrapped = true
  584. textLabel.TextXAlignment = Enum.TextXAlignment.Left
  585. textLabel.AutomaticSize = Enum.AutomaticSize.Y
  586. textLabel.Parent = logFrame
  587.  
  588. copyBtn = Instance.new("TextButton")
  589. copyBtn.Size = UDim2.new(0, 45, 0, 20)
  590. copyBtn.Position = UDim2.new(1, -45, 0, 0)
  591. copyBtn.BackgroundColor3 = Color3.fromRGB(50, 50, 60)
  592. copyBtn.BackgroundTransparency = 0.2
  593. copyBtn.Text = "Copy"
  594. copyBtn.TextColor3 = Color3.fromRGB(200, 200, 200)
  595. copyBtn.Font = Enum.Font.Gotham
  596. copyBtn.TextSize = 10
  597. copyBtn.Parent = logFrame
  598. Instance.new("UICorner", copyBtn).CornerRadius = UDim.new(0, 4)
  599.  
  600. copyBtn.MouseButton1Click:Connect(function()
  601. if setclipboard then
  602. setclipboard(message)
  603. copyBtn.Text = "Done!"
  604. task.wait(1)
  605. copyBtn.Text = "Copy"
  606. end
  607. end)
  608.  
  609. if autoScroll then
  610. task.wait(0.03)
  611. logContainer.CanvasPosition = Vector2.new(0, logContainer.AbsoluteCanvasSize.Y)
  612. end
  613.  
  614. updateScrollability()
  615. end
  616.  
  617. autoScrollBtn.MouseButton1Click:Connect(function()
  618. autoScroll = not autoScroll
  619. autoScrollBtn.Text = "Scroll: " .. (autoScroll and "ON" or "OFF")
  620. autoScrollBtn.BackgroundColor3 = autoScroll and Color3.fromRGB(60, 100, 180) or Color3.fromRGB(100, 100, 110)
  621. end)
  622.  
  623. clearBtn.MouseButton1Click:Connect(function()
  624. for _, child in ipairs(logContainer:GetChildren()) do
  625. if child:IsA("Frame") then child:Destroy() end
  626. end
  627. updateScrollability()
  628. end)
  629.  
  630. copyAllBtn.MouseButton1Click:Connect(function()
  631. allLogs = {}
  632. for _, child in ipairs(logContainer:GetChildren()) do
  633. if child:IsA("Frame") and child:FindFirstChild("TextLabel") then
  634. table.insert(allLogs, child.TextLabel.Text)
  635. end
  636. end
  637. if setclipboard then setclipboard(table.concat(allLogs, "\n")) end
  638. end)
  639.  
  640. closeBtn.MouseButton1Click:Connect(function() screenGui.Enabled = false end)
  641.  
  642. UserInputService.InputBegan:Connect(function(input, gpe)
  643. if not gpe and input.KeyCode == Enum.KeyCode.F2 then
  644. screenGui.Enabled = not screenGui.Enabled
  645. end
  646. end)
  647.  
  648. LogService.MessageOut:Connect(function(message, messageType)
  649. color = Color3.fromRGB(220, 220, 220)
  650.  
  651. if messageType == Enum.MessageType.MessageError then
  652. color = Color3.fromRGB(255, 100, 100)
  653. elseif messageType == Enum.MessageType.MessageWarning then
  654. color = Color3.fromRGB(255, 200, 100)
  655. end
  656.  
  657. addLog(string.format("[%s] %s", os.date("%H:%M:%S"), message), color, messageType)
  658. end)
  659.  
  660. updateScrollability()
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment