MaxproGlitcher

Custom text print for console roblox

Aug 9th, 2024 (edited)
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. -- Custom text print for console roblox
  2. local Modules = {
  3. Colors = {
  4. ["Green"] = "0,255,0", -- color in rgb
  5. ["Cyan"] = "33, 161, 163"
  6. }
  7. }
  8.  
  9. Modules.ChangeColor = function()
  10. game:GetService("RunService").Heartbeat:Connect(function()
  11. if game:GetService("CoreGui"):FindFirstChild("DevConsoleMaster") then
  12. for _, v in pairs(game:GetService("CoreGui"):FindFirstChild("DevConsoleMaster"):GetDescendants()) do
  13. if v:IsA("TextLabel") then
  14. v.RichText = true
  15. end
  16. end
  17. end
  18. end)
  19. end
  20.  
  21. Modules.print = function(color, text, size)
  22. if not Modules.Colors[color] then
  23. warn("Color was not found!")
  24. return
  25. end
  26.  
  27.  
  28. local Text = '<font color="rgb(' .. Modules.Colors[color] .. ')"'
  29. if size then
  30. Text = Text .. ' size="' .. tostring(size) .. '"'
  31. end
  32. Text = Text .. '>' .. tostring(text) .. '</font>'
  33. print(Text)
  34. end
  35.  
  36.  
  37. Modules.ChangeColor()
  38. --// Examples \\--
  39. Modules.print("Green", "Lol")
  40. Modules.print("Green", "Lol with size 20",20)
  41.  
Advertisement
Add Comment
Please, Sign In to add comment