Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- >>: Variables
- local players = game:service('Players')
- local player = players.LocalPlayer
- local mouse = player:GetMouse()
- local run = game:service('RunService')
- local stepped = run.Stepped
- local uis = game:GetService("UserInputService")
- local Value
- local windowCount = 0
- local xOffset = 10
- -- >>: Services
- local UserInputService = game:GetService("UserInputService")
- -- >>: GUI Functions
- if game.CoreGui:FindFirstChild("Vibe") then
- game.CoreGui:FindFirstChild("Vibe"):Destroy()
- end
- -- >>: Library
- local Library = {}
- function Library:CreateLibrary()
- local Vibe = Instance.new("ScreenGui")
- Vibe.Name = "Vibe"
- Vibe.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- Vibe.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Vibe.ResetOnSpawn = false
- local keybindConnection
- function Library:Toggle(key)
- if keybindConnection then keybindConnection:Disconnect() end
- keybindConnection = UserInputService.InputBegan:Connect(function(input, gp)
- if not gp and input.KeyCode == Enum.KeyCode[key] then
- Vibe.Enabled = not Vibe.Enabled
- end
- end)
- end
- local CategoryHandler = {}
- function CategoryHandler:NewCategory(Name)
- windowCount = windowCount + 1
- local winCount = windowCount
- local zindex = winCount * 7
- local Category = Instance.new("Frame")
- local CategoryName = Instance.new("TextLabel")
- local CategoryListing = Instance.new("UIListLayout")
- local Module = Instance.new("Frame")
- local ModuleListing = Instance.new("UIListLayout")
- local function Dragify(obj)
- spawn(function()
- local minitial
- local initial
- local isdragging
- CategoryName.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- isdragging = true
- minitial = input.Position
- initial = obj.Position
- local con
- con = stepped:Connect(function()
- if isdragging then
- local delta = Vector3.new(mouse.X, mouse.Y, 0) - minitial
- obj.Position = UDim2.new(initial.X.Scale, initial.X.Offset + delta.X, initial.Y.Scale, initial.Y.Offset + delta.Y)
- else
- con:Disconnect()
- end
- end)
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- isdragging = false
- end
- end)
- end
- end)
- end)
- end
- Category.Name = "Category"
- Category.Parent = Vibe
- Category.BackgroundColor3 = Color3.fromRGB(46, 46, 46)
- Category.BorderColor3 = Color3.fromRGB(42, 123, 155)
- Category.Position = UDim2.new(0, xOffset, 0, 20)
- Category.Size = UDim2.new(0, 150, 0, 0)
- Category.AutomaticSize = Enum.AutomaticSize.Y
- Dragify(Category)
- xOffset = xOffset + 175
- CategoryName.Name = "CategoryName"
- CategoryName.Parent = Category
- CategoryName.BackgroundColor3 = Color3.fromRGB(39, 39, 39)
- CategoryName.BorderColor3 = Color3.fromRGB(42, 123, 155)
- CategoryName.BorderSizePixel = 0
- CategoryName.Size = UDim2.new(1, 0, 0, 30)
- CategoryName.Font = Enum.Font.Nunito
- CategoryName.FontFace = Font.new("rbxasset://fonts/families/Nunito.json", Enum.FontWeight.Bold)
- CategoryName.Text = Name:upper()
- CategoryName.TextColor3 = Color3.fromRGB(255, 255, 255)
- CategoryName.TextSize = 19.000
- CategoryListing.Name = "CategoryListing"
- CategoryListing.Parent = Category
- CategoryListing.HorizontalAlignment = Enum.HorizontalAlignment.Center
- CategoryListing.SortOrder = Enum.SortOrder.LayoutOrder
- Module.Name = "Module"
- Module.Parent = Category
- Module.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Module.BackgroundTransparency = 1.000
- Module.BorderSizePixel = 0
- Module.Size = UDim2.new(1, 0, 0, 0)
- ModuleListing.Name = "ModuleListing"
- ModuleListing.Parent = Module
- ModuleListing.HorizontalAlignment = Enum.HorizontalAlignment.Center
- ModuleListing.SortOrder = Enum.SortOrder.LayoutOrder
- local ModuleHandler = {}
- function ModuleHandler:NewModule(Name, default, callback)
- local DefaultLocal = default or false
- local ToggleInit = {}
- local ModuleButton = Instance.new("TextButton")
- local ModuleSettings = Instance.new("Frame")
- local ModuleSettingsListing = Instance.new("UIListLayout")
- ModuleButton.Name = "ModuleButton"
- ModuleButton.Parent = Module
- ModuleButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- ModuleButton.BackgroundTransparency = 1.000
- ModuleButton.BorderSizePixel = 0
- ModuleButton.Size = UDim2.new(1, 0, 0, 30)
- ModuleButton.AutoButtonColor = false
- ModuleButton.Font = Enum.Font.Nunito
- ModuleButton.Text = Name
- ModuleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- ModuleButton.TextSize = 19.000
- ModuleSettings.Name = "ModuleSettings"
- ModuleSettings.Parent = Module
- ModuleSettings.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- ModuleSettings.BackgroundTransparency = 1.000
- ModuleSettings.BorderSizePixel = 0
- ModuleSettings.Size = UDim2.new(1, 0, 0, 0)
- ModuleSettings.Visible = false
- ModuleSettingsListing.Name = "ModuleSettingsListing"
- ModuleSettingsListing.Parent = ModuleSettings
- ModuleSettingsListing.HorizontalAlignment = Enum.HorizontalAlignment.Center
- ModuleSettingsListing.SortOrder = Enum.SortOrder.LayoutOrder
- local tog = false
- local ToggleState = false
- ModuleButton.MouseButton2Click:Connect(function()
- tog = not tog
- if tog then
- ModuleSettings.Visible = true
- else
- ModuleSettings.Visible = false
- end
- end)
- local function SetState(State)
- if State then
- game.TweenService:Create(ModuleButton, TweenInfo.new(0.15, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {
- TextColor3 = Color3.fromRGB(42, 123, 155)
- }):Play()
- elseif not State then
- game.TweenService:Create(ModuleButton, TweenInfo.new(0.15, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {
- TextColor3 = Color3.fromRGB(255, 255, 255)
- }):Play()
- end
- ToggleState = State
- callback(State)
- end
- ModuleButton.MouseButton1Click:Connect(function()
- ToggleState = not ToggleState
- SetState(ToggleState)
- end)
- if default == nil then
- function ToggleInit:SetState(State)
- SetState(State)
- end
- else
- SetState(DefaultLocal)
- end
- function ToggleInit:GetState(State)
- return ToggleState
- end
- function ModuleHandler:NewLabel(Name)
- local Label = Instance.new("TextLabel")
- Label.Name = "Label"
- Label.Parent = ModuleSettings
- Label.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Label.BackgroundTransparency = 1.000
- Label.Size = UDim2.new(1, 0, 0, 30)
- Label.Font = Enum.Font.Nunito
- Label.FontFace = Font.new("rbxasset://fonts/families/Nunito.json", Enum.FontWeight.Bold)
- Label.Text = Name:upper()
- Label.TextColor3 = Color3.fromRGB(90, 90, 90)
- Label.TextSize = 19.000
- end
- function ModuleHandler:NewToggle(Name, default, callback)
- local tog = default or false
- local ToggleButton = Instance.new("TextButton")
- local ToggleButtonPadding = Instance.new("UIPadding")
- local Toggle = Instance.new("Frame")
- local ToggleCorner = Instance.new("UICorner")
- ToggleButton.Name = "ToggleButton"
- ToggleButton.Parent = ModuleSettings
- ToggleButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- ToggleButton.BackgroundTransparency = 1.000
- ToggleButton.BorderSizePixel = 0
- ToggleButton.Size = UDim2.new(1, 0, 0, 30)
- ToggleButton.Font = Enum.Font.Nunito
- ToggleButton.Text = Name
- ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- ToggleButton.TextSize = 19.000
- ToggleButton.TextXAlignment = Enum.TextXAlignment.Left
- ToggleButtonPadding.Name = "ToggleButtonPadding"
- ToggleButtonPadding.Parent = ToggleButton
- ToggleButtonPadding.PaddingLeft = UDim.new(0, 10)
- Toggle.Name = "Toggle"
- Toggle.Parent = ToggleButton
- Toggle.Position = UDim2.new(0.800000012, 0, 0.200000003, 0)
- Toggle.BackgroundColor3 = tog and Color3.fromRGB(42, 123, 155) or Color3.fromRGB(37, 37, 37)
- Toggle.Size = UDim2.new(0, 18, 0, 18)
- ToggleCorner.CornerRadius = UDim.new(0, 3)
- ToggleCorner.Name = "ToggleCorner"
- ToggleCorner.Parent = Toggle
- ToggleButton.MouseButton1Click:Connect(function()
- tog = not tog
- callback(tog)
- if tog then
- game.TweenService:Create(Toggle, TweenInfo.new(0.15, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {
- BackgroundColor3 = Color3.fromRGB(42, 123, 155)
- }):Play()
- else
- game.TweenService:Create(Toggle, TweenInfo.new(0.15, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {
- BackgroundColor3 = Color3.fromRGB(37, 37, 37)
- }):Play()
- end
- end)
- end
- function ModuleHandler:NewSlider(Name, minvalue, maxvalue, default, callback)
- minvalue = minvalue or 0
- maxvalue = maxvalue or 100
- callback = callback or function() end
- local Slider = Instance.new("TextLabel")
- local SliderPadding = Instance.new("UIPadding")
- local SliderValue = Instance.new("TextBox")
- local SliderValueCorner = Instance.new("UICorner")
- Slider.Name = "Slider"
- Slider.Parent = ModuleSettings
- Slider.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Slider.BackgroundTransparency = 1.000
- Slider.Size = UDim2.new(1, 0, 0, 30)
- Slider.Font = Enum.Font.Nunito
- Slider.Text = Name
- Slider.TextColor3 = Color3.fromRGB(255, 255, 255)
- Slider.TextSize = 19.000
- Slider.TextXAlignment = Enum.TextXAlignment.Left
- SliderPadding.Name = "SliderPadding"
- SliderPadding.Parent = Slider
- SliderPadding.PaddingLeft = UDim.new(0, 10)
- SliderValue.Name = "SliderValue"
- SliderValue.Parent = Slider
- SliderValue.AnchorPoint = Vector2.new(1, 0)
- SliderValue.BackgroundColor3 = Color3.fromRGB(37, 37, 37)
- SliderValue.Position = UDim2.new(0.930000007, 0, 0.200000003, 0)
- SliderValue.Size = UDim2.new(0, 18, 0, 18)
- SliderValue.Font = Enum.Font.Nunito
- SliderValue.Text = default
- SliderValue.TextColor3 = Color3.fromRGB(255, 255, 255)
- SliderValue.TextSize = 19.000
- SliderValue.AutomaticSize = Enum.AutomaticSize.X
- SliderValueCorner.CornerRadius = UDim.new(0, 3)
- SliderValueCorner.Name = "SliderValueCorner"
- SliderValueCorner.Parent = SliderValue
- SliderValue:GetPropertyChangedSignal("Text"):Connect(function()
- SliderValue.Text = SliderValue.Text:gsub('%D+', '')
- pcall(function()
- callback(SliderValue.Text)
- end)
- end)
- function ModuleHandler:NewKeybind(Bind, callback)
- local KeybindInit = {}
- Bind = Bind or "NONE"
- local WaitingForBind = false
- local Selected = Bind
- local Blacklist = {"W","A","S","D","Slash","Tab","Backspace","Escape","Space","Delete","Unknown","Backquote","Insert"}
- local KeybindText = Instance.new("TextLabel")
- local KeybindTextPadding = Instance.new("UIPadding")
- local Keybind = Instance.new("TextButton")
- local KeybindCorner = Instance.new("UICorner")
- KeybindText.Name = "KeybindText"
- KeybindText.Parent = ModuleSettings
- KeybindText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- KeybindText.BackgroundTransparency = 1.000
- KeybindText.Size = UDim2.new(1, 0, 0, 30)
- KeybindText.Font = Enum.Font.Nunito
- KeybindText.Text = "Keybind"
- KeybindText.TextColor3 = Color3.fromRGB(255, 255, 255)
- KeybindText.TextSize = 19.000
- KeybindText.TextXAlignment = Enum.TextXAlignment.Left
- KeybindTextPadding.Name = "KeybindTextPadding"
- KeybindTextPadding.Parent = KeybindText
- KeybindTextPadding.PaddingLeft = UDim.new(0, 10)
- Keybind.Name = "Keybind"
- Keybind.Parent = KeybindText
- Keybind.AnchorPoint = Vector2.new(1, 0)
- Keybind.BackgroundColor3 = Color3.fromRGB(37, 37, 37)
- Keybind.BorderSizePixel = 0
- Keybind.Position = UDim2.new(0.930000007, 0, 0.200000003, 0)
- Keybind.Size = UDim2.new(0, 18, 0, 18)
- Keybind.Font = Enum.Font.Nunito
- Keybind.Text = Bind
- Keybind.TextColor3 = Color3.fromRGB(255, 255, 255)
- Keybind.TextSize = 19.000
- Keybind.AutomaticSize = Enum.AutomaticSize.X
- KeybindCorner.CornerRadius = UDim.new(0, 3)
- KeybindCorner.Name = "KeybindCorner"
- KeybindCorner.Parent = Keybind
- Keybind.Visible = true
- Keybind.Text = Bind
- Keybind.MouseButton1Click:Connect(function()
- Keybind.Text = "..."
- WaitingForBind = true
- end)
- UserInputService.InputBegan:Connect(function(Input)
- if WaitingForBind and Input.UserInputType == Enum.UserInputType.Keyboard then
- local Key = tostring(Input.KeyCode):gsub("Enum.KeyCode.", "")
- if not table.find(Blacklist, Key) then
- Keybind.Text = Key
- Selected = Key
- else
- Keybind.Text = "NONE"
- Selected = "NONE"
- end
- WaitingForBind = false
- elseif Input.UserInputType == Enum.UserInputType.Keyboard then
- local Key = tostring(Input.KeyCode):gsub("Enum.KeyCode.", "")
- if Key == Selected then
- ToggleState = not ToggleState
- SetState(ToggleState)
- if callback then
- callback(Key)
- end
- end
- end
- end)
- function KeybindInit:SetBind(Key)
- Keybind.Text = Key
- Selected = Key
- end
- function KeybindInit:GetBind()
- return Selected
- end
- end
- end
- return ModuleSettings
- end
- return ModuleHandler
- end
- return CategoryHandler
- end
- return Library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement