T4RGET custom Library SORRY IF IS AI
Key RequiredUniversal

T4RGET custom Library SORRY IF IS AI

Universal Scriptilove_deltaexecutor0ilove_deltaexecutor0 86 views 4 executesUpdated Jun 24, 2026
Unrated
00
Lua Script•506 lines (19997 chars)
local Library = {}
local TweenService = game:GetService("TweenService")
local UserInputService = game:GetService("UserInputService")
local CoreGui = game:GetService("CoreGui")
local Players = game:GetService("Players")

-- Detect environment (Studio vs External Executor)
local ParentGui = game:GetService("RunService"):IsStudio() and Players.LocalPlayer:WaitForChild("PlayerGui") or CoreGui

-- Base Colors
local Colors = {
    Background = Color3.fromRGB(25, 25, 25),
    TopBar = Color3.fromRGB(35, 35, 35),
    TabMenu = Color3.fromRGB(30, 30, 30),
    Accent = Color3.fromRGB(85, 170, 255), -- Default Accent
    Text = Color3.fromRGB(255, 255, 255),
    Element = Color3.fromRGB(45, 45, 45),
    ToggleOn = Color3.fromRGB(85, 255, 127),
    ToggleOff = Color3.fromRGB(255, 80, 80)
}

-- Editable Color Themes Dictionary
local Themes = {
    Default = Color3.fromRGB(85, 170, 255),
    Red = Color3.fromRGB(255, 80, 80),
    Orange = Color3.fromRGB(255, 150, 50),
    Yellow = Color3.fromRGB(255, 255, 80),
    Green = Color3.fromRGB(80, 255, 80),
    Blue = Color3.fromRGB(80, 80, 255)
}

