Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Converted 13 instances in 0.00 seconds
- local GXL = {
- ["rconsole"] = Instance.new("ScreenGui"),
- ["MainFrame"] = Instance.new("Frame"),
- ["TopBar"] = Instance.new("Frame"),
- ["Title"] = Instance.new("TextLabel"),
- ["Roblox"] = Instance.new("ImageLabel"),
- ["Close"] = Instance.new("ImageButton"),
- ["Messages"] = Instance.new("ScrollingFrame"),
- ["Message"] = Instance.new("TextLabel"),
- ["Message_2"] = Instance.new("TextBox"),
- ["Seperator"] = Instance.new("UIListLayout"),
- ["ScrollDetails"] = Instance.new("Folder"),
- ["TextButton"] = Instance.new("TextButton"),
- ["ImageButton"] = Instance.new("ImageButton"),
- ["ImageButton_2"] = Instance.new("ImageButton")
- }
- GXL["rconsole"]["Parent"] = nil
- GXL["rconsole"]["Name"] = 'rconsole'
- GXL["MainFrame"]["Parent"] = GXL["rconsole"]
- GXL["MainFrame"]["Name"] = 'MainFrame'
- GXL["MainFrame"]["AnchorPoint"] = Vector2.new(0.500000, 0.500000)
- GXL["MainFrame"]["BackgroundColor3"] = Color3.fromRGB(12, 12, 12)
- GXL["MainFrame"]["BorderColor3"] = Color3.fromRGB(52, 55, 60)
- GXL["MainFrame"]["BorderSizePixel"] = 2
- GXL["MainFrame"]["Position"] = UDim2.new(0.512247, 0.000000, 0.476048, 0.000000)
- GXL["MainFrame"]["Size"] = UDim2.new(0.000000, 528.000000, 0.000000, 304.000000)
- GXL["TopBar"]["Parent"] = GXL["MainFrame"]
- GXL["TopBar"]["Name"] = 'TopBar'
- GXL["TopBar"]["BackgroundColor3"] = Color3.fromRGB(0, 0, 0)
- GXL["TopBar"]["BorderColor3"] = Color3.fromRGB(0, 0, 0)
- GXL["TopBar"]["BorderSizePixel"] = 0
- GXL["TopBar"]["Size"] = UDim2.new(1.000000, 0.000000, 0.000000, 24.000000)
- GXL["Title"]["Parent"] = GXL["TopBar"]
- GXL["Title"]["Name"] = 'Title'
- GXL["Title"]["FontFace"] = Font.new("rbxasset://fonts/families/Ubuntu.json", Enum.FontWeight.Regular, Enum.FontStyle.Normal)
- GXL["Title"]["FontSize"] = Enum.FontSize.Size14
- GXL["Title"]["Text"] = 'MoreUNC v2.0.0'
- GXL["Title"]["TextColor3"] = Color3.fromRGB(255, 255, 255)
- GXL["Title"]["TextSize"] = 13
- GXL["Title"]["TextXAlignment"] = Enum.TextXAlignment.Left
- GXL["Title"]["AnchorPoint"] = Vector2.new(0.000000, 0.500000)
- GXL["Title"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255)
- GXL["Title"]["BackgroundTransparency"] = 1
- GXL["Title"]["BorderColor3"] = Color3.fromRGB(0, 0, 0)
- GXL["Title"]["BorderSizePixel"] = 0
- GXL["Title"]["Position"] = UDim2.new(0.000000, 27.000000, 0.500000, 0.000000)
- GXL["Title"]["Size"] = UDim2.new(0.000000, 194.000000, 0.000000, 25.000000)
- GXL["Roblox"]["Parent"] = GXL["TopBar"]
- GXL["Roblox"]["Name"] = 'Roblox'
- GXL["Roblox"]["Image"] = 'rbxassetid://852327972'
- GXL["Roblox"]["AnchorPoint"] = Vector2.new(0.000000, 0.500000)
- GXL["Roblox"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255)
- GXL["Roblox"]["BackgroundTransparency"] = 1
- GXL["Roblox"]["BorderColor3"] = Color3.fromRGB(0, 0, 0)
- GXL["Roblox"]["BorderSizePixel"] = 0
- GXL["Roblox"]["Position"] = UDim2.new(0.000000, 5.000000, 0.480000, 0.000000)
- GXL["Roblox"]["Size"] = UDim2.new(0.000000, 17.000000, 0.000000, 17.000000)
- GXL["Close"]["Parent"] = GXL["TopBar"]
- GXL["Close"]["Name"] = 'Close'
- GXL["Close"]["Image"] = 'rbxassetid://10747384394'
- GXL["Close"]["AnchorPoint"] = Vector2.new(1.000000, 0.500000)
- GXL["Close"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255)
- GXL["Close"]["BackgroundTransparency"] = 1
- GXL["Close"]["BorderColor3"] = Color3.fromRGB(0, 0, 0)
- GXL["Close"]["BorderSizePixel"] = 0
- GXL["Close"]["Position"] = UDim2.new(1.000000, -5.000000, 0.480000, 0.000000)
- GXL["Close"]["Size"] = UDim2.new(0.000000, 16.000000, 0.000000, 16.000000)
- GXL["Messages"]["Parent"] = GXL["MainFrame"]
- GXL["Messages"]["Name"] = 'Messages'
- GXL["Messages"]["AutomaticCanvasSize"] = Enum.AutomaticSize.Y
- GXL["Messages"]["BottomImage"] = ''
- GXL["Messages"]["CanvasSize"] = UDim2.new(0.000000, 0.000000, 0.000000, 0.000000)
- GXL["Messages"]["HorizontalScrollBarInset"] = Enum.ScrollBarInset.ScrollBar
- GXL["Messages"]["ScrollBarImageTransparency"] = 0.5
- GXL["Messages"]["ScrollBarThickness"] = 10
- GXL["Messages"]["TopImage"] = ''
- GXL["Messages"]["Active"] = true
- GXL["Messages"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255)
- GXL["Messages"]["BackgroundTransparency"] = 1
- GXL["Messages"]["BorderColor3"] = Color3.fromRGB(0, 0, 0)
- GXL["Messages"]["BorderSizePixel"] = 0
- GXL["Messages"]["Position"] = UDim2.new(0.000000, 0.000000, 0.000000, 24.000000)
- GXL["Messages"]["Size"] = UDim2.new(1.000000, 0.000000, 1.000000, -24.000000)
- GXL["Message"]["Parent"] = nil
- GXL["Message"]["Name"] = 'Message'
- GXL["Message"]["FontFace"] = Font.new("rbxasset://fonts/families/Inconsolata.json", Enum.FontWeight.SemiBold, Enum.FontStyle.Normal)
- GXL["Message"]["FontSize"] = Enum.FontSize.Size14
- GXL["Message"]["Text"] = ''
- GXL["Message"]["TextColor3"] = Color3.fromRGB(182, 182, 182)
- GXL["Message"]["TextSize"] = 14
- GXL["Message"]["TextXAlignment"] = Enum.TextXAlignment.Left
- GXL["Message"]["TextYAlignment"] = Enum.TextYAlignment.Top
- GXL["Message"]["Active"] = true
- GXL["Message"]["AutomaticSize"] = Enum.AutomaticSize.Y
- GXL["Message"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255)
- GXL["Message"]["BackgroundTransparency"] = 1
- GXL["Message"]["BorderColor3"] = Color3.fromRGB(0, 0, 0)
- GXL["Message"]["BorderSizePixel"] = 0
- GXL["Message"]["Position"] = UDim2.new(0.000000, 2.000000, 0.000000, 2.000000)
- GXL["Message"]["Selectable"] = true
- GXL["Message"]["Size"] = UDim2.new(1.000000, 0.000000, 0.000000, 0.000000)
- GXL["Message"]["Visible"] = false
- GXL["Message"]["TextWrapped"] = true
- GXL["Message"]["RichText"] = true
- GXL["Message_2"]["Parent"] = nil
- GXL["Message_2"]["Name"] = 'Message'
- GXL["Message_2"]["FontFace"] = Font.new("rbxasset://fonts/families/Inconsolata.json", Enum.FontWeight.SemiBold, Enum.FontStyle.Normal)
- GXL["Message_2"]["FontSize"] = Enum.FontSize.Size14
- GXL["Message_2"]["Text"] = ''
- GXL["Message_2"]["TextColor3"] = Color3.fromRGB(182, 182, 182)
- GXL["Message_2"]["TextSize"] = 14
- GXL["Message_2"]["TextWrap"] = true
- GXL["Message_2"]["TextWrapped"] = true
- GXL["Message_2"]["ClearTextOnFocus"] = false
- GXL["Message_2"]["TextEditable"] = false
- GXL["Message_2"]['Visible'] = false
- GXL["Message_2"]["TextXAlignment"] = Enum.TextXAlignment.Left
- GXL["Message_2"]["TextYAlignment"] = Enum.TextYAlignment.Top
- GXL["Message_2"]["AutomaticSize"] = Enum.AutomaticSize.Y
- GXL["Message_2"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255)
- GXL["Message_2"]["BackgroundTransparency"] = 1
- GXL["Message_2"]["BorderColor3"] = Color3.fromRGB(0, 0, 0)
- GXL["Message_2"]["BorderSizePixel"] = 0
- GXL["Message_2"]["Position"] = UDim2.new(0.000000, 2.000000, 0.000000, 2.000000)
- GXL["Message_2"]["Size"] = UDim2.new(1.000000, 0.000000, 0.00000, 0.000000)
- GXL["Message_2"]["RichText"] = true
- GXL["Seperator"]["Parent"] = GXL["Messages"]
- GXL["Seperator"]["Name"] = 'Seperator'
- GXL["Seperator"]["SortOrder"] = Enum.SortOrder.LayoutOrder
- local rconsole = {}
- local Console, CurrentInput, FinalString, Text, RealLength, LastColor = nil, nil, '', '', math.huge, Color3.fromRGB(182, 182, 182)
- local Colors = {
- BLACK = Color3.fromRGB(50, 50, 50),
- BLUE = Color3.fromRGB(0, 0, 204),
- GREEN = Color3.fromRGB(0, 255, 0),
- CYAN = Color3.fromRGB(0, 255, 255),
- RED = Color3.fromHex('#5A0101'),
- MAGENTA = Color3.fromRGB(255, 0, 255),
- BROWN = Color3.fromRGB(165, 42, 42),
- LIGHT_GRAY = Color3.fromRGB(211, 211, 211),
- DARK_GRAY = Color3.fromRGB(169, 169, 169),
- LIGHT_BLUE = Color3.fromRGB(173, 216, 230),
- LIGHT_GREEN = Color3.fromRGB(144, 238, 144),
- LIGHT_CYAN = Color3.fromRGB(224, 255, 255),
- LIGHT_RED = Color3.fromRGB(255, 204, 203),
- LIGHT_MAGENTA = Color3.fromRGB(255, 182, 193),
- YELLOW = Color3.fromRGB(255, 255, 0),
- WHITE = Color3.fromRGB(255, 255, 255),
- ORANGE = Color3.fromRGB(255, 186, 12)
- }
- function Colorize(Text)
- local Pattern = "@@(%w+)@@"
- local Matched = 0
- local StartIndex, EndIndex = string.find(Text, Pattern)
- while StartIndex do
- local ColorName = string.match(string.sub(Text, StartIndex, EndIndex), Pattern)
- local col = Colors[ColorName]
- if col then
- if Matched > 0 then
- Text = Text .. '</font>'
- end
- local colorString = string.format("<font color='rgb(%d, %d, %d)'>", col.R * 255, col.G * 255, col.B * 255)
- Text = string.sub(Text, 1, StartIndex - 1) .. colorString .. string.sub(Text, EndIndex + 1)
- Matched = Matched + 1
- end
- StartIndex, EndIndex = string.find(Text, Pattern, EndIndex + 1)
- end
- if Matched > 0 then
- Text = Text .. '</font>'
- end
- return Text
- end
- function rconsole:init()
- Console = GXL["rconsole"]:Clone()
- return Console
- end
- function rconsole:addmessage(message, iswarn, iserror)
- if CurrentInput then
- print("Yielding")
- if coroutine.isyieldable() then
- repeat task.wait() until not CurrentInput
- end
- end
- assert(type(message) == 'string', 'Argument #1 to \'rconsoleprint\' must be a string! (got ' .. type(message) .. ')')
- local date = os.date('%H:%M:%S')
- local Copy = GXL["Message"]:Clone()
- Copy.Parent = Console:WaitForChild('MainFrame'):WaitForChild('Messages')
- Copy.Visible = true
- Copy.TextColor3 = LastColor
- Copy.Text = string.format('[%s] %s', date, Colorize(message))
- if iswarn then
- local Orange = Color3.fromRGB(236,148,44)
- 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+@@", ''))
- return
- elseif iserror then
- local Red = Colors['RED']
- 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+@@", ''))
- return
- else
- local m = string.match(message, '@@(%w+)@@')
- if m and message == '@@' .. m .. '@@' and Colors[m] then
- LastColor = Color3.fromRGB(Colors[m].R * 255, Colors[m].G * 255, Colors[m].B * 255)
- Copy.Parent = nil
- end
- end
- end
- function rconsole:addinput(text)
- if CurrentInput then
- if coroutine.isyieldable() then
- repeat task.wait() until not CurrentInput
- end
- end
- assert(type(text) == 'string', 'Argument #1 to \'addmessage\' must be a string! (got ' .. type(text) .. ')')
- local date = os.date('%H:%M:%S')
- local Copy = GXL["Message_2"]:Clone()
- CurrentInput = Copy
- Text = text
- RealLength = #text
- FinalString = ''
- Copy.Parent = Console:WaitForChild('MainFrame'):WaitForChild('Messages')
- Copy.Visible = true
- Copy.Text = string.format("[%s] %s", date, Colorize(text))
- Copy.TextColor3 = LastColor
- local t, cont
- Copy.Focused:Connect(function()
- Copy.Text = Copy.ContentText
- end)
- Copy.FocusLost:Connect(function(a)
- if a then cont = true end
- end)
- if coroutine.isyieldable() then
- repeat task.wait() until cont
- end
- local t = FinalString
- Copy.Text = string.format("[%s] %s%s", date, Colorize(text), t)
- CurrentInput = nil
- Copy.TextEditable = false
- FinalString = ''
- return t
- end
- function FindKey(Table, Key)
- for a, v in next, Table do
- if v.KeyCode == Key then
- return a
- end
- end
- end
- local alphabet = 'abcdefghijklmnopqrstuvwxyz'
- local alt = {
- Zero = '0',
- One = '1',
- Two = '2',
- Three = '3',
- Four = '4',
- Five = '5',
- Six = '6',
- Seven = '7',
- Eight = '8',
- Nine = '9',
- ShiftZero = ')',
- ShiftOne = '!',
- ShiftTwo = '@',
- ShiftThree = '#',
- ShiftFour = '$',
- ShiftFive = '%',
- ShiftSix = '^',
- ShiftSeven = '&',
- ShiftEight = '*',
- ShiftNine = '(',
- Minus = '-',
- ShiftMinus = '_',
- Equals = '=',
- ShiftEquals = '+',
- Backslash = '\\',
- ShiftBackslash = '|',
- LeftBracket = '[',
- ShiftLeftBracket = '{',
- RightBracket = ']',
- ShiftRightBracket = '}',
- Semicolon = ';',
- Space = ' ',
- ShiftSpace = ' ',
- ShiftSemicolon = ':',
- Quote = "'",
- ShiftQuote = '"',
- Comma = ',',
- ShiftComma = '<',
- Period = '.',
- ShiftPeriod = '>',
- Slash = '/',
- ShiftSlash = '?',
- Grave = '`',
- ShiftGrave = '~'
- }
- function Fix(input, Shift)
- local a = tostring(input.KeyCode):split('.')[3]
- if alphabet:find(a) then
- return a
- elseif alphabet:find(a:lower()) then
- return a:lower()
- else
- local thing = alt[(Shift and 'Shift' or '') .. a]
- if thing then
- return thing
- else
- return ''
- end
- end
- end
- game:GetService("UserInputService").InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.Keyboard then
- local Keys = game:GetService("UserInputService"):GetKeysPressed()
- if CurrentInput and CurrentInput:IsFocused() then
- local Fixed = Fix(input, FindKey(Keys, Enum.KeyCode.LeftShift) ~= nil)
- if input.KeyCode ~= Enum.KeyCode.Backspace then
- FinalString = FinalString .. Fixed
- CurrentInput.Text = CurrentInput.Text .. Fixed
- RealLength = RealLength + 1
- else
- if RealLength <= #Text then
- return
- end
- RealLength = RealLength - 1
- FinalString = FinalString:sub(1, #FinalString - 1)
- CurrentInput.Text = CurrentInput.Text:sub(1, #CurrentInput.Text - 1)
- end
- end
- end
- end)
- return rconsole
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement