-- LightCyan Source Code -- LightCyan Is a GUI Library for Roblox and when planning it, It used to be called Wonder and then we got LightCyan. -- A CLI Based-Library, Console Styled. local lcyan = {} export type WindowConfig = { Name: string, KeySystemEnabled: boolean, Keys: {string}, } local player_gui local _,_r = pcall(function() return game:GetService('CoreGui') end) if _ and _r then player_gui = _r else player_gui = game:GetService('Players').LocalPlayer.PlayerGui end local pc = false local uis = game:GetService('UserInputService') local te = uis.TouchEnabled local ke = uis.KeyboardEnabled if not te and ke then pc = true else pc = false end _G.LCyanLoaded = false lcyan.Window = function(self, Config: WindowConfig) if _G.LCyanLoaded then player_gui:FindFirstChild('LCyanGui'):Destroy() end _G.LCyanLoaded = true local wdow = {} local gui = Instance.new('ScreenGui', player_gui) gui.Name = "LCyanGui" gui.IgnoreGuiInset = true gui.ResetOnSpawn = false local console = Instance.new('ScrollingFrame', gui) console.BackgroundColor3 = Color3.new() console.Size = UDim2.new(1, 0, 1, 0) console.ScrollBarImageColor3 = Color3.new(1, 1, 1) console.CanvasSize = UDim2.new(0, 0, 0, 0) local console_layout = Instance.new('UIListLayout', console) do local pixels = 0 console.ChildAdded:Connect(function(c) wait() c.Size = UDim2.new(1, 0, 1, 0) pixels += c.TextBounds.Y local tb = c.TextBounds c.Size = UDim2.new(0, tb.X, 0, tb.Y) console.CanvasSize = UDim2.new(0, 0, 0, pixels) console.CanvasPosition = Vector2.new(0, pixels) c.Changed:Connect(function(p) if p == "Text" or p == "PlaceholderText" then c.Size = UDim2.new(1, 0, 1, 0) pixels += c.TextBounds.Y local tb = c.TextBounds c.Size = UDim2.new(0, tb.X, 0, tb.Y) console.CanvasSize = UDim2.new(0, 0, 0, pixels) console.CanvasPosition = Vector2.new(0, pixels) end end) end) end local log = function(text) local tl = Instance.new('TextLabel', console) tl.Name = "LOG" tl.TextSize = 16 tl.FontFace = Font.new("rbxasset://fonts/families/PressStart2P.json") tl.RichText = true tl.Text = text tl.BackgroundTransparency = 1 tl.TextColor3 = Color3.new(1, 1, 1) tl.BorderSizePixel = 0 return { SetText = function(self, t)tl.Text = t end } end local input = function(text) local tl = Instance.new('TextBox', console) tl.Name = "INPUT" tl.TextSize = 16 tl.FontFace = Font.new("rbxasset://fonts/families/PressStart2P.json") tl.RichText = true tl.PlaceholderText = text tl.BackgroundTransparency = 1 tl.TextColor3 = Color3.new(1, 1, 1) tl.BorderSizePixel = 0 tl.PlaceholderColor3 = Color3.new(1,1,1) for i = 1, math.huge do local ep,io = tl.FocusLost:Wait() if not ep then continue else return tl.Text end end end local newFuncs = function(data) wdow.Log = data.Log wdow.Input = data.Input wdow.Destroy = data.Destroy wdow.Clear = data.Clear end log('LightCyan CLI: Loaded on '.. Config.Name) log(pc and "Press J To Open or Close LightCyan CLI." or "Click the J Button to Open or Close LightCyan CLI.") if Config.KeySystemEnabled then local key = input('Key for '.. Config.Name ..': ') if not table.find(Config.Keys, key, 1) then log('INVALID KEY! ABORTING.') else end end local function clear() for _, v in pairs(console:GetChildren()) do if v:IsA('TextBox') or v:IsA('TextLabel') then v:Destroy() end end end local function destroy() log = function(...) end input = function(...) end destroy = function(...) end clear = function(...) end gui:Destroy() end newFuncs({ Log = log, Input = input, Destroy = destroy, Clear = clear, }) if pc then uis.InputBegan:Connect(function(key) if key == Enum.KeyCode.J then console.Visible = not console.Visible end end) end return wdow end return lcyan