Advertisement
vxste

rconsole

Jul 22nd, 2024 (edited)
52,701
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.63 KB | None | 0 0
  1. -- Converted 13 instances in 0.00 seconds
  2. local GXL = {
  3. ["rconsole"] = Instance.new("ScreenGui"),
  4. ["MainFrame"] = Instance.new("Frame"),
  5. ["TopBar"] = Instance.new("Frame"),
  6. ["Title"] = Instance.new("TextLabel"),
  7. ["Roblox"] = Instance.new("ImageLabel"),
  8. ["Close"] = Instance.new("ImageButton"),
  9. ["Messages"] = Instance.new("ScrollingFrame"),
  10. ["Message"] = Instance.new("TextLabel"),
  11. ["Message_2"] = Instance.new("TextBox"),
  12. ["Seperator"] = Instance.new("UIListLayout"),
  13. ["ScrollDetails"] = Instance.new("Folder"),
  14. ["TextButton"] = Instance.new("TextButton"),
  15. ["ImageButton"] = Instance.new("ImageButton"),
  16. ["ImageButton_2"] = Instance.new("ImageButton")
  17. }
  18. GXL["rconsole"]["Parent"] = nil
  19. GXL["rconsole"]["Name"] = 'rconsole'
  20.  
  21. GXL["MainFrame"]["Parent"] = GXL["rconsole"]
  22. GXL["MainFrame"]["Name"] = 'MainFrame'
  23. GXL["MainFrame"]["AnchorPoint"] = Vector2.new(0.500000, 0.500000)
  24. GXL["MainFrame"]["BackgroundColor3"] = Color3.fromRGB(12, 12, 12)
  25. GXL["MainFrame"]["BorderColor3"] = Color3.fromRGB(52, 55, 60)
  26. GXL["MainFrame"]["BorderSizePixel"] = 2
  27. GXL["MainFrame"]["Position"] = UDim2.new(0.512247, 0.000000, 0.476048, 0.000000)
  28. GXL["MainFrame"]["Size"] = UDim2.new(0.000000, 528.000000, 0.000000, 304.000000)
  29.  
  30. GXL["TopBar"]["Parent"] = GXL["MainFrame"]
  31. GXL["TopBar"]["Name"] = 'TopBar'
  32. GXL["TopBar"]["BackgroundColor3"] = Color3.fromRGB(0, 0, 0)
  33. GXL["TopBar"]["BorderColor3"] = Color3.fromRGB(0, 0, 0)
  34. GXL["TopBar"]["BorderSizePixel"] = 0
  35. GXL["TopBar"]["Size"] = UDim2.new(1.000000, 0.000000, 0.000000, 24.000000)
  36.  
  37. GXL["Title"]["Parent"] = GXL["TopBar"]
  38. GXL["Title"]["Name"] = 'Title'
  39. GXL["Title"]["FontFace"] = Font.new("rbxasset://fonts/families/Ubuntu.json", Enum.FontWeight.Regular, Enum.FontStyle.Normal)
  40. GXL["Title"]["FontSize"] = Enum.FontSize.Size14
  41. GXL["Title"]["Text"] = 'MoreUNC v2.0.0'
  42. GXL["Title"]["TextColor3"] = Color3.fromRGB(255, 255, 255)
  43. GXL["Title"]["TextSize"] = 13
  44. GXL["Title"]["TextXAlignment"] = Enum.TextXAlignment.Left
  45. GXL["Title"]["AnchorPoint"] = Vector2.new(0.000000, 0.500000)
  46. GXL["Title"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255)
  47. GXL["Title"]["BackgroundTransparency"] = 1
  48. GXL["Title"]["BorderColor3"] = Color3.fromRGB(0, 0, 0)
  49. GXL["Title"]["BorderSizePixel"] = 0
  50. GXL["Title"]["Position"] = UDim2.new(0.000000, 27.000000, 0.500000, 0.000000)
  51. GXL["Title"]["Size"] = UDim2.new(0.000000, 194.000000, 0.000000, 25.000000)
  52.  
  53. GXL["Roblox"]["Parent"] = GXL["TopBar"]
  54. GXL["Roblox"]["Name"] = 'Roblox'
  55. GXL["Roblox"]["Image"] = 'rbxassetid://852327972'
  56. GXL["Roblox"]["AnchorPoint"] = Vector2.new(0.000000, 0.500000)
  57. GXL["Roblox"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255)
  58. GXL["Roblox"]["BackgroundTransparency"] = 1
  59. GXL["Roblox"]["BorderColor3"] = Color3.fromRGB(0, 0, 0)
  60. GXL["Roblox"]["BorderSizePixel"] = 0
  61. GXL["Roblox"]["Position"] = UDim2.new(0.000000, 5.000000, 0.480000, 0.000000)
  62. GXL["Roblox"]["Size"] = UDim2.new(0.000000, 17.000000, 0.000000, 17.000000)
  63.  
  64. GXL["Close"]["Parent"] = GXL["TopBar"]
  65. GXL["Close"]["Name"] = 'Close'
  66. GXL["Close"]["Image"] = 'rbxassetid://10747384394'
  67. GXL["Close"]["AnchorPoint"] = Vector2.new(1.000000, 0.500000)
  68. GXL["Close"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255)
  69. GXL["Close"]["BackgroundTransparency"] = 1
  70. GXL["Close"]["BorderColor3"] = Color3.fromRGB(0, 0, 0)
  71. GXL["Close"]["BorderSizePixel"] = 0
  72. GXL["Close"]["Position"] = UDim2.new(1.000000, -5.000000, 0.480000, 0.000000)
  73. GXL["Close"]["Size"] = UDim2.new(0.000000, 16.000000, 0.000000, 16.000000)
  74.  
  75. GXL["Messages"]["Parent"] = GXL["MainFrame"]
  76. GXL["Messages"]["Name"] = 'Messages'
  77. GXL["Messages"]["AutomaticCanvasSize"] = Enum.AutomaticSize.Y
  78. GXL["Messages"]["BottomImage"] = ''
  79. GXL["Messages"]["CanvasSize"] = UDim2.new(0.000000, 0.000000, 0.000000, 0.000000)
  80. GXL["Messages"]["HorizontalScrollBarInset"] = Enum.ScrollBarInset.ScrollBar
  81. GXL["Messages"]["ScrollBarImageTransparency"] = 0.5
  82. GXL["Messages"]["ScrollBarThickness"] = 10
  83. GXL["Messages"]["TopImage"] = ''
  84. GXL["Messages"]["Active"] = true
  85. GXL["Messages"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255)
  86. GXL["Messages"]["BackgroundTransparency"] = 1
  87. GXL["Messages"]["BorderColor3"] = Color3.fromRGB(0, 0, 0)
  88. GXL["Messages"]["BorderSizePixel"] = 0
  89. GXL["Messages"]["Position"] = UDim2.new(0.000000, 0.000000, 0.000000, 24.000000)
  90. GXL["Messages"]["Size"] = UDim2.new(1.000000, 0.000000, 1.000000, -24.000000)
  91.  
  92. GXL["Message"]["Parent"] = nil
  93. GXL["Message"]["Name"] = 'Message'
  94. GXL["Message"]["FontFace"] = Font.new("rbxasset://fonts/families/Inconsolata.json", Enum.FontWeight.SemiBold, Enum.FontStyle.Normal)
  95. GXL["Message"]["FontSize"] = Enum.FontSize.Size14
  96. GXL["Message"]["Text"] = ''
  97. GXL["Message"]["TextColor3"] = Color3.fromRGB(182, 182, 182)
  98. GXL["Message"]["TextSize"] = 14
  99. GXL["Message"]["TextXAlignment"] = Enum.TextXAlignment.Left
  100. GXL["Message"]["TextYAlignment"] = Enum.TextYAlignment.Top
  101. GXL["Message"]["Active"] = true
  102. GXL["Message"]["AutomaticSize"] = Enum.AutomaticSize.Y
  103. GXL["Message"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255)
  104. GXL["Message"]["BackgroundTransparency"] = 1
  105. GXL["Message"]["BorderColor3"] = Color3.fromRGB(0, 0, 0)
  106. GXL["Message"]["BorderSizePixel"] = 0
  107. GXL["Message"]["Position"] = UDim2.new(0.000000, 2.000000, 0.000000, 2.000000)
  108. GXL["Message"]["Selectable"] = true
  109. GXL["Message"]["Size"] = UDim2.new(1.000000, 0.000000, 0.000000, 0.000000)
  110. GXL["Message"]["Visible"] = false
  111. GXL["Message"]["TextWrapped"] = true
  112. GXL["Message"]["RichText"] = true
  113.  
  114. GXL["Message_2"]["Parent"] = nil
  115. GXL["Message_2"]["Name"] = 'Message'
  116. GXL["Message_2"]["FontFace"] = Font.new("rbxasset://fonts/families/Inconsolata.json", Enum.FontWeight.SemiBold, Enum.FontStyle.Normal)
  117. GXL["Message_2"]["FontSize"] = Enum.FontSize.Size14
  118. GXL["Message_2"]["Text"] = ''
  119. GXL["Message_2"]["TextColor3"] = Color3.fromRGB(182, 182, 182)
  120. GXL["Message_2"]["TextSize"] = 14
  121. GXL["Message_2"]["TextWrap"] = true
  122. GXL["Message_2"]["TextWrapped"] = true
  123. GXL["Message_2"]["ClearTextOnFocus"] = false
  124. GXL["Message_2"]["TextEditable"] = false
  125. GXL["Message_2"]['Visible'] = false
  126. GXL["Message_2"]["TextXAlignment"] = Enum.TextXAlignment.Left
  127. GXL["Message_2"]["TextYAlignment"] = Enum.TextYAlignment.Top
  128. GXL["Message_2"]["AutomaticSize"] = Enum.AutomaticSize.Y
  129. GXL["Message_2"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255)
  130. GXL["Message_2"]["BackgroundTransparency"] = 1
  131. GXL["Message_2"]["BorderColor3"] = Color3.fromRGB(0, 0, 0)
  132. GXL["Message_2"]["BorderSizePixel"] = 0
  133. GXL["Message_2"]["Position"] = UDim2.new(0.000000, 2.000000, 0.000000, 2.000000)
  134. GXL["Message_2"]["Size"] = UDim2.new(1.000000, 0.000000, 0.00000, 0.000000)
  135. GXL["Message_2"]["RichText"] = true
  136.  
  137. GXL["Seperator"]["Parent"] = GXL["Messages"]
  138. GXL["Seperator"]["Name"] = 'Seperator'
  139. GXL["Seperator"]["SortOrder"] = Enum.SortOrder.LayoutOrder
  140.  
  141.  
  142. local rconsole = {}
  143. local Console, CurrentInput, FinalString, Text, RealLength, LastColor = nil, nil, '', '', math.huge, Color3.fromRGB(182, 182, 182)
  144.  
  145. local Colors = {
  146. BLACK = Color3.fromRGB(50, 50, 50),
  147. BLUE = Color3.fromRGB(0, 0, 204),
  148. GREEN = Color3.fromRGB(0, 255, 0),
  149. CYAN = Color3.fromRGB(0, 255, 255),
  150. RED = Color3.fromHex('#5A0101'),
  151. MAGENTA = Color3.fromRGB(255, 0, 255),
  152. BROWN = Color3.fromRGB(165, 42, 42),
  153. LIGHT_GRAY = Color3.fromRGB(211, 211, 211),
  154. DARK_GRAY = Color3.fromRGB(169, 169, 169),
  155. LIGHT_BLUE = Color3.fromRGB(173, 216, 230),
  156. LIGHT_GREEN = Color3.fromRGB(144, 238, 144),
  157. LIGHT_CYAN = Color3.fromRGB(224, 255, 255),
  158. LIGHT_RED = Color3.fromRGB(255, 204, 203),
  159. LIGHT_MAGENTA = Color3.fromRGB(255, 182, 193),
  160. YELLOW = Color3.fromRGB(255, 255, 0),
  161. WHITE = Color3.fromRGB(255, 255, 255),
  162. ORANGE = Color3.fromRGB(255, 186, 12)
  163. }
  164.  
  165. function Colorize(Text)
  166. local Pattern = "@@(%w+)@@"
  167. local Matched = 0
  168. local StartIndex, EndIndex = string.find(Text, Pattern)
  169.  
  170. while StartIndex do
  171. local ColorName = string.match(string.sub(Text, StartIndex, EndIndex), Pattern)
  172. local col = Colors[ColorName]
  173.  
  174. if col then
  175. if Matched > 0 then
  176. Text = Text .. '</font>'
  177. end
  178. local colorString = string.format("<font color='rgb(%d, %d, %d)'>", col.R * 255, col.G * 255, col.B * 255)
  179. Text = string.sub(Text, 1, StartIndex - 1) .. colorString .. string.sub(Text, EndIndex + 1)
  180. Matched = Matched + 1
  181. end
  182.  
  183. StartIndex, EndIndex = string.find(Text, Pattern, EndIndex + 1)
  184. end
  185.  
  186. if Matched > 0 then
  187. Text = Text .. '</font>'
  188. end
  189.  
  190. return Text
  191. end
  192.  
  193. function rconsole:init()
  194. Console = GXL["rconsole"]:Clone()
  195. return Console
  196. end
  197. function rconsole:addmessage(message, iswarn, iserror)
  198. if CurrentInput then
  199. print("Yielding")
  200. if coroutine.isyieldable() then
  201. repeat task.wait() until not CurrentInput
  202. end
  203. end
  204. assert(type(message) == 'string', 'Argument #1 to \'rconsoleprint\' must be a string! (got ' .. type(message) .. ')')
  205. local date = os.date('%H:%M:%S')
  206. local Copy = GXL["Message"]:Clone()
  207. Copy.Parent = Console:WaitForChild('MainFrame'):WaitForChild('Messages')
  208. Copy.Visible = true
  209. Copy.TextColor3 = LastColor
  210. Copy.Text = string.format('[%s] %s', date, Colorize(message))
  211. if iswarn then
  212. local Orange = Color3.fromRGB(236,148,44)
  213. Copy.Text = string.format("<font color='rgb(%d, %d, %d)'>[WARNING] %s</font>", Orange.R * 255, Orange.G * 255, Orange.B * 255, string.gsub(message, "@@%w+@@", ''))
  214. return
  215. elseif iserror then
  216. local Red = Colors['RED']
  217. Copy.Text = string.format("<font color='rgb(%d, %d, %d)'>* %s</font>", Red.R * 255, Red.G * 255, Red.B * 255, string.gsub(message, "@@%w+@@", ''))
  218. return
  219. else
  220. local m = string.match(message, '@@(%w+)@@')
  221. if m and message == '@@' .. m .. '@@' and Colors[m] then
  222. LastColor = Color3.fromRGB(Colors[m].R * 255, Colors[m].G * 255, Colors[m].B * 255)
  223. Copy.Parent = nil
  224. end
  225. end
  226. end
  227. function rconsole:addinput(text)
  228. if CurrentInput then
  229. if coroutine.isyieldable() then
  230. repeat task.wait() until not CurrentInput
  231. end
  232. end
  233. assert(type(text) == 'string', 'Argument #1 to \'addmessage\' must be a string! (got ' .. type(text) .. ')')
  234. local date = os.date('%H:%M:%S')
  235. local Copy = GXL["Message_2"]:Clone()
  236. CurrentInput = Copy
  237. Text = text
  238. RealLength = #text
  239. FinalString = ''
  240. Copy.Parent = Console:WaitForChild('MainFrame'):WaitForChild('Messages')
  241. Copy.Visible = true
  242. Copy.Text = string.format("[%s] %s", date, Colorize(text))
  243. Copy.TextColor3 = LastColor
  244. local t, cont
  245. Copy.Focused:Connect(function()
  246. Copy.Text = Copy.ContentText
  247. end)
  248. Copy.FocusLost:Connect(function(a)
  249. if a then cont = true end
  250. end)
  251. if coroutine.isyieldable() then
  252. repeat task.wait() until cont
  253. end
  254. local t = FinalString
  255. Copy.Text = string.format("[%s] %s%s", date, Colorize(text), t)
  256. CurrentInput = nil
  257. Copy.TextEditable = false
  258. FinalString = ''
  259. return t
  260. end
  261. function FindKey(Table, Key)
  262. for a, v in next, Table do
  263. if v.KeyCode == Key then
  264. return a
  265. end
  266. end
  267. end
  268.  
  269. local alphabet = 'abcdefghijklmnopqrstuvwxyz'
  270. local alt = {
  271. Zero = '0',
  272. One = '1',
  273. Two = '2',
  274. Three = '3',
  275. Four = '4',
  276. Five = '5',
  277. Six = '6',
  278. Seven = '7',
  279. Eight = '8',
  280. Nine = '9',
  281. ShiftZero = ')',
  282. ShiftOne = '!',
  283. ShiftTwo = '@',
  284. ShiftThree = '#',
  285. ShiftFour = '$',
  286. ShiftFive = '%',
  287. ShiftSix = '^',
  288. ShiftSeven = '&',
  289. ShiftEight = '*',
  290. ShiftNine = '(',
  291. Minus = '-',
  292. ShiftMinus = '_',
  293. Equals = '=',
  294. ShiftEquals = '+',
  295. Backslash = '\\',
  296. ShiftBackslash = '|',
  297. LeftBracket = '[',
  298. ShiftLeftBracket = '{',
  299. RightBracket = ']',
  300. ShiftRightBracket = '}',
  301. Semicolon = ';',
  302. Space = ' ',
  303. ShiftSpace = ' ',
  304. ShiftSemicolon = ':',
  305. Quote = "'",
  306. ShiftQuote = '"',
  307. Comma = ',',
  308. ShiftComma = '<',
  309. Period = '.',
  310. ShiftPeriod = '>',
  311. Slash = '/',
  312. ShiftSlash = '?',
  313. Grave = '`',
  314. ShiftGrave = '~'
  315. }
  316.  
  317.  
  318. function Fix(input, Shift)
  319. local a = tostring(input.KeyCode):split('.')[3]
  320. if alphabet:find(a) then
  321. return a
  322. elseif alphabet:find(a:lower()) then
  323. return a:lower()
  324. else
  325. local thing = alt[(Shift and 'Shift' or '') .. a]
  326. if thing then
  327. return thing
  328. else
  329. return ''
  330. end
  331. end
  332. end
  333.  
  334. game:GetService("UserInputService").InputBegan:Connect(function(input)
  335. if input.UserInputType == Enum.UserInputType.Keyboard then
  336. local Keys = game:GetService("UserInputService"):GetKeysPressed()
  337. if CurrentInput and CurrentInput:IsFocused() then
  338. local Fixed = Fix(input, FindKey(Keys, Enum.KeyCode.LeftShift) ~= nil)
  339. if input.KeyCode ~= Enum.KeyCode.Backspace then
  340. FinalString = FinalString .. Fixed
  341. CurrentInput.Text = CurrentInput.Text .. Fixed
  342. RealLength = RealLength + 1
  343. else
  344. if RealLength <= #Text then
  345. return
  346. end
  347. RealLength = RealLength - 1
  348. FinalString = FinalString:sub(1, #FinalString - 1)
  349. CurrentInput.Text = CurrentInput.Text:sub(1, #CurrentInput.Text - 1)
  350. end
  351. end
  352. end
  353. end)
  354.  
  355. return rconsole
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement