Pastebin
Retrouvez, créez et partagez vos snippets en temps réel.
Rechercher un Pastebin
Aucun paste trouvé.
Créer un paste
Pastebin
Blog
tg
--Ghost LibUI v3.0.0 (Elite Edition) --made by "Clmstb" GgTchadeed. --the code is open source, if you modify it, it would be nice to mansion "Ghost Lib UI" on your github repository and also to mansion it in your script, Happy Scripting, Thank for using! --check documention for more detail. print("GhostLib UI v3.0.0 loaded successfully! 👻🔥") local Library = {} local TweenService = game:GetService("TweenService") local GuiService = game:GetService("GuiService") local UserInputService = game:GetService("UserInputService") -- debug GuiService.AutoSelectGuiEnabled = false GuiService.SelectedObject = nil -- Utilitaire pour créer une icône proprement local function CreateIcon(parent, iconId) if not iconId or iconId == "" then return nil end local Icon = Instance.new("ImageLabel") Icon.Name = "Icon" Icon.Parent = parent Icon.BackgroundTransparency = 1 Icon.Size = UDim2.new(0, 18, 0, 18) Icon.Image = iconId:find("rbxassetid://") and iconId or "rbxassetid://" .. iconId:gsub("rbxassetid://", "") Icon.ImageColor3 = Color3.fromRGB(255, 255, 255) return Icon end -- Notif Sys function Library:Notify(data) local title = data.Title or "Notification" local content = data.Content or "" local duration = data.Duration or 5 local iconID = data.Icon local ScreenGui = game:GetService("CoreGui"):FindFirstChild("GhostNotifications") or Instance.new("ScreenGui", game:GetService("CoreGui")) ScreenGui.Name = "GhostNotifications" local NotifFrame = Instance.new("Frame") NotifFrame.Size = UDim2.new(0, 250, 0, 80) NotifFrame.Position = UDim2.new(1, 10, 0.8, 0) NotifFrame.BackgroundColor3 = Color3.fromRGB(15, 15, 15) NotifFrame.BorderSizePixel = 0 NotifFrame.Parent = ScreenGui local UICorner = Instance.new("UICorner", NotifFrame) UICorner.CornerRadius = UDim.new(0, 8) local UIGradient = Instance.new("UIStroke", NotifFrame) UIGradient.Color = Color3.fromRGB(40, 40, 40) UIGradient.Thickness = 1 if iconID and iconID ~= "" then local Icon = Instance.new("ImageLabel") Icon.Name = "Icon" Icon.Parent = NotifFrame Icon.BackgroundTransparency = 1 Icon.Position = UDim2.new(0, 10, 0.5, -12) Icon.Size = UDim2.new(0, 24, 0, 24) Icon.Image = iconID end local TitleLabel = Instance.new("TextLabel", NotifFrame) TitleLabel.Text = title TitleLabel.Size = UDim2.new(1, -50, 0, 20) TitleLabel.Position = iconID and UDim2.new(0, 45, 0, 10) or UDim2.new(0, 15, 0, 10) TitleLabel.BackgroundTransparency = 1 TitleLabel.TextColor3 = Color3.fromRGB(255, 255, 255) TitleLabel.TextXAlignment = Enum.TextXAlignment.Left TitleLabel.Font = Enum.Font.GothamBold local ContentLabel = Instance.new("TextLabel", NotifFrame) ContentLabel.Text = content ContentLabel.Size = UDim2.new(1, -50, 0, 40) ContentLabel.Position = iconID and UDim2.new(0, 45, 0, 30) or UDim2.new(0, 15, 0, 30) ContentLabel.BackgroundTransparency = 1 ContentLabel.TextColor3 = Color3.fromRGB(180, 180, 180) ContentLabel.TextXAlignment = Enum.TextXAlignment.Left ContentLabel.TextWrapped = true ContentLabel.Font = Enum.Font.Gotham NotifFrame:TweenPosition(UDim2.new(1, -260, 0.8, 0), "Out", "Quart", 0.5, true) task.delay(duration, function() NotifFrame:TweenPosition(UDim2.new(1, 10, 0.8, 0), "In", "Quart", 0.5, true) task.wait(0.5) NotifFrame:Destroy() end) end function Library:CreateWindow(hubName, iconId) local hubName = hubName or "Ghost UI" local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "GhostUI_Final" ScreenGui.ResetOnSpawn = false ScreenGui.Parent = game:GetService("CoreGui") or game.Players.LocalPlayer:WaitForChild("PlayerGui") local MainFrame = Instance.new("Frame") local MainCorner = Instance.new("UICorner") local Topbar = Instance.new("Frame") local TopCorner = Instance.new("UICorner") local WindowsName = Instance.new("TextLabel") local CloseBtn = Instance.new("ImageButton") local leftbar = Instance.new("Frame") local LeftCorner = Instance.new("UICorner") -- Drag & Toggle Logic local function MakeDraggable(obj) local dragging, dragInput, dragStart, startPos obj.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = true; dragStart = input.Position; startPos = obj.Position end end) obj.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseMovement then dragInput = input end end) UserInputService.InputChanged:Connect(function(input) if input == dragInput and dragging then local delta = input.Position - dragStart obj.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) end end) obj.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = false end end) end MakeDraggable(MainFrame) MainFrame.Name = "MainFrame"; MainFrame.Parent = ScreenGui; MainFrame.BackgroundColor3 = Color3.fromRGB(44, 44, 44) MainFrame.Position = UDim2.new(0.35, 0, 0.25, 0); MainFrame.Size = UDim2.new(0, 590, 0, 407); MainFrame.Active = true; MainFrame.ClipsDescendants = true MainCorner.CornerRadius = UDim.new(0, 9); MainCorner.Parent = MainFrame Topbar.Name = "Topbar"; Topbar.Parent = MainFrame; Topbar.BackgroundColor3 = Color3.fromRGB(34, 34, 34); Topbar.Size = UDim2.new(1, 0, 0, 42) TopCorner.CornerRadius = UDim.new(0, 9); TopCorner.Parent = Topbar local TitleContainer = Instance.new("Frame", Topbar) TitleContainer.Size = UDim2.new(0, 200, 1, 0); TitleContainer.Position = UDim2.new(0.035, 0, 0, 0); TitleContainer.BackgroundTransparency = 1 local TitleList = Instance.new("UIListLayout", TitleContainer); TitleList.FillDirection = Enum.FillDirection.Horizontal; TitleList.VerticalAlignment = Enum.VerticalAlignment.Center; TitleList.Padding = UDim.new(0, 8) CreateIcon(TitleContainer, iconId) WindowsName.Parent = TitleContainer; WindowsName.BackgroundTransparency = 1; WindowsName.Size = UDim2.new(0, 145, 1, 0); WindowsName.Font = Enum.Font.GothamMedium; WindowsName.Text = hubName; WindowsName.TextColor3 = Color3.fromRGB(255, 255, 255); WindowsName.TextSize = 16; WindowsName.TextXAlignment = Enum.TextXAlignment.Left leftbar.Name = "leftbar"; leftbar.Parent = MainFrame; leftbar.BackgroundColor3 = Color3.fromRGB(34, 34, 34); leftbar.Position = UDim2.new(0, 0, 0.103, 0); leftbar.Size = UDim2.new(0, 157, 0.897, 0) LeftCorner.CornerRadius = UDim.new(0, 9); LeftCorner.Parent = leftbar local TabScroll = Instance.new("Frame", leftbar); TabScroll.Size = UDim2.new(1, 0, 1, -15); TabScroll.Position = UDim2.new(0, 0, 0, 8); TabScroll.BackgroundTransparency = 1 local TabList = Instance.new("UIListLayout", TabScroll); TabList.HorizontalAlignment = Enum.HorizontalAlignment.Center; TabList.Padding = UDim.new(0, 8) local PageHolder = Instance.new("Frame", MainFrame); PageHolder.BackgroundTransparency = 1; PageHolder.Position = UDim2.new(0.285, 0, 0.13, 0); PageHolder.Size = UDim2.new(0.68, 0, 0.84, 0) local Window = {} function Window:CreateTab(name, iconId) local TabBtn = Instance.new("Frame", TabScroll); TabBtn.Size = UDim2.new(0, 133, 0, 34); TabBtn.BackgroundColor3 = Color3.fromRGB(255, 255, 255) Instance.new("UICorner", TabBtn).CornerRadius = UDim.new(1, 0) local Grad = Instance.new("UIGradient", TabBtn); Grad.Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(47, 47, 47)), ColorSequenceKeypoint.new(1, Color3.fromRGB(38, 38, 38))}; Grad.Rotation = 87 local TabContent = Instance.new("Frame", TabBtn); TabContent.Size = UDim2.new(1, 0, 1, 0); TabContent.BackgroundTransparency = 1 local TabL = Instance.new("UIListLayout", TabContent); TabL.FillDirection = Enum.FillDirection.Horizontal; TabL.HorizontalAlignment = Enum.HorizontalAlignment.Center; TabL.VerticalAlignment = Enum.VerticalAlignment.Center; TabL.Padding = UDim.new(0, 6) CreateIcon(TabContent, iconId) local Label = Instance.new("TextLabel", TabContent); Label.Size = UDim2.new(0, 0, 1, 0); Label.AutomaticSize = Enum.AutomaticSize.X; Label.BackgroundTransparency = 1; Label.Font = Enum.Font.Gotham; Label.Text = name; Label.TextColor3 = Color3.fromRGB(255, 255, 255); Label.TextSize = 13 local RealBtn = Instance.new("TextButton", TabBtn); RealBtn.Size = UDim2.new(1, 0, 1, 0); RealBtn.BackgroundTransparency = 1; RealBtn.Text = "" local Page = Instance.new("ScrollingFrame", PageHolder); Page.Size = UDim2.new(1, 0, 1, 0); Page.BackgroundTransparency = 1; Page.Visible = false; Page.ScrollBarThickness = 0 local PageList = Instance.new("UIListLayout", Page); PageList.Padding = UDim.new(0, 8); PageList.HorizontalAlignment = Enum.HorizontalAlignment.Center PageList:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function() Page.CanvasSize = UDim2.new(0,0,0, PageList.AbsoluteContentSize.Y + 10) end) local function OpenTab() for _, v in pairs(PageHolder:GetChildren()) do v.Visible = false end Page.Visible = true end RealBtn.MouseButton1Click:Connect(OpenTab) local Tab = {} Tab.Show = OpenTab function Tab:CreateButton(text, callback, iconId) local BFrame = Instance.new("Frame", Page); BFrame.Size = UDim2.new(0, 390, 0, 35); BFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255) Instance.new("UICorner", BFrame).CornerRadius = UDim.new(0, 6) local G = Instance.new("UIGradient", BFrame); G.Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(47, 47, 47)), ColorSequenceKeypoint.new(1, Color3.fromRGB(38, 38, 38))}; G.Rotation = 87 local BCont = Instance.new("Frame", BFrame); BCont.Position = UDim2.new(0.05, 0, 0, 0); BCont.Size = UDim2.new(0.9, 0, 1, 0); BCont.BackgroundTransparency = 1 local BList = Instance.new("UIListLayout", BCont); BList.FillDirection = Enum.FillDirection.Horizontal; BList.VerticalAlignment = Enum.VerticalAlignment.Center; BList.Padding = UDim.new(0, 8) CreateIcon(BCont, iconId) local L = Instance.new("TextLabel", BCont); L.Size = UDim2.new(1, -25, 1, 0); L.BackgroundTransparency = 1; L.Font = Enum.Font.Gotham; L.Text = text; L.TextColor3 = Color3.fromRGB(255, 255, 255); L.TextSize = 13; L.TextXAlignment = Enum.TextXAlignment.Left local C = Instance.new("TextButton", BFrame); C.Size = UDim2.new(1, 0, 1, 0); C.BackgroundTransparency = 1; C.Text = "" C.MouseButton1Click:Connect(callback) end function Tab:CreateToggle(text, callback, iconId) local TFrame = Instance.new("Frame", Page); TFrame.Size = UDim2.new(0, 390, 0, 35); TFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255) Instance.new("UICorner", TFrame).CornerRadius = UDim.new(0, 6); local G = Instance.new("UIGradient", TFrame); G.Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(47, 47, 47)), ColorSequenceKeypoint.new(1, Color3.fromRGB(38, 38, 38))}; G.Rotation = 87 local TCont = Instance.new("Frame", TFrame); TCont.Position = UDim2.new(0.05, 0, 0, 0); TCont.Size = UDim2.new(0.7, 0, 1, 0); TCont.BackgroundTransparency = 1 local TList = Instance.new("UIListLayout", TCont); TList.FillDirection = Enum.FillDirection.Horizontal; TList.VerticalAlignment = Enum.VerticalAlignment.Center; TList.Padding = UDim.new(0, 8) CreateIcon(TCont, iconId) local L = Instance.new("TextLabel", TCont); L.Size = UDim2.new(1, -25, 1, 0); L.BackgroundTransparency = 1; L.Font = Enum.Font.Gotham; L.Text = text; L.TextColor3 = Color3.fromRGB(255, 255, 255); L.TextSize = 13; L.TextXAlignment = Enum.TextXAlignment.Left local Switch = Instance.new("Frame", TFrame); Switch.Position = UDim2.new(0.88, 0, 0.22, 0); Switch.Size = UDim2.new(0, 32, 0, 18); Switch.BackgroundColor3 = Color3.fromRGB(55, 55, 55); Instance.new("UICorner", Switch).CornerRadius = UDim.new(1, 0) local Circle = Instance.new("Frame", Switch); Circle.Size = UDim2.new(0, 14, 0, 14); Circle.Position = UDim2.new(0, 2, 0.5, -7); Circle.BackgroundColor3 = Color3.fromRGB(255, 255, 255); Instance.new("UICorner", Circle).CornerRadius = UDim.new(1, 0) local TBtn = Instance.new("TextButton", TFrame); TBtn.Size = UDim2.new(1,0,1,0); TBtn.BackgroundTransparency = 1; TBtn.Text = "" local toggled = false; TBtn.MouseButton1Click:Connect(function() toggled = not toggled TweenService:Create(Circle, TweenInfo.new(0.2), {Position = toggled and UDim2.new(1, -16, 0.5, -7) or UDim2.new(0, 2, 0.5, -7)}):Play() TweenService:Create(Switch, TweenInfo.new(0.2), {BackgroundColor3 = toggled and Color3.fromRGB(150, 150, 150) or Color3.fromRGB(55, 55, 55)}):Play() callback(toggled) end) end function Tab:CreateDropdown(text, list, callback) local DFrame = Instance.new("Frame", Page); DFrame.Size = UDim2.new(0, 390, 0, 35); DFrame.BackgroundColor3 = Color3.fromRGB(34, 34, 34); DFrame.ClipsDescendants = true; Instance.new("UICorner", DFrame).CornerRadius = UDim.new(0, 6) local L = Instance.new("TextLabel", DFrame); L.Position = UDim2.new(0, 15, 0, 0); L.Size = UDim2.new(1, -30, 0, 35); L.BackgroundTransparency = 1; L.Font = Enum.Font.Gotham; L.Text = text .. " : ..."; L.TextColor3 = Color3.fromRGB(255, 255, 255); L.TextSize = 12; L.TextXAlignment = Enum.TextXAlignment.Left local Btn = Instance.new("TextButton", DFrame); Btn.Size = UDim2.new(1, 0, 0, 35); Btn.BackgroundTransparency = 1; Btn.Text = "" local DropContainer = Instance.new("Frame", DFrame); DropContainer.Position = UDim2.new(0, 0, 0, 35); DropContainer.Size = UDim2.new(1, 0, 0, 0); DropContainer.BackgroundTransparency = 1 local DList = Instance.new("UIListLayout", DropContainer); DList.HorizontalAlignment = Enum.HorizontalAlignment.Center; DList.Padding = UDim.new(0, 5) local opened = false; Btn.MouseButton1Click:Connect(function() opened = not opened TweenService:Create(DFrame, TweenInfo.new(0.3), {Size = opened and UDim2.new(0, 390, 0, 35 + DList.AbsoluteContentSize.Y + 10) or UDim2.new(0, 390, 0, 35)}):Play() end) for _, v in pairs(list) do local Opt = Instance.new("TextButton", DropContainer); Opt.Size = UDim2.new(0, 370, 0, 25); Opt.BackgroundColor3 = Color3.fromRGB(45, 45, 45); Opt.Font = Enum.Font.Gotham; Opt.Text = v; Opt.TextColor3 = Color3.fromRGB(200, 200, 200); Opt.TextSize = 12; Instance.new("UICorner", Opt) Opt.MouseButton1Click:Connect(function() L.Text = text .. " : " .. v; opened = false; DFrame.Size = UDim2.new(0, 390, 0, 35); callback(v) end) end end function Tab:CreateKeybind(text, default, callback) local KFrame = Instance.new("Frame", Page); KFrame.Size = UDim2.new(0, 390, 0, 35); KFrame.BackgroundColor3 = Color3.fromRGB(34, 34, 34); Instance.new("UICorner", KFrame).CornerRadius = UDim.new(0, 6) local L = Instance.new("TextLabel", KFrame); L.Position = UDim2.new(0, 15, 0, 0); L.Size = UDim2.new(1, -30, 1, 0); L.BackgroundTransparency = 1; L.Font = Enum.Font.Gotham; L.Text = text; L.TextColor3 = Color3.fromRGB(255, 255, 255); L.TextSize = 12; L.TextXAlignment = Enum.TextXAlignment.Left local BindBox = Instance.new("TextButton", KFrame); BindBox.Position = UDim2.new(1, -70, 0.2, 0); BindBox.Size = UDim2.new(0, 60, 0, 20); BindBox.BackgroundColor3 = Color3.fromRGB(50, 50, 50); BindBox.Font = Enum.Font.GothamBold; BindBox.Text = default.Name; BindBox.TextColor3 = Color3.fromRGB(255, 255, 255); BindBox.TextSize = 11; Instance.new("UICorner", BindBox) local currKey = default BindBox.MouseButton1Click:Connect(function() BindBox.Text = "..." local inputwait = UserInputService.InputBegan:Wait() if inputwait.UserInputType == Enum.UserInputType.Keyboard then currKey = inputwait.KeyCode; BindBox.Text = currKey.Name end end) UserInputService.InputBegan:Connect(function(i, g) if not g and i.KeyCode == currKey then callback() end end) end function Tab:CreateColorPicker(text, default, callback) local CFrame = Instance.new("Frame", Page); CFrame.Size = UDim2.new(0, 390, 0, 35); CFrame.BackgroundColor3 = Color3.fromRGB(34, 34, 34); Instance.new("UICorner", CFrame).CornerRadius = UDim.new(0, 6) local L = Instance.new("TextLabel", CFrame); L.Position = UDim2.new(0, 15, 0, 0); L.Size = UDim2.new(1, -30, 1, 0); L.BackgroundTransparency = 1; L.Font = Enum.Font.Gotham; L.Text = text; L.TextColor3 = Color3.fromRGB(255, 255, 255); L.TextSize = 12; L.TextXAlignment = Enum.TextXAlignment.Left local ColorBox = Instance.new("TextButton", CFrame); ColorBox.Position = UDim2.new(1, -40, 0.2, 0); ColorBox.Size = UDim2.new(0, 30, 0, 20); ColorBox.BackgroundColor3 = default; ColorBox.Text = ""; Instance.new("UICorner", ColorBox) ColorBox.MouseButton1Click:Connect(function() -- Cycle simple de couleurs pour l'exemple (V3) local newCol = Color3.fromHSV(tick()%5/5, 1, 1) ColorBox.BackgroundColor3 = newCol; callback(newCol) end) end function Tab:CreateSlider(text, min, max, default, callback, iconId) local SFrame = Instance.new("Frame", Page); SFrame.Size = UDim2.new(0, 390, 0, 45); SFrame.BackgroundColor3 = Color3.fromRGB(38, 38, 38); Instance.new("UICorner", SFrame).CornerRadius = UDim.new(0, 6) local SCont = Instance.new("Frame", SFrame); SCont.Position = UDim2.new(0, 15, 0, 5); SCont.Size = UDim2.new(1, -30, 0, 20); SCont.BackgroundTransparency = 1 local SList = Instance.new("UIListLayout", SCont); SList.FillDirection = Enum.FillDirection.Horizontal; SList.VerticalAlignment = Enum.VerticalAlignment.Center; SList.Padding = UDim.new(0, 6) CreateIcon(SCont, iconId) local L = Instance.new("TextLabel", SCont); L.Size = UDim2.new(1, -50, 1, 0); L.BackgroundTransparency = 1; L.Font = Enum.Font.Gotham; L.Text = text; L.TextColor3 = Color3.fromRGB(255, 255, 255); L.TextSize = 12; L.TextXAlignment = Enum.TextXAlignment.Left local Val = Instance.new("TextLabel", SFrame); Val.Position = UDim2.new(0, 0, 0, 5); Val.Size = UDim2.new(1, -15, 0, 20); Val.BackgroundTransparency = 1; Val.Font = Enum.Font.Gotham; Val.Text = tostring(default); Val.TextColor3 = Color3.fromRGB(255, 255, 255); Val.TextSize = 12; Val.TextXAlignment = Enum.TextXAlignment.Right local Bar = Instance.new("Frame", SFrame); Bar.Size = UDim2.new(0, 360, 0, 4); Bar.Position = UDim2.new(0, 15, 0, 32); Bar.BackgroundColor3 = Color3.fromRGB(60, 60, 60); Bar.BorderSizePixel = 0 local Fill = Instance.new("Frame", Bar); Fill.Size = UDim2.new((default - min) / (max - min), 0, 1, 0); Fill.BackgroundColor3 = Color3.fromRGB(255, 255, 255); Fill.BorderSizePixel = 0 local sliding = false; local function move(input) local pos = math.clamp((input.Position.X - Bar.AbsolutePosition.X) / Bar.AbsoluteSize.X, 0, 1) local value = math.floor(min + (max - min) * pos); Fill.Size = UDim2.new(pos, 0, 1, 0); Val.Text = tostring(value); callback(value) end SFrame.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then sliding = true move(input) end end) SFrame.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then sliding = false end end) UserInputService.InputChanged:Connect(function(input) if sliding and input.UserInputType == Enum.UserInputType.MouseMovement then move(input) end end) end return Tab end return Window end return Library
Créé il y a 1 semaine.