-- Modern Custom Script Hub (Fixed Naming Conflict) local CoreGui = game:GetService("CoreGui") local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local RunService = game:GetService("RunService") -- Clean up any existing instance using a unique name if CoreGui:FindFirstChild("MyUniqueDeltaHub_v1") then CoreGui.MyUniqueDeltaHub_v1:Destroy() end -- Main ScreenGui container with a unique name to prevent game clashes local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "MyUniqueDeltaHub_v1" ScreenGui.Parent = CoreGui ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling ScreenGui.IgnoreGuiInset = true -- --- FLOATING TOGGLE BUTTON --- local ToggleBtn = Instance.new("TextButton") ToggleBtn.Name = "ToggleBtn" ToggleBtn.Size = UDim2.new(0, 50, 0, 50) ToggleBtn.Position = UDim2.new(0, 15, 0.35, 0) ToggleBtn.BackgroundColor3 = Color3.fromRGB(28, 28, 34) ToggleBtn.Font = Enum.Font.GothamBold ToggleBtn.Text = "Δ" ToggleBtn.TextColor3 = Color3.fromRGB(255, 255, 255) ToggleBtn.TextSize = 20 ToggleBtn.BorderSizePixel = 0 ToggleBtn.ZIndex = 999 ToggleBtn.Parent = ScreenGui local ToggleCorner = Instance.new("UICorner") ToggleCorner.CornerRadius = UDim.new(0, 12) ToggleCorner.Parent = ToggleBtn local ToggleStroke = Instance.new("UIStroke") ToggleStroke.Color = Color3.fromRGB(70, 130, 240) ToggleStroke.Thickness = 2 ToggleStroke.Parent = ToggleBtn -- --- MAIN WINDOW FRAME --- local MainFrame = Instance.new("Frame") MainFrame.Name = "MainFrame" MainFrame.Size = UDim2.new(0, 520, 0, 340) MainFrame.Position = UDim2.new(0.5, -260, 0.5, -170) MainFrame.BackgroundColor3 = Color3.fromRGB(22, 22, 26) MainFrame.BorderSizePixel = 0 MainFrame.ZIndex = 100 MainFrame.Parent = ScreenGui local UiScale = Instance.new("UIScale") UiScale.Scale = 1 UiScale.Parent = MainFrame local MainCorner = Instance.new("UICorner") MainCorner.CornerRadius = UDim.new(0, 10) MainCorner.Parent = MainFrame local MainStroke = Instance.new("UIStroke") MainStroke.Color = Color3.fromRGB(45, 45, 55) MainStroke.Thickness = 1.5 MainStroke.Parent = MainFrame -- Top Bar (Draggable Header) local TopBar = Instance.new("Frame") TopBar.Name = "TopBar" TopBar.Size = UDim2.new(1, 0, 0, 40) TopBar.BackgroundColor3 = Color3.fromRGB(28, 28, 34) TopBar.BorderSizePixel = 0 TopBar.ZIndex = 101 TopBar.Parent = MainFrame local TopBarCorner = Instance.new("UICorner") TopBarCorner.CornerRadius = UDim.new(0, 10) TopBarCorner.Parent = TopBar local TopBarFix = Instance.new("Frame") TopBarFix.Size = UDim2.new(1, 0, 0, 10) TopBarFix.Position = UDim2.new(0, 0, 1, -10) TopBarFix.BackgroundColor3 = Color3.fromRGB(28, 28, 34) TopBarFix.BorderSizePixel = 0 TopBarFix.ZIndex = 101 TopBarFix.Parent = TopBar -- Title Text local Title = Instance.new("TextLabel") Title.Size = UDim2.new(0, 200, 1, 0) Title.Position = UDim2.new(0, 15, 0, 0) Title.BackgroundTransparency = 1 Title.Font = Enum.Font.GothamBold Title.Text = "Better Delta UI" Title.TextColor3 = Color3.fromRGB(240, 240, 245) Title.TextSize = 14 Title.TextXAlignment = Enum.TextXAlignment.Left Title.ZIndex = 102 Title.Parent = TopBar -- Close Button (Minimizes Window) local CloseBtn = Instance.new("TextButton") CloseBtn.Size = UDim2.new(0, 30, 0, 30) CloseBtn.Position = UDim2.new(1, -35, 0.5, -15) CloseBtn.BackgroundColor3 = Color3.fromRGB(235, 70, 70) CloseBtn.Text = "-" CloseBtn.TextColor3 = Color3.fromRGB(255, 255, 255) CloseBtn.Font = Enum.Font.GothamBold CloseBtn.TextSize = 18 CloseBtn.ZIndex = 102 CloseBtn.Parent = TopBar local CloseCorner = Instance.new("UICorner") CloseCorner.CornerRadius = UDim.new(0, 6) CloseCorner.Parent = CloseBtn -- Script Editor Text Box local EditorContainer = Instance.new("ScrollingFrame") EditorContainer.Size = UDim2.new(1, -30, 1, -100) EditorContainer.Position = UDim2.new(0, 15, 0, 50) EditorContainer.BackgroundColor3 = Color3.fromRGB(16, 16, 20) EditorContainer.BorderSizePixel = 0 EditorContainer.CanvasSize = UDim2.new(0, 0, 2, 0) EditorContainer.ScrollBarThickness = 4 EditorContainer.ZIndex = 101 EditorContainer.Parent = MainFrame local EditorCorner = Instance.new("UICorner") EditorCorner.CornerRadius = UDim.new(0, 6) EditorCorner.Parent = EditorContainer local ScriptBox = Instance.new("TextBox") ScriptBox.Size = UDim2.new(1, -20, 1, -20) ScriptBox.Position = UDim2.new(0, 10, 0, 10) ScriptBox.BackgroundTransparency = 1 ScriptBox.MultiLine = true ScriptBox.ClearTextOnFocus = false ScriptBox.Font = Enum.Font.Code ScriptBox.PlaceholderText = "-- Paste your Lua script here..." ScriptBox.Text = "" ScriptBox.TextColor3 = Color3.fromRGB(220, 220, 230) ScriptBox.TextSize = 13 ScriptBox.TextXAlignment = Enum.TextXAlignment.Left ScriptBox.TextYAlignment = Enum.TextYAlignment.Top ScriptBox.ZIndex = 102 ScriptBox.Parent = EditorContainer -- Bottom Action Bar local ActionBar = Instance.new("Frame") ActionBar.Size = UDim2.new(1, -30, 0, 35) ActionBar.Position = UDim2.new(0, 15, 1, -45) ActionBar.BackgroundTransparency = 1 ActionBar.ZIndex = 101 ActionBar.Parent = MainFrame -- Execute Button local ExecuteBtn = Instance.new("TextButton") ExecuteBtn.Size = UDim2.new(0.48, 0, 1, 0) ExecuteBtn.BackgroundColor3 = Color3.fromRGB(70, 130, 240) ExecuteBtn.Font = Enum.Font.GothamBold ExecuteBtn.Text = "Execute" ExecuteBtn.TextColor3 = Color3.fromRGB(255, 255, 255) ExecuteBtn.TextSize = 13 ExecuteBtn.ZIndex = 102 ExecuteBtn.Parent = ActionBar local ExecCorner = Instance.new("UICorner") ExecCorner.CornerRadius = UDim.new(0, 6) ExecCorner.Parent = ExecuteBtn ExecuteBtn.MouseButton1Click:Connect(function() local success, err = pcall(function() local func = loadstring(ScriptBox.Text) if func then func() end end) if not success then warn("Execution Error: " .. tostring(err)) end end) -- Clear Button local ClearBtn = Instance.new("TextButton") ClearBtn.Size = UDim2.new(0.48, 0, 1, 0) ClearBtn.Position = UDim2.new(0.52, 0, 0, 0) ClearBtn.BackgroundColor3 = Color3.fromRGB(45, 45, 55) ClearBtn.Font = Enum.Font.GothamBold ClearBtn.Text = "Clear" ClearBtn.TextColor3 = Color3.fromRGB(255, 255, 255) ClearBtn.TextSize = 13 ClearBtn.ZIndex = 102 ClearBtn.Parent = ActionBar local ClearCorner = Instance.new("UICorner") ClearCorner.CornerRadius = UDim.new(0, 6) ClearCorner.Parent = ClearBtn ClearBtn.MouseButton1Click:Connect(function() ScriptBox.Text = "" end) -- --- STARTUP NOTIFICATION TOAST --- local Notification = Instance.new("Frame") Notification.Size = UDim2.new(0, 260, 0, 45) Notification.Position = UDim2.new(0.5, -130, 0, -60) Notification.BackgroundColor3 = Color3.fromRGB(28, 28, 34) Notification.BorderSizePixel = 0 Notification.ZIndex = 2000 Notification.Parent = ScreenGui local NotifCorner = Instance.new("UICorner") NotifCorner.CornerRadius = UDim.new(0, 8) NotifCorner.Parent = Notification local NotifStroke = Instance.new("UIStroke") NotifStroke.Color = Color3.fromRGB(70, 130, 240) NotifStroke.Thickness = 1.5 NotifStroke.Parent = Notification local NotifText = Instance.new("TextLabel") NotifText.Size = UDim2.new(1, 0, 1, 0) NotifText.BackgroundTransparency = 1 NotifText.Font = Enum.Font.GothamBold NotifText.Text = "✨ Better Delta Loaded!" NotifText.TextColor3 = Color3.fromRGB(255, 255, 255) NotifText.TextSize = 13 NotifText.ZIndex = 2001 NotifText.Parent = Notification task.spawn(function() Notification:TweenPosition(UDim2.new(0.5, -130, 0, 20), Enum.EasingDirection.Out, Enum.EasingStyle.Back, 0.5, true) task.wait(2.5) Notification:TweenPosition(UDim2.new(0.5, -130, 0, -60), Enum.EasingDirection.In, Enum.EasingStyle.Quad, 0.4, true) end) -- --- ANIMATION & TOGGLE LOGIC --- local isOpen = true local tweenInfo = TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out) local closeTweenInfo = TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.In) local function toggleUI() if isOpen then local tween = TweenService:Create(UiScale, closeTweenInfo, {Scale = 0}) tween:Play() tween.Completed:Connect(function() if not isOpen then MainFrame.Visible = false end end) isOpen = false else MainFrame.Visible = true local tween = TweenService:Create(UiScale, tweenInfo, {Scale = 1}) tween:Play() isOpen = true end end CloseBtn.MouseButton1Click:Connect(toggleUI) -- --- DRAGGABLE LOGIC FOR MAIN WINDOW --- local mainDragging, mainDragInput, mainDragStart, mainStartPos TopBar.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then mainDragging = true mainDragStart = input.Position mainStartPos = MainFrame.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then mainDragging = false end end) end end) UserInputService.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then mainDragInput = input end end) RunService.RenderStepped:Connect(function() if mainDragging and mainDragInput then local delta = mainDragInput.Position - mainDragStart MainFrame.Position = UDim2.new(mainStartPos.X.Scale, mainStartPos.X.Offset + delta.X, mainStartPos.Y.Scale, mainStartPos.Y.Offset + delta.Y) end end) -- --- DRAGGABLE LOGIC FOR FLOATING TOGGLE BUTTON --- local toggleDragging, toggleDragInput, toggleDragStart, toggleStartPos local distanceMoved = 0 ToggleBtn.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then toggleDragging = true distanceMoved = 0 toggleDragStart = input.Position toggleStartPos = ToggleBtn.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then toggleDragging = false if distanceMoved < 10 then toggleUI() end end end) end end) UserInputService.InputChanged:Connect(function(input) if toggleDragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then toggleDragInput = input local currentDelta = input.Position - toggleDragStart distanceMoved = math.abs(currentDelta.X) + math.abs(currentDelta.Y) end end) RunService.RenderStepped:Connect(function() if toggleDragging and toggleDragInput then local delta = toggleDragInput.Position - toggleDragStart ToggleBtn.Position = UDim2.new(toggleStartPos.X.Scale, toggleStartPos.X.Offset + delta.X, toggleStartPos.Y.Scale, toggleStartPos.Y.Offset + delta.Y) end end)