function Library:CreateWindow(titleText)
    local WindowInfo = {
        ActiveTabBtn = nil,
        Tabs = {}
    }
    
    local ScreenGui = Instance.new("ScreenGui")
    ScreenGui.Name = "T4RGET_UI"
    ScreenGui.ResetOnSpawn = false
    ScreenGui.Parent = ParentGui

    -- ==========================================
    -- NOTIFICATION SYSTEM CONTAINER
    -- ==========================================
    local NotificationContainer = Instance.new("Frame")
    NotificationContainer.Name = "NotificationContainer"
    NotificationContainer.Size = UDim2.new(0, 250, 1, -20)
    NotificationContainer.Position = UDim2.new(1, -270, 0, 10)
    NotificationContainer.BackgroundTransparency = 1
    NotificationContainer.Parent = ScreenGui

    local NotifLayout = Instance.new("UIListLayout")
    NotifLayout.SortOrder = Enum.SortOrder.LayoutOrder
    NotifLayout.VerticalAlignment = Enum.VerticalAlignment.Bottom
    NotifLayout.Padding = UDim.new(0, 10)
    NotifLayout.Parent = NotificationContainer

    function WindowInfo:Notify(title, text, duration)
        duration = duration or 3

        -- Wrapper for smooth animation inside UIListLayout
        local Wrapper = Instance.new("Frame")
        Wrapper.Size = UDim2.new(1, 0, 0, 70)
        Wrapper.BackgroundTransparency = 1
        Wrapper.Parent = NotificationContainer

        local NotifFrame = Instance.new("Frame")
        NotifFrame.Size = UDim2.new(1, 0, 1, 0)
        NotifFrame.Position = UDim2.new(1, 50, 0, 0) -- Starts off-screen to the right
        NotifFrame.BackgroundColor3 = Colors.Element
        NotifFrame.Parent = Wrapper
        Instance.new("UICorner", NotifFrame).CornerRadius = UDim.new(0, 6)

        -- Accent Line to match theme
        local AccentLine = Instance.new("Frame")
        AccentLine.Size = UDim2.new(0, 4, 1, 0)
        AccentLine.BackgroundColor3 = Colors.Accent
        AccentLine.BorderSizePixel = 0
        AccentLine.Parent = NotifFrame
        Instance.new("UICorner", AccentLine).CornerRadius = UDim.new(0, 6)
        
        -- Fix corner bleeding for the line
        local LineFix = Instance.new("Frame")
        LineFix.Size = UDim2.new(0, 4, 1, 0)
        LineFix.Position = UDim2.new(0, 2, 0, 0)
        LineFix.BackgroundColor3 = Colors.Accent
        LineFix.BorderSizePixel = 0
        LineFix.Parent = AccentLine

        local NotifTitle = Instance.new("TextLabel")
        NotifTitle.Size = UDim2.new(1, -20, 0, 25)
        NotifTitle.Position = UDim2.new(0, 15, 0, 5)
        NotifTitle.BackgroundTransparency = 1
        NotifTitle.Text = title
        NotifTitle.TextColor3 = Colors.Text
        NotifTitle.Font = Enum.Font.GothamBold
        NotifTitle.TextSize = 14
        NotifTitle.TextXAlignment = Enum.TextXAlignment.Left
        NotifTitle.Parent = NotifFrame

        local NotifText = Instance.new("TextLabel")
        NotifText.Size = UDim2.new(1, -20, 0, 35)
        NotifText.Position = UDim2.new(0, 15, 0, 30)
        NotifText.BackgroundTransparency = 1
        NotifText.Text = text
        NotifText.TextColor3 = Color3.fromRGB(200, 200, 200)
        NotifText.Font = Enum.Font.Gotham
        NotifText.TextSize = 12
        NotifText.TextWrapped = true
        NotifText.TextXAlignment = Enum.TextXAlignment.Left
        NotifText.TextYAlignment = Enum.TextYAlignment.Top
        NotifText.Parent = NotifFrame

        -- Slide In
        TweenService:Create(NotifFrame, TweenInfo.new(0.4, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2.new(0, 0, 0, 0)}):Play()

        -- Wait and Slide Out
        task.spawn(function()
            task.wait(duration)
            local fadeOut = TweenService:Create(NotifFrame, TweenInfo.new(0.4, Enum.EasingStyle.Quart, Enum.EasingDirection.In), {Position = UDim2.new(1, 50, 0, 0)})
            fadeOut:Play()
            fadeOut.Completed:Wait()
            Wrapper:Destroy()
        end)
    end

    -- ==========================================
    -- MAIN UI STRUCTURE
    -- ==========================================
    local MainFrame = Instance.new("Frame")
    MainFrame.Name = "MainFrame"
    MainFrame.Size = UDim2.new(0, 550, 0, 350)
    MainFrame.Position = UDim2.new(0.5, -275, 0.5, -175)
    MainFrame.BackgroundColor3 = Colors.Background
    MainFrame.BorderSizePixel = 0
    MainFrame.ClipsDescendants = true
    MainFrame.Parent = ScreenGui

    local MainCorner = Instance.new("UICorner")
    MainCorner.CornerRadius = UDim.new(0, 8)
    MainCorner.Parent = MainFrame

    local TopBar = Instance.new("Frame")
    TopBar.Name = "TopBar"
    TopBar.Size = UDim2.new(1, 0, 0, 35)
    TopBar.BackgroundColor3 = Colors.TopBar
    TopBar.BorderSizePixel = 0
    TopBar.Parent = MainFrame

    local TopBarCorner = Instance.new("UICorner")
    TopBarCorner.CornerRadius = UDim.new(0, 8)
    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 = Colors.TopBar
    TopBarFix.BorderSizePixel = 0
    TopBarFix.Parent = TopBar

    local Title = Instance.new("TextLabel")
    Title.Size = UDim2.new(1, -150, 1, 0)
    Title.Position = UDim2.new(0, 15, 0, 0)
    Title.BackgroundTransparency = 1
    Title.Text = titleText
    Title.TextColor3 = Colors.Text
    Title.TextSize = 16
    Title.Font = Enum.Font.GothamBold
    Title.TextXAlignment = Enum.TextXAlignment.Left
    Title.Parent = TopBar

    local ControlLayout = Instance.new("UIListLayout")
    ControlLayout.FillDirection = Enum.FillDirection.Horizontal
    ControlLayout.HorizontalAlignment = Enum.HorizontalAlignment.Right
    ControlLayout.VerticalAlignment = Enum.VerticalAlignment.Center
    ControlLayout.Padding = UDim.new(0, 5)
    ControlLayout.Parent = TopBar

    local ControlPadding = Instance.new("UIPadding")
    ControlPadding.PaddingRight = UDim.new(0, 10)
    ControlPadding.Parent = TopBar

    local function CreateControlButton(name, text, color)
        local Btn = Instance.new("TextButton")
        Btn.Name = name
        Btn.Size = UDim2.new(0, 25, 0, 25)
        Btn.BackgroundColor3 = Colors.Background
        Btn.Text = text
        Btn.TextColor3 = color
        Btn.TextSize = 14
        Btn.Font = Enum.Font.GothamBold
        Btn.AutoButtonColor = false
        
        local Corner = Instance.new("UICorner")
        Corner.CornerRadius = UDim.new(0, 4)
        Corner.Parent = Btn
        Btn.Parent = TopBar
        return Btn
    end

    local SettingsBtn = CreateControlButton("SettingsBtn", "⚙", Colors.Text)
    local MinimizeBtn = CreateControlButton("MinimizeBtn", "-", Colors.Text)
    local CloseBtn = CreateControlButton("CloseBtn", "X", Color3.fromRGB(255, 80, 80))

    local TabMenu = Instance.new("Frame")
    TabMenu.Name = "TabMenu"
    TabMenu.Size = UDim2.new(0, 140, 1, -35)
    TabMenu.Position = UDim2.new(0, 0, 0, 35)
    TabMenu.BackgroundColor3 = Colors.TabMenu
    TabMenu.BorderSizePixel = 0
    TabMenu.Parent = MainFrame

    local TabMenuLayout = Instance.new("UIListLayout")
    TabMenuLayout.SortOrder = Enum.SortOrder.LayoutOrder
    TabMenuLayout.Padding = UDim.new(0, 5)
    TabMenuLayout.Parent = TabMenu

    local TabMenuPadding = Instance.new("UIPadding")
    TabMenuPadding.PaddingTop = UDim.new(0, 10)
    TabMenuPadding.PaddingLeft = UDim.new(0, 10)
    TabMenuPadding.PaddingRight = UDim.new(0, 10)
    TabMenuPadding.Parent = TabMenu

    local PagesContainer = Instance.new("Frame")
    PagesContainer.Name = "PagesContainer"
    PagesContainer.Size = UDim2.new(1, -140, 1, -35)
    PagesContainer.Position = UDim2.new(0, 140, 0, 35)
    PagesContainer.BackgroundTransparency = 1
    PagesContainer.Parent = MainFrame

    -- Drag Logic
    local dragging, dragInput, dragStart, startPos
    TopBar.InputBegan:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
            dragging = true
            dragStart = input.Position
            startPos = MainFrame.Position
        end
    end)
    TopBar.InputChanged:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
            dragInput = input
        end
    end)
    UserInputService.InputChanged:Connect(function(input)
        if input == dragInput and dragging then
            local delta = input.Position - dragStart
            MainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
        end
    end)
    UserInputService.InputEnded:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
            dragging = false
        end
    end)

    -- Close Confirmation Prompt
    local PromptOverlay = Instance.new("Frame")
    PromptOverlay.Size = UDim2.new(1, 0, 1, 0)
    PromptOverlay.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
    PromptOverlay.BackgroundTransparency = 0.6
    PromptOverlay.ZIndex = 10
    PromptOverlay.Visible = false
    PromptOverlay.Parent = MainFrame

    local PromptMenu = Instance.new("Frame")
    PromptMenu.Size = UDim2.new(0, 300, 0, 140)
    PromptMenu.Position = UDim2.new(0.5, -150, 0.5, -70)
    PromptMenu.BackgroundColor3 = Colors.Background
    PromptMenu.ZIndex = 11
    PromptMenu.Parent = PromptOverlay
    Instance.new("UICorner", PromptMenu).CornerRadius = UDim.new(0, 8)

    local PromptText = Instance.new("TextLabel")
    PromptText.Size = UDim2.new(1, 0, 0, 70)
    PromptText.BackgroundTransparency = 1
    PromptText.Text = "⚠️Are you sure of close ui?⚠️"
    PromptText.TextColor3 = Color3.fromRGB(255, 80, 80)
    PromptText.TextSize = 16
    PromptText.Font = Enum.Font.GothamBold
    PromptText.ZIndex = 12
    PromptText.Parent = PromptMenu

    local YesBtn = Instance.new("TextButton")
    YesBtn.Size = UDim2.new(0, 110, 0, 35)
    YesBtn.Position = UDim2.new(0, 25, 0, 85)
    YesBtn.BackgroundColor3 = Color3.fromRGB(255, 80, 80)
    YesBtn.Text = "Yes"
    YesBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
    YesBtn.Font = Enum.Font.GothamBold
    YesBtn.TextSize = 14
    YesBtn.ZIndex = 12
    YesBtn.Parent = PromptMenu
    Instance.new("UICorner", YesBtn).CornerRadius = UDim.new(0, 6)

    local NoBtn = Instance.new("TextButton")
    NoBtn.Size = UDim2.new(0, 110, 0, 35)
    NoBtn.Position = UDim2.new(1, -135, 0, 85)
    NoBtn.BackgroundColor3 = Color3.fromRGB(80, 200, 80)
    NoBtn.Text = "No"
    NoBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
    NoBtn.Font = Enum.Font.GothamBold
    NoBtn.TextSize = 14
    NoBtn.ZIndex = 12
    NoBtn.Parent = PromptMenu
    Instance.new("UICorner", NoBtn).CornerRadius = UDim.new(0, 6)

    CloseBtn.MouseButton1Click:Connect(function()
        PromptOverlay.Visible = true
    end)

    YesBtn.MouseButton1Click:Connect(function()
        ScreenGui:Destroy()
    end)

    NoBtn.MouseButton1Click:Connect(function()
        PromptOverlay.Visible = false
    end)

    local minimized = false
    MinimizeBtn.MouseButton1Click:Connect(function()
        minimized = not minimized
        local targetSize = minimized and UDim2.new(0, 550, 0, 35) or UDim2.new(0, 550, 0, 350)
        TweenService:Create(MainFrame, TweenInfo.new(0.3, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Size = targetSize}):Play()
    end)

    SettingsBtn.MouseButton1Click:Connect(function()
        if WindowInfo.Tabs["Settings"] then
            for _, child in pairs(PagesContainer:GetChildren()) do
                if child:IsA("ScrollingFrame") then child.Visible = false end
            end
            for _, child in pairs(TabMenu:GetChildren()) do
                if child:IsA("TextButton") then child.BackgroundColor3 = Colors.Element end
            end
            WindowInfo.Tabs["Settings"].Page.Visible = true
            WindowInfo.Tabs["Settings"].Button.BackgroundColor3 = Colors.Accent
            WindowInfo.ActiveTabBtn = WindowInfo.Tabs["Settings"].Button
        end
    end)

    -- Theme Manager
    function WindowInfo:SetTheme(themeName)
        if Themes[themeName] then
            Colors.Accent = Themes[themeName]
            if WindowInfo.ActiveTabBtn then
                WindowInfo.ActiveTabBtn.BackgroundColor3 = Colors.Accent
            end
            -- Fix existing notification lines
            for _, notif in pairs(NotificationContainer:GetDescendants()) do
                if notif:IsA("Frame") and notif.Size == UDim2.new(0, 4, 1, 0) then
                    notif.BackgroundColor3 = Colors.Accent
                end
            end
        end
    end

    local firstTab = true
    function WindowInfo:CreateTab(tabName)
        local TabData = {}

        local TabBtn = Instance.new("TextButton")
        TabBtn.Size = UDim2.new(1, 0, 0, 30)
        TabBtn.BackgroundColor3 = firstTab and Colors.Accent or Colors.Element
        TabBtn.Text = tabName
        TabBtn.TextColor3 = Colors.Text
        TabBtn.Font = Enum.Font.Gotham
        TabBtn.TextSize = 14
        TabBtn.Parent = TabMenu

        Instance.new("UICorner", TabBtn).CornerRadius = UDim.new(0, 6)

        local Page = Instance.new("ScrollingFrame")
        Page.Size = UDim2.new(1, 0, 1, 0)
        Page.BackgroundTransparency = 1
        Page.ScrollBarThickness = 2
        Page.Visible = firstTab
        Page.AutomaticCanvasSize = Enum.AutomaticSize.Y
        Page.Parent = PagesContainer

        local PageLayout = Instance.new("UIListLayout")
        PageLayout.Padding = UDim.new(0, 8)
        PageLayout.Parent = Page

        local PagePadding = Instance.new("UIPadding")
        PagePadding.PaddingTop = UDim.new(0, 10)
        PagePadding.PaddingLeft = UDim.new(0, 10)
        PagePadding.PaddingRight = UDim.new(0, 10)
        PagePadding.PaddingBottom = UDim.new(0, 10)
        PagePadding.Parent = Page

        if firstTab then
            WindowInfo.ActiveTabBtn = TabBtn
        end

        TabBtn.MouseButton1Click:Connect(function()
            for _, child in pairs(PagesContainer:GetChildren()) do
                if child:IsA("ScrollingFrame") then child.Visible = false end
            end
            for _, child in pairs(TabMenu:GetChildren()) do
                if child:IsA("TextButton") then child.BackgroundColor3 = Colors.Element end
            end
            Page.Visible = true
            TabBtn.BackgroundColor3 = Colors.Accent
            WindowInfo.ActiveTabBtn = TabBtn
        end)

        WindowInfo.Tabs[tabName] = {Button = TabBtn, Page = Page}
        firstTab = false

        -- UI Elements
        function TabData:CreateButton(text, callback)
            local Btn = Instance.new("TextButton")
            Btn.Size = UDim2.new(1, 0, 0, 35)
            Btn.BackgroundColor3 = Colors.Element
            Btn.Text = text
            Btn.TextColor3 = Colors.Text
            Btn.Font = Enum.Font.Gotham
            Btn.TextSize = 14
            Btn.Parent = Page
            Instance.new("UICorner", Btn).CornerRadius = UDim.new(0, 6)

            Btn.MouseButton1Click:Connect(function() pcall(callback) end)
        end

        function TabData:CreateToggle(text, default, callback)
            local state = default or false
            local ToggleFrame = Instance.new("Frame")
            ToggleFrame.Size = UDim2.new(1, 0, 0, 35)
            ToggleFrame.BackgroundColor3 = Colors.Element
            ToggleFrame.Parent = Page
            Instance.new("UICorner", ToggleFrame).CornerRadius = UDim.new(0, 6)

            local Label = Instance.new("TextLabel")
            Label.Size = UDim2.new(1, -50, 1, 0)
            Label.Position = UDim2.new(0, 10, 0, 0)
            Label.BackgroundTransparency = 1
            Label.Text = text
            Label.TextColor3 = Colors.Text
            Label.Font = Enum.Font.Gotham
            Label.TextSize = 14
            Label.TextXAlignment = Enum.TextXAlignment.Left
            Label.Parent = ToggleFrame

            local Indicator = Instance.new("Frame")
            Indicator.Size = UDim2.new(0, 20, 0, 20)
            Indicator.Position = UDim2.new(1, -30, 0.5, -10)
            Indicator.BackgroundColor3 = state and Colors.ToggleOn or Colors.ToggleOff
            Indicator.Parent = ToggleFrame
            Instance.new("UICorner", Indicator).CornerRadius = UDim.new(1, 0)

            local ActionBtn = Instance.new("TextButton")
            ActionBtn.Size = UDim2.new(1, 0, 1, 0)
            ActionBtn.BackgroundTransparency = 1
            ActionBtn.Text = ""
            ActionBtn.Parent = ToggleFrame

            ActionBtn.MouseButton1Click:Connect(function()
                state = not state
                TweenService:Create(Indicator, TweenInfo.new(0.2), {BackgroundColor3 = state and Colors.ToggleOn or Colors.ToggleOff}):Play()
                pcall(callback, state)
            end)
        end

        function TabData:CreateDropdown(text, options, callback)
            local DropdownFrame = Instance.new("Frame")
            DropdownFrame.Size = UDim2.new(1, 0, 0, 35)
            DropdownFrame.BackgroundColor3 = Colors.Element
            DropdownFrame.ClipsDescendants = true
            DropdownFrame.Parent = Page
            Instance.new("UICorner", DropdownFrame).CornerRadius = UDim.new(0, 6)

            local MainBtn = Instance.new("TextButton")
            MainBtn.Size = UDim2.new(1, 0, 0, 35)
            MainBtn.BackgroundTransparency = 1
            MainBtn.Text = "  " .. text .. ": " .. options[1]
            MainBtn.TextColor3 = Colors.Text
            MainBtn.Font = Enum.Font.Gotham
            MainBtn.TextSize = 14
            MainBtn.TextXAlignment = Enum.TextXAlignment.Left
            MainBtn.Parent = DropdownFrame

            local Arrow = Instance.new("TextLabel")
            Arrow.Size = UDim2.new(0, 35, 0, 35)
            Arrow.Position = UDim2.new(1, -35, 0, 0)
            Arrow.BackgroundTransparency = 1
            Arrow.Text = "+"
            Arrow.TextColor3 = Colors.Text
            Arrow.Font = Enum.Font.GothamBold
            Arrow.TextSize = 14
            Arrow.Parent = DropdownFrame

            local ListLayout = Instance.new("UIListLayout")
            ListLayout.SortOrder = Enum.SortOrder.LayoutOrder
            ListLayout.Parent = DropdownFrame

            local isDropped = false
            MainBtn.MouseButton1Click:Connect(function()
                isDropped = not isDropped
                local targetSize = isDropped and UDim2.new(1, 0, 0, 35 + (#options * 30)) or UDim2.new(1, 0, 0, 35)
                Arrow.Text = isDropped and "-" or "+"
                TweenService:Create(DropdownFrame, TweenInfo.new(0.2), {Size = targetSize}):Play()
            end)

            for i, option in ipairs(options) do
                local OptBtn = Instance.new("TextButton")

Features & Information

library.

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts