Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Kavo = {}
- -- Services
- local tween = game:GetService("TweenService")
- local tweeninfo = TweenInfo.new
- local input = game:GetService("UserInputService")
- local run = game:GetService("RunService")
- -- Utility
- local Utility = {}
- local Objects = {}
- -- Dragging Functionality
- function Kavo:DraggingEnabled(frame, parent)
- parent = parent or frame
- local dragging = false
- local dragInput, mousePos, framePos
- frame.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragging = true
- mousePos = input.Position
- framePos = parent.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- frame.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement then
- dragInput = input
- end
- end)
- input.InputChanged:Connect(function(input)
- if input == dragInput and dragging then
- local delta = input.Position - mousePos
- parent.Position = UDim2.new(framePos.X.Scale, framePos.X.Offset + delta.X, framePos.Y.Scale, framePos.Y.Offset + delta.Y)
- end
- end)
- end
- -- Tween Utility
- function Utility:TweenObject(obj, properties, duration, ...)
- tween:Create(obj, tweeninfo(duration, ...), properties):Play()
- end
- -- Theme System
- local themes = {
- SchemeColor = Color3.fromRGB(100, 120, 180),
- Background = Color3.fromRGB(30, 32, 40),
- Header = Color3.fromRGB(25, 27, 35),
- TextColor = Color3.fromRGB(240, 240, 240),
- ElementColor = Color3.fromRGB(40, 42, 50),
- AccentColor = Color3.fromRGB(80, 150, 220)
- }
- local themeStyles = {
- DarkTheme = {
- SchemeColor = Color3.fromRGB(70, 70, 70),
- Background = Color3.fromRGB(20, 20, 20),
- Header = Color3.fromRGB(15, 15, 15),
- TextColor = Color3.fromRGB(240, 240, 240),
- ElementColor = Color3.fromRGB(30, 30, 30),
- AccentColor = Color3.fromRGB(100, 100, 100)
- },
- LightTheme = {
- SchemeColor = Color3.fromRGB(180, 180, 180),
- Background = Color3.fromRGB(240, 240, 240),
- Header = Color3.fromRGB(220, 220, 220),
- TextColor = Color3.fromRGB(30, 30, 30),
- ElementColor = Color3.fromRGB(230, 230, 230),
- AccentColor = Color3.fromRGB(150, 150, 150)
- },
- Ocean = {
- SchemeColor = Color3.fromRGB(86, 180, 233),
- Background = Color3.fromRGB(20, 40, 60),
- Header = Color3.fromRGB(15, 35, 55),
- TextColor = Color3.fromRGB(220, 240, 255),
- ElementColor = Color3.fromRGB(30, 60, 90),
- AccentColor = Color3.fromRGB(100, 200, 255)
- },
- Midnight = {
- SchemeColor = Color3.fromRGB(26, 189, 158),
- Background = Color3.fromRGB(30, 50, 70),
- Header = Color3.fromRGB(20, 40, 60),
- TextColor = Color3.fromRGB(220, 240, 250),
- ElementColor = Color3.fromRGB(40, 60, 80),
- AccentColor = Color3.fromRGB(100, 220, 180)
- },
- Synthwave = {
- SchemeColor = Color3.fromRGB(255, 100, 200),
- Background = Color3.fromRGB(20, 10, 40),
- Header = Color3.fromRGB(30, 15, 50),
- TextColor = Color3.fromRGB(240, 220, 255),
- ElementColor = Color3.fromRGB(40, 20, 60),
- AccentColor = Color3.fromRGB(255, 150, 220)
- }
- }
- local oldTheme = ""
- -- Settings
- local SettingsT = {}
- local Name = "KavoConfig.JSON"
- pcall(function()
- if not pcall(function() readfile(Name) end) then
- writefile(Name, game:service'HttpService':JSONEncode(SettingsT))
- end
- Settings = game:service'HttpService':JSONEncode(readfile(Name))
- end)
- -- UI Creation
- local LibName = tostring(math.random(1, 100))..tostring(math.random(1,50))..tostring(math.random(1, 100))
- function Kavo:ToggleUI()
- if game.CoreGui[LibName].Enabled then
- game.CoreGui[LibName].Enabled = false
- else
- game.CoreGui[LibName].Enabled = true
- end
- end
- function Kavo.CreateLib(kavName, themeList)
- -- Theme setup
- if not themeList then themeList = themes end
- if type(themeList) == "string" then
- themeList = themeStyles[themeList] or themes
- else
- -- Ensure all required colors are set
- themeList.SchemeColor = themeList.SchemeColor or themes.SchemeColor
- themeList.Background = themeList.Background or themes.Background
- themeList.Header = themeList.Header or themes.Header
- themeList.TextColor = themeList.TextColor or themes.TextColor
- themeList.ElementColor = themeList.ElementColor or themes.ElementColor
- themeList.AccentColor = themeList.AccentColor or themes.AccentColor
- end
- -- Create main UI
- kavName = kavName or "Kavo UI"
- table.insert(Kavo, kavName)
- -- Clean up existing UI
- for i,v in pairs(game.CoreGui:GetChildren()) do
- if v:IsA("ScreenGui") and v.Name == kavName then
- v:Destroy()
- end
- end
- -- Main container
- local ScreenGui = Instance.new("ScreenGui")
- ScreenGui.Name = LibName
- ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- ScreenGui.ResetOnSpawn = false
- -- Main frame with smooth shadow effect
- local Main = Instance.new("Frame")
- Main.Name = "Main"
- Main.Parent = ScreenGui
- Main.BackgroundColor3 = themeList.Background
- Main.ClipsDescendants = true
- Main.Position = UDim2.new(0.35, 0, 0.25, 0)
- Main.Size = UDim2.new(0, 550, 0, 350)
- Main.ZIndex = 2
- -- Shadow effect
- local Shadow = Instance.new("ImageLabel")
- Shadow.Name = "Shadow"
- Shadow.Parent = Main
- Shadow.BackgroundTransparency = 1
- Shadow.Position = UDim2.new(0, -15, 0, -15)
- Shadow.Size = UDim2.new(1, 30, 1, 30)
- Shadow.Image = "rbxassetid://1316045217"
- Shadow.ImageColor3 = Color3.new(0, 0, 0)
- Shadow.ImageTransparency = 0.8
- Shadow.ScaleType = Enum.ScaleType.Slice
- Shadow.SliceCenter = Rect.new(10, 10, 118, 118)
- Shadow.ZIndex = 1
- -- Rounded corners
- local MainCorner = Instance.new("UICorner")
- MainCorner.CornerRadius = UDim.new(0, 8)
- MainCorner.Name = "MainCorner"
- MainCorner.Parent = Main
- -- Header
- local MainHeader = Instance.new("Frame")
- MainHeader.Name = "MainHeader"
- MainHeader.Parent = Main
- MainHeader.BackgroundColor3 = themeList.Header
- MainHeader.Size = UDim2.new(0, 550, 0, 35)
- Objects[MainHeader] = "BackgroundColor3"
- local headerCover = Instance.new("UICorner")
- headerCover.CornerRadius = UDim.new(0, 8)
- headerCover.Name = "headerCover"
- headerCover.Parent = MainHeader
- local title = Instance.new("TextLabel")
- title.Name = "title"
- title.Parent = MainHeader
- title.BackgroundTransparency = 1
- title.Position = UDim2.new(0.03, 0, 0, 0)
- title.Size = UDim2.new(0.5, 0, 1, 0)
- title.Font = Enum.Font.GothamSemibold
- title.Text = kavName
- title.TextColor3 = themeList.TextColor
- title.TextSize = 16
- title.TextXAlignment = Enum.TextXAlignment.Left
- -- Close button with hover effect
- local close = Instance.new("ImageButton")
- close.Name = "close"
- close.Parent = MainHeader
- close.BackgroundTransparency = 1
- close.Position = UDim2.new(0.94, 0, 0.15, 0)
- close.Size = UDim2.new(0, 25, 0, 25)
- close.ZIndex = 2
- close.Image = "rbxassetid://3926305904"
- close.ImageRectOffset = Vector2.new(284, 4)
- close.ImageRectSize = Vector2.new(24, 24)
- close.ImageColor3 = themeList.TextColor
- close.MouseEnter:Connect(function()
- game.TweenService:Create(close, TweenInfo.new(0.1), {
- ImageColor3 = Color3.fromRGB(255, 80, 80)
- }):Play()
- end)
- close.MouseLeave:Connect(function()
- game.TweenService:Create(close, TweenInfo.new(0.1), {
- ImageColor3 = themeList.TextColor
- }):Play()
- end)
- close.MouseButton1Click:Connect(function()
- game.TweenService:Create(close, TweenInfo.new(0.1), {
- ImageTransparency = 1
- }):Play()
- wait()
- game.TweenService:Create(Main, TweenInfo.new(0.2), {
- Size = UDim2.new(0,0,0,0),
- Position = UDim2.new(0, Main.AbsolutePosition.X + (Main.AbsoluteSize.X / 2), 0, Main.AbsolutePosition.Y + (Main.AbsoluteSize.Y / 2))
- }):Play()
- wait(0.5)
- ScreenGui:Destroy()
- end)
- -- Sidebar
- local MainSide = Instance.new("Frame")
- MainSide.Name = "MainSide"
- MainSide.Parent = Main
- MainSide.BackgroundColor3 = themeList.Header
- Objects[MainSide] = "Header"
- MainSide.Position = UDim2.new(0, 0, 0.1, 0)
- MainSide.Size = UDim2.new(0, 160, 0, 315)
- local sideCorner = Instance.new("UICorner")
- sideCorner.CornerRadius = UDim.new(0, 8)
- sideCorner.Name = "sideCorner"
- sideCorner.Parent = MainSide
- -- Tab container
- local tabFrames = Instance.new("Frame")
- tabFrames.Name = "tabFrames"
- tabFrames.Parent = MainSide
- tabFrames.BackgroundTransparency = 1
- tabFrames.Position = UDim2.new(0.05, 0, 0.02, 0)
- tabFrames.Size = UDim2.new(0.9, 0, 0.96, 0)
- local tabListing = Instance.new("UIListLayout")
- tabListing.Name = "tabListing"
- tabListing.Parent = tabFrames
- tabListing.SortOrder = Enum.SortOrder.LayoutOrder
- tabListing.Padding = UDim.new(0, 8)
- -- Content area
- local pages = Instance.new("Frame")
- pages.Name = "pages"
- pages.Parent = Main
- pages.BackgroundTransparency = 1
- pages.Position = UDim2.new(0.3, 0, 0.1, 0)
- pages.Size = UDim2.new(0.68, 0, 0.88, 0)
- local Pages = Instance.new("Folder")
- Pages.Name = "Pages"
- Pages.Parent = pages
- -- Info container for tooltips
- local infoContainer = Instance.new("Frame")
- infoContainer.Name = "infoContainer"
- infoContainer.Parent = Main
- infoContainer.BackgroundTransparency = 1
- infoContainer.Position = UDim2.new(0.3, 0, 0.9, 0)
- infoContainer.Size = UDim2.new(0.68, 0, 0.08, 0)
- -- Blur effect frame
- local blurFrame = Instance.new("Frame")
- blurFrame.Name = "blurFrame"
- blurFrame.Parent = pages
- blurFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- blurFrame.BackgroundTransparency = 1
- blurFrame.Size = UDim2.new(1, 0, 1, 0)
- blurFrame.ZIndex = 999
- -- Enable dragging
- Kavo:DraggingEnabled(MainHeader, Main)
- -- Theme updating
- coroutine.wrap(function()
- while wait() do
- Main.BackgroundColor3 = themeList.Background
- MainHeader.BackgroundColor3 = themeList.Header
- MainSide.BackgroundColor3 = themeList.Header
- title.TextColor3 = themeList.TextColor
- close.ImageColor3 = themeList.TextColor
- end
- end)()
- -- Color changing function
- function Kavo:ChangeColor(property, color)
- if themeList[property] then
- themeList[property] = color
- end
- end
- -- Tab system
- local Tabs = {}
- local first = true
- function Tabs:NewTab(tabName)
- tabName = tabName or "Tab"
- -- Tab button
- local tabButton = Instance.new("TextButton")
- tabButton.Name = tabName.."TabButton"
- tabButton.Parent = tabFrames
- tabButton.BackgroundColor3 = themeList.SchemeColor
- Objects[tabButton] = "SchemeColor"
- tabButton.Size = UDim2.new(1, 0, 0, 35)
- tabButton.AutoButtonColor = false
- tabButton.Font = Enum.Font.GothamSemibold
- tabButton.Text = tabName
- tabButton.TextColor3 = themeList.TextColor
- Objects[tabButton] = "TextColor3"
- tabButton.TextSize = 14
- tabButton.BackgroundTransparency = 1
- -- Tab page
- local page = Instance.new("ScrollingFrame")
- page.Name = "Page"
- page.Parent = Pages
- page.Active = true
- page.BackgroundColor3 = themeList.Background
- page.BorderSizePixel = 0
- page.Size = UDim2.new(1, 0, 1, 0)
- page.ScrollBarThickness = 5
- page.Visible = false
- page.ScrollBarImageColor3 = themeList.SchemeColor
- page.ScrollBarThickness = 4
- local pageListing = Instance.new("UIListLayout")
- pageListing.Name = "pageListing"
- pageListing.Parent = page
- pageListing.SortOrder = Enum.SortOrder.LayoutOrder
- pageListing.Padding = UDim.new(0, 10)
- -- Rounded corners for tab button
- local UICorner = Instance.new("UICorner")
- UICorner.CornerRadius = UDim.new(0, 6)
- UICorner.Parent = tabButton
- -- Set first tab as active
- if first then
- first = false
- page.Visible = true
- tabButton.BackgroundTransparency = 0
- else
- page.Visible = false
- tabButton.BackgroundTransparency = 1
- end
- -- Tab switching
- tabButton.MouseButton1Click:Connect(function()
- for i,v in next, Pages:GetChildren() do
- v.Visible = false
- end
- page.Visible = true
- for i,v in next, tabFrames:GetChildren() do
- if v:IsA("TextButton") then
- Utility:TweenObject(v, {BackgroundTransparency = 1}, 0.2)
- end
- end
- Utility:TweenObject(tabButton, {BackgroundTransparency = 0}, 0.2)
- end)
- -- Update size function
- local function UpdateSize()
- local cS = pageListing.AbsoluteContentSize
- game.TweenService:Create(page, TweenInfo.new(0.15), {
- CanvasSize = UDim2.new(0, cS.X, 0, cS.Y)
- }):Play()
- end
- UpdateSize()
- page.ChildAdded:Connect(UpdateSize)
- page.ChildRemoved:Connect(UpdateSize)
- -- Theme updating for tab
- coroutine.wrap(function()
- while wait() do
- page.BackgroundColor3 = themeList.Background
- page.ScrollBarImageColor3 = themeList.SchemeColor
- tabButton.TextColor3 = themeList.TextColor
- tabButton.BackgroundColor3 = themeList.SchemeColor
- end
- end)()
- -- Section system
- local Sections = {}
- local focusing = false
- local viewDe = false
- function Sections:NewSection(secName, hidden)
- secName = secName or "Section"
- hidden = hidden or false
- local sectionFrame = Instance.new("Frame")
- sectionFrame.Name = "sectionFrame"
- sectionFrame.Parent = page
- sectionFrame.BackgroundColor3 = themeList.Background
- sectionFrame.BorderSizePixel = 0
- local sectionlist = Instance.new("UIListLayout")
- sectionlist.Name = "sectionlist"
- sectionlist.Parent = sectionFrame
- sectionlist.SortOrder = Enum.SortOrder.LayoutOrder
- sectionlist.Padding = UDim.new(0, 10)
- -- Section header
- local sectionHead = Instance.new("Frame")
- sectionHead.Name = "sectionHead"
- sectionHead.Parent = sectionFrame
- sectionHead.BackgroundColor3 = themeList.SchemeColor
- Objects[sectionHead] = "BackgroundColor3"
- sectionHead.Size = UDim2.new(1, 0, 0, 35)
- sectionHead.Visible = not hidden
- local sHeadCorner = Instance.new("UICorner")
- sHeadCorner.CornerRadius = UDim.new(0, 6)
- sHeadCorner.Parent = sectionHead
- local sectionName = Instance.new("TextLabel")
- sectionName.Name = "sectionName"
- sectionName.Parent = sectionHead
- sectionName.BackgroundTransparency = 1
- sectionName.Size = UDim2.new(1, -20, 1, 0)
- sectionName.Position = UDim2.new(0, 10, 0, 0)
- sectionName.Font = Enum.Font.GothamSemibold
- sectionName.Text = secName
- sectionName.TextColor3 = themeList.TextColor
- Objects[sectionName] = "TextColor3"
- sectionName.TextSize = 14
- sectionName.TextXAlignment = Enum.TextXAlignment.Left
- -- Section content
- local sectionInners = Instance.new("Frame")
- sectionInners.Name = "sectionInners"
- sectionInners.Parent = sectionFrame
- sectionInners.BackgroundTransparency = 1
- sectionInners.Position = UDim2.new(0, 0, 0, hidden and 0 or 40)
- sectionInners.Size = UDim2.new(1, 0, 0, 0)
- local sectionElListing = Instance.new("UIListLayout")
- sectionElListing.Name = "sectionElListing"
- sectionElListing.Parent = sectionInners
- sectionElListing.SortOrder = Enum.SortOrder.LayoutOrder
- sectionElListing.Padding = UDim.new(0, 8)
- -- Update sizes
- local function updateSectionFrame()
- local innerSc = sectionElListing.AbsoluteContentSize
- sectionInners.Size = UDim2.new(1, 0, 0, innerSc.Y)
- local frameSc = sectionlist.AbsoluteContentSize
- sectionFrame.Size = UDim2.new(1, 0, 0, frameSc.Y)
- UpdateSize()
- end
- updateSectionFrame()
- UpdateSize()
- -- Theme updating for section
- coroutine.wrap(function()
- while wait() do
- sectionFrame.BackgroundColor3 = themeList.Background
- sectionHead.BackgroundColor3 = themeList.SchemeColor
- sectionName.TextColor3 = themeList.TextColor
- end
- end)()
- -- Elements
- local Elements = {}
- -- Button element
- function Elements:NewButton(bname, tipInf, callback)
- bname = bname or "Button"
- tipInf = tipInf or "Click this button"
- callback = callback or function() end
- local buttonElement = Instance.new("TextButton")
- buttonElement.Name = bname
- buttonElement.Parent = sectionInners
- buttonElement.BackgroundColor3 = themeList.ElementColor
- buttonElement.ClipsDescendants = true
- buttonElement.Size = UDim2.new(1, 0, 0, 35)
- buttonElement.AutoButtonColor = false
- buttonElement.Font = Enum.Font.SourceSans
- buttonElement.Text = ""
- buttonElement.TextColor3 = Color3.fromRGB(0, 0, 0)
- buttonElement.TextSize = 14
- Objects[buttonElement] = "BackgroundColor3"
- local UICorner = Instance.new("UICorner")
- UICorner.CornerRadius = UDim.new(0, 6)
- UICorner.Parent = buttonElement
- -- Button icon
- local touch = Instance.new("ImageLabel")
- touch.Name = "touch"
- touch.Parent = buttonElement
- touch.BackgroundTransparency = 1
- touch.Position = UDim2.new(0.02, 0, 0.18, 0)
- touch.Size = UDim2.new(0, 22, 0, 22)
- touch.Image = "rbxassetid://3926305904"
- touch.ImageColor3 = themeList.SchemeColor
- Objects[touch] = "ImageColor3"
- touch.ImageRectOffset = Vector2.new(84, 204)
- touch.ImageRectSize = Vector2.new(36, 36)
- -- Button text
- local btnInfo = Instance.new("TextLabel")
- btnInfo.Name = "btnInfo"
- btnInfo.Parent = buttonElement
- btnInfo.BackgroundTransparency = 1
- btnInfo.Position = UDim2.new(0.1, 0, 0.2, 0)
- btnInfo.Size = UDim2.new(0.8, 0, 0.6, 0)
- btnInfo.Font = Enum.Font.GothamSemibold
- btnInfo.Text = bname
- btnInfo.TextColor3 = themeList.TextColor
- Objects[btnInfo] = "TextColor3"
- btnInfo.TextSize = 14
- btnInfo.TextXAlignment = Enum.TextXAlignment.Left
- -- Info button
- local viewInfo = Instance.new("ImageButton")
- viewInfo.Name = "viewInfo"
- viewInfo.Parent = buttonElement
- viewInfo.BackgroundTransparency = 1
- viewInfo.Position = UDim2.new(0.93, 0, 0.15, 0)
- viewInfo.Size = UDim2.new(0, 24, 0, 24)
- viewInfo.ZIndex = 2
- viewInfo.Image = "rbxassetid://3926305904"
- viewInfo.ImageColor3 = themeList.SchemeColor
- Objects[viewInfo] = "ImageColor3"
- viewInfo.ImageRectOffset = Vector2.new(764, 764)
- viewInfo.ImageRectSize = Vector2.new(36, 36)
- -- Ripple effect
- local Sample = Instance.new("ImageLabel")
- Sample.Name = "Sample"
- Sample.Parent = buttonElement
- Sample.BackgroundTransparency = 1
- Sample.Image = "http://www.roblox.com/asset/?id=4560909609"
- Sample.ImageColor3 = themeList.SchemeColor
- Objects[Sample] = "ImageColor3"
- Sample.ImageTransparency = 0.6
- -- Tooltip
- local moreInfo = Instance.new("TextLabel")
- moreInfo.Name = "TipMore"
- moreInfo.Parent = infoContainer
- moreInfo.BackgroundColor3 = Color3.fromRGB(
- themeList.SchemeColor.r * 255 - 14,
- themeList.SchemeColor.g * 255 - 17,
- themeList.SchemeColor.b * 255 - 13
- )
- moreInfo.Position = UDim2.new(0, 0, 2, 0)
- moreInfo.Size = UDim2.new(1, 0, 1, 0)
- moreInfo.ZIndex = 9
- moreInfo.Font = Enum.Font.GothamSemibold
- moreInfo.Text = " "..tipInf
- moreInfo.TextColor3 = themeList.TextColor
- Objects[moreInfo] = "TextColor3"
- moreInfo.TextSize = 14
- moreInfo.TextXAlignment = Enum.TextXAlignment.Left
- Objects[moreInfo] = "BackgroundColor3"
- local UICorner = Instance.new("UICorner")
- UICorner.CornerRadius = UDim.new(0, 6)
- UICorner.Parent = moreInfo
- -- Adjust text color for light themes
- if themeList.SchemeColor == Color3.fromRGB(255,255,255) then
- Utility:TweenObject(moreInfo, {TextColor3 = Color3.fromRGB(0,0,0)}, 0.2)
- end
- if themeList.SchemeColor == Color3.fromRGB(0,0,0) then
- Utility:TweenObject(moreInfo, {TextColor3 = Color3.fromRGB(255,255,255)}, 0.2)
- end
- updateSectionFrame()
- UpdateSize()
- -- Button functionality
- local ms = game.Players.LocalPlayer:GetMouse()
- local btn = buttonElement
- local sample = Sample
- btn.MouseButton1Click:Connect(function()
- if not focusing then
- callback()
- -- Ripple effect
- local c = sample:Clone()
- c.Parent = btn
- local x, y = (ms.X - c.AbsolutePosition.X), (ms.Y - c.AbsolutePosition.Y)
- c.Position = UDim2.new(0, x, 0, y)
- local len, size = 0.35, nil
- if btn.AbsoluteSize.X >= btn.AbsoluteSize.Y then
- size = (btn.AbsoluteSize.X * 1.5)
- else
- size = (btn.AbsoluteSize.Y * 1.5)
- end
- c:TweenSizeAndPosition(
- UDim2.new(0, size, 0, size),
- UDim2.new(0.5, (-size / 2), 0.5, (-size / 2)),
- 'Out', 'Quad', len, true, nil
- )
- for i = 1, 10 do
- c.ImageTransparency = c.ImageTransparency + 0.05
- wait(len / 12)
- end
- c:Destroy()
- else
- for i,v in next, infoContainer:GetChildren() do
- Utility:TweenObject(v, {Position = UDim2.new(0,0,2,0)}, 0.2)
- focusing = false
- end
- Utility:TweenObject(blurFrame, {BackgroundTransparency = 1}, 0.2)
- end
- end)
- -- Hover effects
- local hovering = false
- btn.MouseEnter:Connect(function()
- if not focusing then
- game.TweenService:Create(btn, TweenInfo.new(0.1), {
- BackgroundColor3 = Color3.fromRGB(
- themeList.ElementColor.r * 255 + 8,
- themeList.ElementColor.g * 255 + 9,
- themeList.ElementColor.b * 255 + 10
- )
- }):Play()
- hovering = true
- end
- end)
- btn.MouseLeave:Connect(function()
- if not focusing then
- game.TweenService:Create(btn, TweenInfo.new(0.1), {
- BackgroundColor3 = themeList.ElementColor
- }):Play()
- hovering = false
- end
- end)
- -- Tooltip functionality
- viewInfo.MouseButton1Click:Connect(function()
- if not viewDe then
- viewDe = true
- focusing = true
- for i,v in next, infoContainer:GetChildren() do
- if v ~= moreInfo then
- Utility:TweenObject(v, {Position = UDim2.new(0,0,2,0)}, 0.2)
- end
- end
- Utility:TweenObject(moreInfo, {Position = UDim2.new(0,0,0,0)}, 0.2)
- Utility:TweenObject(blurFrame, {BackgroundTransparency = 0.5}, 0.2)
- Utility:TweenObject(btn, {BackgroundColor3 = themeList.ElementColor}, 0.2)
- wait(1.5)
- focusing = false
- Utility:TweenObject(moreInfo, {Position = UDim2.new(0,0,2,0)}, 0.2)
- Utility:TweenObject(blurFrame, {BackgroundTransparency = 1}, 0.2)
- wait(0)
- viewDe = false
- end
- end)
- -- Theme updating for button
- coroutine.wrap(function()
- while wait() do
- if not hovering then
- buttonElement.BackgroundColor3 = themeList.ElementColor
- end
- viewInfo.ImageColor3 = themeList.SchemeColor
- Sample.ImageColor3 = themeList.SchemeColor
- moreInfo.BackgroundColor3 = Color3.fromRGB(
- themeList.SchemeColor.r * 255 - 14,
- themeList.SchemeColor.g * 255 - 17,
- themeList.SchemeColor.b * 255 - 13
- )
- moreInfo.TextColor3 = themeList.TextColor
- touch.ImageColor3 = themeList.SchemeColor
- btnInfo.TextColor3 = themeList.TextColor
- end
- end)()
- -- Button update function
- local ButtonFunction = {}
- function ButtonFunction:UpdateButton(newTitle)
- btnInfo.Text = newTitle
- end
- return ButtonFunction
- end
- -- Other element functions (Toggle, Slider, Dropdown, etc.) would follow the same pattern
- -- with improved visual design and consistent theming
- return Elements
- end
- return Sections
- end
- return Tabs
- end
- return Kavo
Add Comment
Please, Sign In to add comment