local screengui = Instance.new("ScreenGui") local frame = Instance.new("Frame") local container = Instance.new("Frame") local scroll = Instance.new("ScrollingFrame") local lf = Instance.new("Frame") local ll = Instance.new("TextLabel") local display = Instance.new("TextLabel") local editor = Instance.new("TextBox") local execute = Instance.new("TextButton") local uicorner = Instance.new("UICorner") local play = Instance.new("ImageLabel") local indicator = Instance.new("TextLabel") local caret = Instance.new("Frame") local uis = game:GetService("UserInputService") local ts = game:GetService("TextService") local rs = game:GetService("RunService") screengui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") screengui.ResetOnSpawn = false screengui.Name = "aurora" frame.Parent = screengui frame.BackgroundColor3 = Color3.fromRGB(0,0,0) frame.BorderSizePixel = 0 frame.Position = UDim2.new(0.5,-250,0.5,-160) frame.Size = uis.TouchEnabled and not uis.KeyboardEnabled and UDim2.new(0,420,0,260) or UDim2.new(0,580,0,380) frame.ClipsDescendants = true container.Parent = frame container.BackgroundColor3 = Color3.fromRGB(10,10,12) container.BorderSizePixel = 0 container.Position = UDim2.new(0,10,0,45) container.Size = UDim2.new(1,-20,1,-60) container.ClipsDescendants = true lf.Parent = container lf.BackgroundColor3 = Color3.fromRGB(0,0,0) lf.BorderSizePixel = 0 lf.Position = UDim2.new(0,0,0,0) lf.Size = UDim2.new(0,36,1,0) ll.Parent = lf ll.BackgroundTransparency = 1 ll.Position = UDim2.new(0,0,0,5) ll.Size = UDim2.new(1,-4,0,19) ll.Font = Enum.Font.Code ll.Text = "1" ll.TextColor3 = Color3.fromRGB(90,90,100) ll.TextSize = 14 ll.TextXAlignment = Enum.TextXAlignment.Right ll.TextYAlignment = Enum.TextYAlignment.Top ll.RichText = false scroll.Parent = container scroll.BackgroundTransparency = 1 scroll.BorderSizePixel = 0 scroll.Position = UDim2.new(0,36,0,0) scroll.Size = UDim2.new(1,-36,1,0) scroll.ScrollBarThickness = 4 scroll.ScrollBarImageColor3 = Color3.fromRGB(80,80,90) scroll.CanvasSize = UDim2.new(0,0,0,0) scroll.AutomaticCanvasSize = Enum.AutomaticSize.Y scroll.ElasticBehavior = Enum.ElasticBehavior.Never scroll.VerticalScrollBarInset = Enum.ScrollBarInset.ScrollBar scroll.ScrollingDirection = Enum.ScrollingDirection.Y display.Parent = scroll display.BackgroundTransparency = 1 display.Position = UDim2.new(0,5,0,5) display.Size = UDim2.new(1,-10,0,19) display.AutomaticSize = Enum.AutomaticSize.Y display.Font = Enum.Font.Code display.Text = "" display.TextColor3 = Color3.fromRGB(220,220,220) display.TextSize = 14 display.TextXAlignment = Enum.TextXAlignment.Left display.TextYAlignment = Enum.TextYAlignment.Top display.TextWrapped = false display.RichText = true editor.Parent = scroll editor.BackgroundTransparency = 1 editor.Position = UDim2.new(0,5,0,5) editor.Size = UDim2.new(1,-10,0,19) editor.AutomaticSize = Enum.AutomaticSize.Y editor.ClearTextOnFocus = false editor.Font = Enum.Font.Code editor.MultiLine = true editor.Text = "" editor.TextColor3 = Color3.fromRGB(255,255,255) editor.TextSize = 14 editor.TextTransparency = 0.95 editor.TextXAlignment = Enum.TextXAlignment.Left editor.TextYAlignment = Enum.TextYAlignment.Top editor.TextWrapped = false execute.Parent = frame execute.BackgroundColor3 = Color3.fromRGB(255,255,255) execute.BackgroundTransparency = 0.98 execute.Position = UDim2.new(1,-50,0,5) execute.Size = UDim2.new(0,40,0,35) execute.Text = "" uicorner.CornerRadius = UDim.new(0,4) uicorner.Parent = execute play.Name = "play" play.Parent = execute play.BackgroundTransparency = 1 play.Position = UDim2.new(0.5,-13,0.5,-14) play.Size = UDim2.new(0,27,0,28) play.Image = "rbxassetid://16884178261" play.ImageRectOffset = Vector2.new(152,304) play.ImageRectSize = Vector2.new(36,36) indicator.Parent = frame indicator.BackgroundTransparency = 1 indicator.Position = UDim2.new(0,10,1,-18) indicator.Size = UDim2.new(0,80,0,14) indicator.Font = Enum.Font.Code indicator.Text = "Ln 1" indicator.TextColor3 = Color3.fromRGB(90,90,100) indicator.TextSize = 12 indicator.TextXAlignment = Enum.TextXAlignment.Left indicator.TextYAlignment = Enum.TextYAlignment.Center caret.Parent = scroll caret.BackgroundColor3 = Color3.fromRGB(220,220,220) caret.BorderSizePixel = 0 caret.Size = UDim2.new(0,1,0,16) caret.Position = UDim2.new(0,5,0,6) caret.Visible = false caret.ZIndex = 5 local lh = 19 local pad = 5 local kw = { "local","function","return","if","then","else","elseif", "end","while","for","do","in","repeat","until", "nil","true","false","not","and","or","break" } local ks = {} for _,k in ipairs(kw) do ks[k]=true end local function col(rgb,s) return ''..s..'' end local function highlight(code) local res = {} local i = 1 local len = #code while i<=len do local ch = code:sub(i,i) if code:sub(i,i+3)=="--[[" then local e = code:find("%]%]",i+4) local tok = e and code:sub(i,e+1) or code:sub(i) res[#res+1] = col("120,120,120",tok:gsub("&","&"):gsub("<","<"):gsub(">",">")) i = i+#tok elseif code:sub(i,i+1)=="--" then local e = code:find("\n",i+2,true) local tok = e and code:sub(i,e-1) or code:sub(i) res[#res+1] = col("120,120,120",tok:gsub("&","&"):gsub("<","<"):gsub(">",">")) i = i+#tok elseif code:sub(i,i+1)=="[[" then local e = code:find("%]%]",i+2) local tok = e and code:sub(i,e+1) or code:sub(i) res[#res+1] = col("150,200,150",tok:gsub("&","&"):gsub("<","<"):gsub(">",">")) i = i+#tok elseif ch=='"' then local j = i+1 while j<=len and code:sub(j,j)~='"' and code:sub(j,j)~="\n" do j=j+1 end res[#res+1] = col("150,200,150",code:sub(i,j):gsub("&","&"):gsub("<","<"):gsub(">",">")) i = j+1 elseif ch=="'" then local j = i+1 while j<=len and code:sub(j,j)~="'" and code:sub(j,j)~="\n" do j=j+1 end res[#res+1] = col("150,200,150",code:sub(i,j):gsub("&","&"):gsub("<","<"):gsub(">",">")) i = j+1 elseif ch:match("[%a_]") then local _,e,word = code:find("^([%a_][%w_]*)",i) local peek = code:sub(e+1):match("^%s*%(") if ks[word] then res[#res+1] = col("200,120,220",word) elseif peek then res[#res+1] = col("100,180,255",word) else res[#res+1] = word end i = e+1 elseif ch:match("%d") or (ch=="." and code:sub(i+1,i+1):match("%d")) then local _,e,num = code:find("^(%d+%.?%d*)",i) if num then res[#res+1] = col("255,180,100",num) i = e+1 else res[#res+1] = ch i = i+1 end elseif ch:match("[%+%-%*/%^%%~#]") then res[#res+1] = col("180,180,180",ch) i = i+1 elseif ch=="&" then res[#res+1] = "&" i = i+1 elseif ch=="<" then res[#res+1] = "<" i = i+1 elseif ch==">" then res[#res+1] = ">" i = i+1 else res[#res+1] = ch i = i+1 end end return table.concat(res) end local function updlines(text) local n = 1 for _ in text:gmatch("\n") do n=n+1 end local t = {} for i=1,n do t[i]=tostring(i) end ll.Text = table.concat(t,"\n") ll.Size = UDim2.new(1,-4,0,n*lh+pad) end local function getlineandcol(text,cur) local before = text:sub(1,cur-1) local ln = 1 local lastbreak = 0 for pos in before:gmatch("()\n") do ln = ln+1 lastbreak = pos end return ln,cur-lastbreak end local function updcaret() local cur = editor.CursorPosition if cur<0 or not editor:IsFocused() then caret.Visible = false return end local text = editor.Text local ln,c = getlineandcol(text,cur) local lines = {} for line in (text.."\n"):gmatch("([^\n]*)\n") do lines[#lines+1] = line end local currentline = lines[ln] or "" local beforecursor = currentline:sub(1,c-1) local xoff = pad+ts:GetTextSize(beforecursor,14,Enum.Font.Code,Vector2.new(9999,9999)).X local yoff = pad+(ln-1)*lh+2 caret.Position = UDim2.new(0,xoff,0,yoff) caret.Visible = true indicator.Text = "Ln "..ln end editor:GetPropertyChangedSignal("Text"):Connect(function() local text = editor.Text display.Text = highlight(text) updlines(text) updcaret() end) editor:GetPropertyChangedSignal("CursorPosition"):Connect(updcaret) editor.Focused:Connect(function() updcaret() end) editor.FocusLost:Connect(function() caret.Visible = false end) local blink = 0 local blinkrate = 0.8 rs.Heartbeat:Connect(function(dt) if not editor:IsFocused() then return end blink = blink+dt if blink>=blinkrate then blink=blink-blinkrate end caret.BackgroundTransparency = blink<(blinkrate/2) and 0 or 1 end) scroll:GetPropertyChangedSignal("CanvasPosition"):Connect(function() ll.Position = UDim2.new(0,0,0,pad-scroll.CanvasPosition.Y) end) local d,s,p frame.InputBegan:Connect(function(input) if input.UserInputType==Enum.UserInputType.MouseButton1 or input.UserInputType==Enum.UserInputType.Touch then if not editor:IsFocused() then d=true s=input.Position p=frame.Position end end end) uis.InputChanged:Connect(function(input) if d and (input.UserInputType==Enum.UserInputType.MouseMovement or input.UserInputType==Enum.UserInputType.Touch) then local delta = input.Position-s frame.Position = UDim2.new(p.X.Scale,p.X.Offset+delta.X,p.Y.Scale,p.Y.Offset+delta.Y) end end) uis.InputEnded:Connect(function(input) if input.UserInputType==Enum.UserInputType.MouseButton1 or input.UserInputType==Enum.UserInputType.Touch then d=false end end) execute.MouseButton1Click:Connect(function() loadstring(editor.Text)() end)