Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- // Services
- local CoreGui = game:GetService('CoreGui')
- local TweenService = game:GetService('TweenService')
- local UserInputService = game:GetService('UserInputService')
- local RunService = game:GetService('RunService')
- local TextService = game:GetService('TextService')
- local Players = game:GetService('Players')
- local HttpService = game:GetService('HttpService')
- -- // Preset
- local MainColor3 = Color3.fromRGB(30, 30, 36)
- local WhiteColor3 = Color3.fromRGB(255, 255, 255)
- local Duplicate = CoreGui:FindFirstChild("OVP Gui")
- if Duplicate then
- Duplicate:Destroy()
- end
- local OVP_Gui = Instance.new("ScreenGui")
- OVP_Gui.Name = "OVP Gui"
- OVP_Gui.Parent = CoreGui
- local OVP_Frame = Instance.new("Frame")
- OVP_Frame.Name = "OVP Frame"
- OVP_Frame.Parent = OVP_Gui
- OVP_Frame.Size = UDim2.new(0, 200, 0, 40)
- OVP_Frame.Position = UDim2.new(0, 5, 0, 0)
- OVP_Frame.BackgroundColor3 = MainColor3
- OVP_Frame.BorderColor3 = WhiteColor3
- local RoundedCorner = Instance.new("UICorner")
- RoundedCorner.CornerRadius = UDim.new(0, 5)
- RoundedCorner.Parent = OVP_Frame
- local OVP_Text = Instance.new("TextLabel")
- OVP_Text.Parent = OVP_Frame
- OVP_Text.Name = "OVP Header"
- OVP_Text.Text = "OVP"
- OVP_Text.Font = "ArimoBold"
- OVP_Text.TextSize = 18
- OVP_Text.TextColor3 = WhiteColor3
- OVP_Text.Size = UDim2.new(0, 190, 0, 40)
- OVP_Text.Position = UDim2.new(0, 10, 0, 0)
- OVP_Text.TextXAlignment = "Left"
- OVP_Text.BorderSizePixel = 0
- OVP_Text.BackgroundTransparency = 1
- local ScrollingFrame = Instance.new("ScrollingFrame")
- ScrollingFrame.Name = "Scrolling Frame"
- ScrollingFrame.Parent = OVP_Frame
- ScrollingFrame.Size = UDim2.new(0, 0, 0, 0)
- ScrollingFrame.Position = UDim2.new(0, 0, 0, 40)
- ScrollingFrame.ScrollBarThickness = 0
- ScrollingFrame.BorderSizePixel = 0
- ScrollingFrame.BackgroundColor3 = MainColor3
- -- // Tween Service
- local function onMouseEnter()
- local tweenInfo = TweenInfo.new(0.1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
- local goal = {Size = UDim2.new(0, 200, 0.5, 0)} -- New size
- local tween = TweenService:Create(OVP_Frame, tweenInfo, goal)
- tween:Play()
- local scrollTween = TweenService:Create(ScrollingFrame, tweenInfo, {Size = UDim2.new(1, 0, 1, -50)})
- scrollTween:Play()
- end
- -- // Function
- local function updateCanvasSize()
- local totalHeight = 0
- for _, child in pairs(ScrollingFrame:GetChildren()) do
- if child:IsA("GuiObject") then
- totalHeight = totalHeight + child.Size.Y.Offset + listLayout.Padding.Offset
- end
- end
- scrollingFrame.CanvasSize = UDim2.new(0, 0, 0, totalHeight)
- end
- ScrollingFrame.ChildAdded:Connect(updateCanvasSize)
- ScrollingFrame.ChildRemoved:Connect(updateCanvasSize)
- local function onMouseLeave()
- local tweenInfo = TweenInfo.new(0.1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
- local goal = {Size = UDim2.new(0, 200, 0, 40)} -- Reset size
- local tween = TweenService:Create(OVP_Frame, tweenInfo, goal)
- tween:Play()
- local scrollTween = TweenService:Create(ScrollingFrame, tweenInfo, {Size = UDim2.new(0, 0, 0, 0)})
- scrollTween:Play()
- end
- -- Connect mouse events to the frame
- OVP_Frame.MouseEnter:Connect(onMouseEnter)
- OVP_Frame.MouseLeave:Connect(onMouseLeave)
- local OVP_Library = {}
- return OVP_Library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement