Advertisement
Trollholder

Ahuehwiiahiiiiwahiajj

Feb 23rd, 2023
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. -- Customize these values to change the appearance of the console
  2. local BACKGROUND_COLOR = Color3.new(0, 0, 0)
  3. local TEXT_COLOR = Color3.new(1, 1, 1)
  4. local FONT_SIZE = 18
  5.  
  6. -- Create a ScreenGui to hold the console output
  7. local ConsoleGui = Instance.new("ScreenGui")
  8. ConsoleGui.Name = "Console"
  9. ConsoleGui.Enabled = true
  10. ConsoleGui.ResetOnSpawn = false
  11. ConsoleGui.Parent = game.CoreGui
  12.  
  13. -- Create a Frame to hold the console output
  14. local ConsoleFrame = Instance.new("Frame")
  15. ConsoleFrame.Name = "ConsoleFrame"
  16. ConsoleFrame.Size = UDim2.new(0.5, 0, 0.5, 0)
  17. ConsoleFrame.Position = UDim2.new(0.25, 0, 0.25, 0)
  18. ConsoleFrame.BackgroundTransparency = 0.5
  19. ConsoleFrame.BackgroundColor3 = BACKGROUND_COLOR
  20. ConsoleFrame.BorderColor3 = TEXT_COLOR
  21. ConsoleFrame.BorderSizePixel = 5
  22. ConsoleFrame.Parent = ConsoleGui
  23.  
  24. -- Create a TextLabel to display the console output
  25. local ConsoleOutput = Instance.new("TextLabel")
  26. ConsoleOutput.Name = "ConsoleOutput"
  27. ConsoleOutput.Size = UDim2.new(1, 0, 1, 0)
  28. ConsoleOutput.BackgroundTransparency = 1
  29. ConsoleOutput.Font = Enum.Font.SourceSans
  30. ConsoleOutput.TextColor3 = TEXT_COLOR
  31. ConsoleOutput.TextSize = FONT_SIZE
  32. ConsoleOutput.TextWrapped = true
  33. ConsoleOutput.Parent = ConsoleFrame
  34.  
  35. -- Redirect print, warn, and error to update the TextLabel
  36. local function updateConsoleOutput(msg, color)
  37. ConsoleOutput.Text = ConsoleOutput.Text .. msg .. "\n"
  38. ConsoleOutput.TextColor3 = color or TEXT_COLOR
  39. end
  40.  
  41. print = function(msg)
  42. updateConsoleOutput("[INFO]: " .. msg, TEXT_COLOR)
  43. end
  44.  
  45. warn = function(msg)
  46. updateConsoleOutput("[WARNING]: " .. msg, Color3.new(1, 1, 0))
  47. end
  48.  
  49. error = function(msg)
  50. updateConsoleOutput("[ERROR]: " .. msg, Color3.new(1, 0, 0))
  51. end
  52.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement