Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local TweenService = game:GetService("TweenService")
- local player = game.Players.LocalPlayer
- local parentGui = game:GetService("CoreGui")
- local Lighting = game:GetService("Lighting")
- pcall(function()
- if not parentGui:IsDescendantOf(game) then
- parentGui = player:WaitForChild("PlayerGui")
- end
- end)
- -- Remove existing popup and GUI if found
- local existing = parentGui:FindFirstChild("CreditPopup")
- if existing then existing:Destroy() end
- local existingGui = parentGui:FindFirstChild("DeltaUILib")
- if existingGui then
- existingGui:Destroy()
- end
- -- Blur effect
- local blur = Instance.new("BlurEffect")
- blur.Size = 0
- blur.Name = "UILibCreditBlur"
- blur.Parent = Lighting
- TweenService:Create(blur, TweenInfo.new(0.5), {Size = 12}):Play()
- -- GUI
- local gui = Instance.new("ScreenGui")
- gui.Name = "CreditPopup"
- gui.IgnoreGuiInset = true
- gui.ResetOnSpawn = false
- gui.Parent = parentGui
- -- Popup container
- local popup = Instance.new("Frame")
- popup.Size = UDim2.new(0, 280, 0, 80)
- popup.Position = UDim2.new(0.5, 0, 0.5, 0)
- popup.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- popup.BackgroundTransparency = 1
- popup.BorderSizePixel = 0
- popup.AnchorPoint = Vector2.new(0.5, 0.5)
- popup.Parent = gui
- local corner = Instance.new("UICorner", popup)
- corner.CornerRadius = UDim.new(0, 8)
- local stroke = Instance.new("UIStroke", popup)
- stroke.Color = Color3.fromRGB(0, 170, 255)
- stroke.Thickness = 2
- stroke.Transparency = 0.4
- -- Icon via URL (auto-scaled)
- local icon = Instance.new("ImageLabel")
- icon.Size = UDim2.new(0, 40, 0, 40)
- icon.Position = UDim2.new(0, 10, 0, 20)
- icon.BackgroundTransparency = 1
- icon.Image = "rbxassetid://6031075938"
- icon.ScaleType = Enum.ScaleType.Fit
- icon.ClipsDescendants = true
- icon.ImageTransparency = 1 -- start invisible
- icon.Parent = popup
- local aspect = Instance.new("UIAspectRatioConstraint")
- aspect.AspectRatio = 1
- aspect.Parent = icon
- -- Main Label
- local mainLabel = Instance.new("TextLabel")
- mainLabel.Position = UDim2.new(0, 60, 0, 12)
- mainLabel.Size = UDim2.new(1, -70, 0, 24)
- mainLabel.BackgroundTransparency = 1
- mainLabel.Text = "Made by Chilled"
- mainLabel.Font = Enum.Font.GothamBold
- mainLabel.TextSize = 16
- mainLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- mainLabel.TextXAlignment = Enum.TextXAlignment.Left
- mainLabel.Parent = popup
- -- Replace clickable social button with selectable TextLabel
- local socialLink = Instance.new("TextLabel")
- socialLink.Position = UDim2.new(0, 60, 0, 40)
- socialLink.Size = UDim2.new(1, -70, 0, 18)
- socialLink.BackgroundTransparency = 1
- socialLink.Text = "youtube.com/Chilled"
- socialLink.Font = Enum.Font.Gotham
- socialLink.TextSize = 13
- socialLink.TextColor3 = Color3.fromRGB(0, 170, 255)
- socialLink.TextXAlignment = Enum.TextXAlignment.Left
- socialLink.Selectable = true -- allows text to be copied on mobile
- socialLink.Parent = popup
- -- Fade in popup background and icon image
- local tweenPopupIn = TweenService:Create(popup, TweenInfo.new(0.5), {BackgroundTransparency = 0})
- local tweenIconIn = TweenService:Create(icon, TweenInfo.new(0.5), {ImageTransparency = 0})
- tweenPopupIn:Play()
- tweenIconIn:Play()
- task.wait(8)
- -- Fade out popup background and icon image
- local tweenPopupOut = TweenService:Create(popup, TweenInfo.new(0.5), {BackgroundTransparency = 1})
- local tweenIconOut = TweenService:Create(icon, TweenInfo.new(0.5), {ImageTransparency = 1})
- tweenPopupOut:Play()
- tweenIconOut:Play()
- TweenService:Create(blur, TweenInfo.new(0.5), {Size = 0}):Play()
- task.delay(0.5, function()
- blur:Destroy()
- gui:Destroy()
- end)
- -- START OF THE UI Library V0.0.6 (Smaller UI)
- local UIS = game:GetService("UserInputService")
- local UILib = {}
- local isCollapsed = true
- local dragging, dragStart, startPos
- local function createRounded(instance, radius)
- local corner = Instance.new("UICorner")
- corner.CornerRadius = UDim.new(0, radius or 6)
- corner.Parent = instance
- end
- -- UI Container
- local ScreenGui = Instance.new("ScreenGui")
- ScreenGui.Name = "DeltaUILib"
- ScreenGui.ResetOnSpawn = false
- ScreenGui.IgnoreGuiInset = true
- ScreenGui.Parent = parentGui
- -- Main Window
- local MainFrame = Instance.new("Frame")
- MainFrame.Name = "MainFrame"
- MainFrame.Position = UDim2.new(0.3, 0, 0.3, 0)
- MainFrame.Size = UDim2.new(0, 250, 0, 25) -- smaller width and height
- MainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- MainFrame.BorderSizePixel = 0
- MainFrame.Active = true
- MainFrame.Parent = ScreenGui
- createRounded(MainFrame, 6) -- slightly smaller corner radius
- local UIStroke = Instance.new("UIStroke", MainFrame)
- UIStroke.Thickness = 1.5
- UIStroke.Color = Color3.fromRGB(0, 170, 255)
- UIStroke.Transparency = 0.3
- -- Title Bar
- local TitleBar = Instance.new("TextButton")
- TitleBar.Text = " UI Menu "
- TitleBar.Font = Enum.Font.GothamBold
- TitleBar.TextSize = 14 -- smaller font size
- TitleBar.Size = UDim2.new(1, 0, 0, 25) -- shorter height
- TitleBar.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- TitleBar.TextColor3 = Color3.fromRGB(255, 255, 255)
- TitleBar.BorderSizePixel = 0
- TitleBar.AutoButtonColor = false
- TitleBar.Parent = MainFrame
- createRounded(TitleBar, 6)
- -- Collapse Button
- local CollapseButton = Instance.new("TextButton")
- CollapseButton.Size = UDim2.new(0, 25, 1, 0)
- CollapseButton.Position = UDim2.new(1, -25, 0, 0)
- CollapseButton.Text = "+"
- CollapseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- CollapseButton.Font = Enum.Font.GothamBold
- CollapseButton.TextSize = 14
- CollapseButton.BackgroundTransparency = 1
- CollapseButton.Parent = TitleBar
- -- Add icon to TitleBar
- local titleIcon = Instance.new("ImageLabel")
- titleIcon.Size = UDim2.new(0, 20, 0, 20) -- small square icon
- titleIcon.Position = UDim2.new(0, 5, 0.5, -10) -- left side with vertical center alignment
- titleIcon.BackgroundTransparency = 1
- titleIcon.Image = "rbxassetid://6031075938" -- same asset ID as your popup icon
- titleIcon.ScaleType = Enum.ScaleType.Fit
- titleIcon.Parent = TitleBar
- -- Container (scrolling frame for controls)
- local Container = Instance.new("ScrollingFrame")
- Container.Size = UDim2.new(1, -8, 1, -32)
- Container.Position = UDim2.new(0, 4, 0, 29)
- Container.CanvasSize = UDim2.new(0, 0, 0, 0)
- Container.ScrollBarThickness = 5
- Container.AutomaticCanvasSize = Enum.AutomaticSize.Y
- Container.BackgroundTransparency = 1
- Container.Visible = false
- Container.Parent = MainFrame
- local UIListLayout = Instance.new("UIListLayout", Container)
- UIListLayout.Padding = UDim.new(0, 5) -- smaller padding
- UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
- -- Collapse toggle logic
- CollapseButton.MouseButton1Click:Connect(function()
- isCollapsed = not isCollapsed
- Container.Visible = not isCollapsed
- MainFrame.Size = isCollapsed and UDim2.new(0, 250, 0, 25) or UDim2.new(0, 250, 0, 320) -- adjusted height for expanded
- CollapseButton.Text = isCollapsed and "+" or "–"
- end)
- -- Draggable logic (exclude collapse button area)
- TitleBar.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- if UIS:GetFocusedTextBox() == nil then
- local mousePos = input.Position
- local cbPos = CollapseButton.AbsolutePosition
- local cbSize = CollapseButton.AbsoluteSize
- if not (mousePos.X >= cbPos.X and mousePos.X <= cbPos.X + cbSize.X) then
- dragging = true
- dragStart = input.Position
- startPos = MainFrame.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end
- end
- end)
- UIS.InputChanged:Connect(function(input)
- if dragging and input.UserInputType == Enum.UserInputType.MouseMovement 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)
- -- API Functions --
- function UILib:SetTitle(text)
- TitleBar.Text = " " .. tostring(text)
- end
- function UILib:AddSection(text)
- local lbl = Instance.new("TextLabel")
- lbl.Text = tostring(text)
- lbl.Font = Enum.Font.GothamBold
- lbl.TextSize = 12 -- smaller font size
- lbl.TextColor3 = Color3.fromRGB(180, 180, 180)
- lbl.BackgroundTransparency = 1
- lbl.Size = UDim2.new(1, -8, 0, 20) -- smaller height
- lbl.TextXAlignment = Enum.TextXAlignment.Left
- lbl.Parent = Container
- end
- function UILib:AddButton(text, callback)
- local btn = Instance.new("TextButton")
- btn.Text = tostring(text)
- btn.Font = Enum.Font.Gotham
- btn.TextSize = 13 -- smaller font size
- btn.Size = UDim2.new(1, -8, 0, 24) -- smaller height
- btn.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- btn.TextColor3 = Color3.fromRGB(255, 255, 255)
- btn.BorderSizePixel = 0
- btn.AutoButtonColor = true
- btn.MouseButton1Click:Connect(callback)
- btn.Parent = Container
- createRounded(btn, 5)
- end
- function UILib:AddToggle(text, config, callback)
- if typeof(config) == "function" then
- callback = config
- config = {}
- end
- local loop = config.loop
- local toggle = Instance.new("TextButton")
- toggle.Font = Enum.Font.Gotham
- toggle.TextSize = 13 -- smaller font size
- toggle.Size = UDim2.new(1, -8, 0, 24) -- smaller height
- toggle.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- toggle.BorderSizePixel = 0
- toggle.AutoButtonColor = true
- toggle.Parent = Container
- createRounded(toggle, 5)
- local state = false
- local loopingThread = nil
- local function updateText()
- local status = state and "[ON] " or "[OFF] "
- local color = state and Color3.fromRGB(0, 255, 0) or Color3.fromRGB(255, 80, 80)
- toggle.Text = status .. text
- toggle.TextColor3 = color
- end
- toggle.MouseButton1Click:Connect(function()
- state = not state
- updateText()
- if loop then
- if state then
- local delayTime = tonumber(config.loopdelay) or 0.2
- loopingThread = coroutine.create(function()
- while state do
- pcall(callback)
- task.wait(delayTime)
- end
- end)
- coroutine.resume(loopingThread)
- else
- loopingThread = nil
- end
- else
- pcall(callback, state)
- end
- end)
- updateText()
- end
- function UILib:AddSlider(text, settings, callback)
- local frame = Instance.new("Frame")
- frame.Size = UDim2.new(1, -8, 0, 35) -- smaller height
- frame.BackgroundTransparency = 1
- frame.Parent = Container
- local lbl = Instance.new("TextLabel")
- lbl.Text = text .. ": " .. tostring(settings.default)
- lbl.Font = Enum.Font.Gotham
- lbl.TextSize = 12 -- smaller font size
- lbl.TextColor3 = Color3.fromRGB(200, 200, 200)
- lbl.BackgroundTransparency = 1
- lbl.Size = UDim2.new(1, 0, 0, 16)
- lbl.TextXAlignment = Enum.TextXAlignment.Left
- lbl.Parent = frame
- local sliderBG = Instance.new("Frame")
- sliderBG.Size = UDim2.new(1, 0, 0, 8) -- thinner slider
- sliderBG.Position = UDim2.new(0, 0, 0, 22)
- sliderBG.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- sliderBG.BorderSizePixel = 0
- sliderBG.Parent = frame
- createRounded(sliderBG, 5)
- local sliderFG = Instance.new("Frame")
- sliderFG.Size = UDim2.new((settings.default - settings.min)/(settings.max-settings.min), 0, 1, 0)
- sliderFG.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
- sliderFG.BorderSizePixel = 0
- sliderFG.Parent = sliderBG
- createRounded(sliderFG, 5)
- local draggingSlider = false
- local function updateSlider(input)
- local pos = math.clamp((input.Position.X - sliderBG.AbsolutePosition.X) / sliderBG.AbsoluteSize.X, 0, 1)
- local value = math.floor(settings.min + (settings.max - settings.min) * pos)
- sliderFG.Size = UDim2.new(pos, 0, 1, 0)
- lbl.Text = text .. ": " .. tostring(value)
- callback(value)
- end
- sliderBG.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- draggingSlider = true
- updateSlider(input)
- end
- end)
- UIS.InputEnded:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- draggingSlider = false
- end
- end)
- UIS.InputChanged:Connect(function(input)
- if draggingSlider and input.UserInputType == Enum.UserInputType.MouseMovement then
- updateSlider(input)
- end
- end)
- end
- return UILib
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement