-- BLACK DELTA EDITOR -- ADVANCED ORB RESTORE SYSTEM local CoreGui = game:GetService("CoreGui") local UIS = game:GetService("UserInputService") local RunService = game:GetService("RunService") local TweenService = game:GetService("TweenService") local old = CoreGui:FindFirstChild("BlackDeltaEditor") if old then old:Destroy() end local GUI = Instance.new("ScreenGui") GUI.Name = "BlackDeltaEditor" GUI.ResetOnSpawn = false GUI.IgnoreGuiInset = true GUI.DisplayOrder = 999 GUI.Parent = CoreGui local function New(class,props,parent) local obj = Instance.new(class) for k,v in pairs(props) do obj[k] = v end obj.Parent = parent return obj end local function Round(obj,r) New("UICorner",{ CornerRadius = UDim.new(0,r) },obj) end local function Stroke(obj,color,thickness) New("UIStroke",{ Color = color, Thickness = thickness },obj) end local function Tween(obj,properties,time) local t = TweenService:Create( obj, TweenInfo.new(time or .3,Enum.EasingStyle.Quint,Enum.EasingDirection.Out), properties ) t:Play() return t end local BLACK = Color3.fromRGB(9,9,11) local DARK = Color3.fromRGB(18,18,21) local WHITE = Color3.fromRGB(245,245,250) local GRAY = Color3.fromRGB(110,110,120) local GREEN = Color3.fromRGB(65,205,135) local RED = Color3.fromRGB(240,80,90) local Connections = {} local Activated = false local Hidden = false local OrbStarted = false local Rotation = 0 local function Connect(c) table.insert(Connections,c) return c end -- MAIN WINDOW local Main = New("Frame",{ Name = "EditorWindow", Size = UDim2.fromOffset(300,350), Position = UDim2.new(.5,-150,.5,-175), BackgroundColor3 = BLACK, BorderSizePixel = 0, Active = true },GUI) Round(Main,11) Stroke(Main,Color3.fromRGB(55,55,65),1) -- HEADER local Header = New("Frame",{ Size = UDim2.new(1,0,0,30), BackgroundColor3 = DARK, BorderSizePixel = 0 },Main) Round(Header,9) local Hide = New("TextButton",{ Size = UDim2.fromOffset(25,24), Position = UDim2.new(1,-58,0,3), BackgroundColor3 = Color3.fromRGB(38,38,43), Text = "−", TextColor3 = WHITE, TextSize = 20, Font = Enum.Font.GothamBold },Header) Round(Hide,6) local Close = New("TextButton",{ Size = UDim2.fromOffset(25,24), Position = UDim2.new(1,-29,0,3), BackgroundColor3 = Color3.fromRGB(55,25,30), Text = "×", TextColor3 = WHITE, TextSize = 18, Font = Enum.Font.GothamBold },Header) Round(Close,6) -- DRAG SYSTEM local Dragging = false local DragStart local OriginalPosition Connect(Header.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then Dragging = true DragStart = input.Position OriginalPosition = Main.Position end end)) Connect(UIS.InputChanged:Connect(function(input) if not Dragging then return end if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement then local delta = input.Position - DragStart Main.Position = UDim2.new( OriginalPosition.X.Scale, OriginalPosition.X.Offset + delta.X, OriginalPosition.Y.Scale, OriginalPosition.Y.Offset + delta.Y ) end end)) Connect(UIS.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then Dragging = false end end)) -- EDITOR local EditorFrame = New("Frame",{ Position = UDim2.fromOffset(9,40), Size = UDim2.new(1,-18,1,-100), BackgroundColor3 = DARK, BorderSizePixel = 0, ClipsDescendants = true },Main) Round(EditorFrame,7) Stroke(EditorFrame,Color3.fromRGB(40,40,48),1) local Scroll = New("ScrollingFrame",{ Size = UDim2.fromScale(1,1), BackgroundTransparency = 1, BorderSizePixel = 0, ScrollBarThickness = 4, ScrollBarImageColor3 = GRAY, CanvasSize = UDim2.fromOffset(0,0) },EditorFrame) local Numbers = New("TextLabel",{ Position = UDim2.fromOffset(0,8), Size = UDim2.new(0,30,0,30), BackgroundTransparency = 1, Text = "1", TextColor3 = GRAY, TextSize = 12, Font = Enum.Font.Code, TextYAlignment = Enum.TextYAlignment.Top },Scroll) local Editor = New("TextBox",{ Position = UDim2.fromOffset(35,8), Size = UDim2.new(1,-42,0,30), BackgroundTransparency = 1, Text = "-- Write Lua code here", TextColor3 = WHITE, PlaceholderText = "-- Script", PlaceholderColor3 = GRAY, TextSize = 12, Font = Enum.Font.Code, TextXAlignment = Enum.TextXAlignment.Left, TextYAlignment = Enum.TextYAlignment.Top, ClearTextOnFocus = false, MultiLine = true, TextWrapped = false },Scroll) local function UpdateLines() local count = 1 for _ in Editor.Text:gmatch("\n") do count += 1 end local height = math.max(30,count*17+15) local lines = table.create(count) for i = 1,count do lines[i] = tostring(i) end Numbers.Text = table.concat(lines,"\n") Numbers.Size = UDim2.new(0,30,0,height) Editor.Size = UDim2.new(1,-42,0,height) Scroll.CanvasSize = UDim2.fromOffset(0,height+20) end Connect(Editor:GetPropertyChangedSignal("Text"):Connect(UpdateLines)) UpdateLines() -- STATUS local Status = New("TextLabel",{ Position = UDim2.new(0,10,1,-53), Size = UDim2.new(1,-20,0,16), BackgroundTransparency = 1, Text = "LOCKED / WAITING", TextColor3 = GRAY, TextSize = 10, Font = Enum.Font.Code, TextXAlignment = Enum.TextXAlignment.Left },Main) local function SetStatus(text,color) Status.Text = text Status.TextColor3 = color end -- BUTTON FACTORY local function MakeButton(text,x,width,color) local b = New("TextButton",{ Position = UDim2.new(0,x,1,-30), Size = UDim2.fromOffset(width,25), BackgroundColor3 = color, Text = text, TextColor3 = WHITE, TextSize = 10, Font = Enum.Font.GothamBold, BorderSizePixel = 0 },Main) Round(b,5) return b end local Activate = MakeButton( "ACTIVATE",10,88,Color3.fromRGB(42,42,48) ) local Execute = MakeButton( "▶ RUN",106,82,Color3.fromRGB(35,95,65) ) local Clear = MakeButton( "CLEAR",196,94,Color3.fromRGB(42,42,48) ) -- ORB local Orb = New("Frame",{ Name = "RestoreOrb", Size = UDim2.fromOffset(46,46), Position = UDim2.new(1,-60,1,-60), BackgroundColor3 = WHITE, BorderSizePixel = 0, Visible = false, ZIndex = 20 },GUI) Round(Orb,100) Stroke(Orb,WHITE,1.5) local Gradient = New("UIGradient",{ Rotation = 0, Color = ColorSequence.new({ ColorSequenceKeypoint.new(0,Color3.fromRGB(0,0,0)), ColorSequenceKeypoint.new(.5,Color3.fromRGB(80,80,80)), ColorSequenceKeypoint.new(1,Color3.fromRGB(255,255,255)) }) },Orb) local OrbButton = New("TextButton",{ Size = UDim2.fromScale(1,1), BackgroundTransparency = 1, Text = "", ZIndex = 25, AutoButtonColor = false },Orb) -- ACTIVATE ONCE local function ActivateSystem() if OrbStarted then return end Activated = true OrbStarted = true Activate.Visible = false SetStatus("ACTIVATED / READY",GREEN) Orb.Visible = true Orb.Size = UDim2.fromOffset(0,0) Tween(Orb,{ Size = UDim2.fromOffset(46,46) },.45) Connect(RunService.RenderStepped:Connect(function(dt) Rotation = (Rotation + dt*160)%360 Gradient.Rotation = Rotation end)) end Connect(Activate.MouseButton1Click:Connect(ActivateSystem)) -- HIDE PANEL local function HidePanel() if Hidden then return end Hidden = true Main.Visible = false SetStatus("PANEL HIDDEN",WHITE) end -- RESTORE PANEL BY ORB local function RestorePanel() if not Activated then return end Hidden = false Main.Visible = true Tween(Main,{ Position = UDim2.new(.5,-150,.5,-175) },.35) end Connect(Hide.MouseButton1Click:Connect(HidePanel)) Connect(OrbButton.MouseButton1Click:Connect(function() if Hidden then RestorePanel() end end)) -- EXECUTION GATE Connect(Execute.MouseButton1Click:Connect(function() if not Activated then SetStatus("ACTIVATE FIRST",Color3.fromRGB(255,180,80)) return end if Editor.Text:gsub("%s","") == "" then SetStatus("EMPTY SCRIPT",RED) return end if type(loadstring) ~= "function" then SetStatus("LOADSTRING UNSUPPORTED",RED) return end SetStatus("COMPILING...",Color3.fromRGB(255,190,80)) local fn,err = loadstring(Editor.Text) if not fn then SetStatus("COMPILE ERROR",RED) warn(err) return end local success,result = pcall(fn) if success then SetStatus("EXECUTED SUCCESSFULLY",GREEN) else SetStatus("RUNTIME ERROR",RED) warn(result) end end)) -- CLEAR Connect(Clear.MouseButton1Click:Connect(function() Editor.Text = "" SetStatus("EDITOR CLEARED",WHITE) end)) -- CLOSE Connect(Close.MouseButton1Click:Connect(function() for _,connection in ipairs(Connections) do pcall(function() connection:Disconnect() end) end GUI:Destroy() end))