Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local g = getgenv()
- local Lib = {}
- function Lib:ToScaleSize(guiobject)
- if guiobject:IsA("GuiBase2d") then
- game:GetService( 'RunService' ).RenderStepped:Wait()
- local Viewport_Size
- if guiobject.Parent:IsA("GuiBase2d") then
- Viewport_Size = guiobject.Parent.AbsoluteSize
- elseif guiobject:FindFirstAncestorWhichIsA("GuiBase2d") then
- Viewport_Size = guiobject:FindFirstAncestorWhichIsA("GuiBase2d").AbsoluteSize
- else
- Viewport_Size = workspace.CurrentCamera.ViewportSize
- end
- local LB_Size = guiobject.AbsoluteSize
- guiobject.Size = UDim2.new(LB_Size.X/Viewport_Size.X,0,LB_Size.Y/Viewport_Size.Y, 0)
- end
- end
- Lib:NoSameConnection(Connection,valname)---- Function Prevents Double Connections
- if g[valname]==nil then
- g[valname]=Connection
- print("Connected")
- else
- if typeof(g[valname])=="RBXScriptConnection" then
- g[valname]:Disconnect()
- g[valname]=nil--Just In Case
- g[valname]=Connection
- print("Reconnected")
- else error([[Needs "RBXScriptConnection" got: ]]..typeof(g[valname])) return
- end
- end
- end
- function Lib:MakeCatagory(Parent,Name,LayoutOrder)
- local Catagory = Instance.new("Frame",Parent)
- local UICorner = Instance.new("UICorner", Catagory)
- local Selected = Instance.new("TextButton", Catagory)
- local UICorner_2 = Instance.new("UICorner",Selected)
- local TextLabel = Instance.new("TextLabel",Catagory)
- local Spacing = Instance.new("Frame",Catagory)
- local EnabledColor = Color3.new(0, 1, 0)
- local DisabledColor = Color3.new(1,1,1)
- Catagory.Name = Name
- Catagory.BackgroundColor3 = Color3.fromRGB(27, 42, 53)
- Catagory.BorderColor3 = Color3.fromRGB(27, 42, 53)
- Catagory.Position = UDim2.new(0, 0, 0.0653879344, 0)
- Catagory.Size = UDim2.new(0, 142, 0, 45)
- Catagory.LayoutOrder = LayoutOrder
- Selected.Name = "Selected"
- Selected.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Selected.Position = UDim2.new(0.0633802786, 0, 0.13333334, 0)
- Selected.Size = UDim2.new(0, 37, 0, 33)
- Lib:ToScaleSize(Selected)
- Selected.Font = Enum.Font.SourceSans
- Selected.Text = ""
- Selected.TextColor3 = Color3.fromRGB(0, 0, 0)
- Selected.TextSize = 14.000
- TextLabel.BackgroundColor3 = Color3.fromRGB(27, 42, 53)
- TextLabel.BorderColor3 = Color3.fromRGB(27, 42, 53)
- TextLabel.Position = UDim2.new(0.408450693, 0, 0.120129392, 0)
- TextLabel.Size = UDim2.new(0, 76, 0, 33)
- Lib:ToScaleSize(TextLabel)
- TextLabel.Font = Enum.Font.Ubuntu
- TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.TextScaled = true
- TextLabel.TextSize = 14.000
- TextLabel.TextWrapped = true
- TextLabel.Text = Name
- Spacing:Destroy()
- local CatagoryFrame = Instance.new("Frame", Catagory.Parent.Parent.Catagories)
- Instance.new("UIGridLayout",CatagoryFrame).CellSize = UDim2.fromOffset(142,45)
- CatagoryFrame.Name = Name
- CatagoryFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- CatagoryFrame.BackgroundTransparency = 1.000
- CatagoryFrame.Size = UDim2.new(0, 417, 0, 313)
- CatagoryFrame.Visible = false
- Lib:ToScaleSize(TextLabel)
- local IsSelected = Instance.new("BoolValue", Catagory)
- IsSelected.Value = false
- IsSelected.Name = "IsSelected"
- print("Catagory Made")
- Selected.MouseButton1Click:Connect(function()
- if IsSelected.Value == false then
- IsSelected.Value = true
- Selected.BackgroundColor3 = EnabledColor
- Parent.Current.Value = Selected.Parent.Name
- end
- end)
- Parent.Current:GetPropertyChangedSignal("Value"):Connect(function()
- for i,v in pairs(Parent:GetChildren()) do
- if v:IsA("Frame") then
- if v.Name == Parent.Current.Value then
- v.Selected.BackgroundColor3 = EnabledColor
- v.IsSelected.Value = true
- Parent.Parent.Catagories[v.Name].Visible = true
- else
- v.Selected.BackgroundColor3 = DisabledColor
- v.IsSelected.Value = false
- Parent.Parent.Catagories[v.Name].Visible = false
- end
- end
- end
- end)
- return {Catagory,CatagoryFrame}
- end
- function Lib:MakeCatagoriesMenu(p)
- local CatagoriesMenu = Instance.new("ScrollingFrame", p)
- local UIListLayout = Instance.new("UIListLayout", CatagoriesMenu)
- CatagoriesMenu.Name = "CatagoriesMenu"
- CatagoriesMenu.Parent = p
- CatagoriesMenu.Active = true
- CatagoriesMenu.BackgroundColor3 = Color3.fromRGB(61, 61, 61)
- CatagoriesMenu.BackgroundTransparency = 1.000
- CatagoriesMenu.BorderColor3 = Color3.fromRGB(61, 61, 61)
- CatagoriesMenu.Position = UDim2.new(0.0102903796, 0, 0.165862083, 0)
- CatagoriesMenu.Size = UDim2.new(0.311, 0,0.847, 0)
- local Current = Instance.new("StringValue", CatagoriesMenu)
- Current.Name = "Current"
- return CatagoriesMenu
- end
- function Lib:WorldToScreen(Pos)
- local M = game.Players.LocalPlayer:GetMouse()
- local Cam = game.Workspace.CurrentCamera
- local point = Cam.CoordinateFrame:pointToObjectSpace(Pos)
- local aspectRatio = M.ViewSizeX / M.ViewSizeY
- local hfactor = math.tan(math.rad(Cam.FieldOfView) / 2)
- local wfactor = aspectRatio*hfactor
- local x = (point.x/point.z) / -wfactor
- local y = (point.y/point.z) / hfactor
- return Vector2.new(M.ViewSizeX * (0.5 + 0.5 * x), M.ViewSizeY * (0.5 + 0.5 * y))
- end;
- function Lib:Dragify(frame)
- local gui = frame
- local UserInputService = game:GetService("UserInputService")
- local dragging
- local dragInput
- local dragStart
- local startPos
- local function update(input)
- local delta = input.Position - dragStart
- gui.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- gui.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- dragging = true
- dragStart = input.Position
- startPos = gui.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- gui.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
- dragInput = input
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if input == dragInput and dragging then
- update(input)
- end
- end)
- end;
- function Lib:MakeBoolFrame(Parent, Text, LayoutOrder, TrueFunc,FalseFunc)
- local Bool = Instance.new("Frame",Parent)
- local UICorner = Instance.new("UICorner",Bool)
- local Selected = Instance.new("TextButton",Bool)
- local UICorner_2 = Instance.new("UICorner",Selected)
- local TextLabel = Instance.new("TextLabel",Bool)
- local Spacing = Instance.new("Frame",Bool)
- local Enabled = Instance.new("BoolValue",Bool)
- local True = Color3.new(0,1,0)
- local False = Color3.new(1,1,1)
- Enabled.Value = false
- Bool.Name = Text
- Bool.BackgroundColor3 = Color3.fromRGB(27, 42, 53)
- Bool.BorderColor3 = Color3.fromRGB(27, 42, 53)
- Bool.Position = UDim2.new(0.00479616318, 0, 0.132480592, 0)
- Bool.Size = UDim2.new(0, 142, 0, 45)
- Lib:ToScaleSize(Bool)
- Bool.LayoutOrder = LayoutOrder
- Selected.Name = "Selected"
- Selected.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Selected.Position = UDim2.new(0.0633802786, 0, 0.13333334, 0)
- Selected.Size = UDim2.new(0, 37, 0, 33)
- Lib:ToScaleSize(Bool)
- Selected.Font = Enum.Font.SourceSans
- Selected.Text = ""
- Selected.TextColor3 = Color3.fromRGB(0, 0, 0)
- Selected.TextSize = 14.000
- TextLabel.BackgroundColor3 = Color3.fromRGB(27, 42, 53)
- TextLabel.BorderColor3 = Color3.fromRGB(27, 42, 53)
- TextLabel.Position = UDim2.new(0.408450693, 0, 0.120129392, 0)
- TextLabel.Size = UDim2.new(0, 76, 0, 33)
- TextLabel.Font = Enum.Font.Ubuntu
- TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.TextScaled = true
- TextLabel.TextSize = 14.000
- TextLabel.TextWrapped = true
- TextLabel.Text = Text
- Spacing.Name = "Spacing"
- Spacing.BackgroundColor3 = Color3.fromRGB(61, 61, 61)
- Spacing.BackgroundTransparency = 1.000
- Spacing.BorderColor3 = Color3.fromRGB(61, 61, 61)
- Spacing.Position = UDim2.new(1, 0, 0, 0)
- Spacing.Size = UDim2.new(0, 11, 0, 45)
- Lib:ToScaleSize(Spacing)
- Selected.MouseButton1Click:Connect(function()
- if Enabled.Value == true then
- Enabled.Value = false
- Selected.BackgroundColor3 = False
- else
- Enabled.Value = true
- Selected.BackgroundColor3 = True
- end
- end)
- Enabled:GetPropertyChangedSignal("Value"):Connect(function()
- if Enabled.Value == true then TrueFunc()
- elseif Enabled.Value == false then FalseFunc()
- end
- end)
- end;
- function Lib:MakeButtonFrame(Parent, Text, LayoutOrder,ClickFunc)
- local Frame = Instance.new("Frame",Parent)
- Frame.Name = "Button"
- Frame.BackgroundColor3 = Color3.fromRGB(27, 42, 53)
- Frame.BorderColor3 = Color3.fromRGB(27, 42, 53)
- Frame.Position = UDim2.new(0.00479616318, 0, 0.132480592, 0)
- Frame.Size = UDim2.new(0, 142, 0, 45)
- Frame.LayoutOrder = LayoutOrder
- Frame.BackgroundTransparency = 1
- local Button = Instance.new("TextButton",Frame)
- local TextLabel = Button
- Button.Text = Text
- TextLabel.BackgroundColor3 = Color3.fromRGB(27, 42, 53)
- TextLabel.BorderColor3 = Color3.fromRGB(27, 42, 53)
- TextLabel.Position = Frame.Position
- TextLabel.Size = Frame.Size
- TextLabel.Font = Enum.Font.Ubuntu
- TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.TextScaled = true
- TextLabel.TextSize = 14.000
- TextLabel.TextWrapped = true
- TextLabel.Text = Text
- Instance.new("UICorner", Button)
- local Spacing = Instance.new("Frame",Frame)
- Spacing.Name = "Spacing"
- Spacing.BackgroundColor3 = Color3.fromRGB(61, 61, 61)
- Spacing.BackgroundTransparency = 1.000
- Spacing.BorderColor3 = Color3.fromRGB(61, 61, 61)
- Spacing.Position = UDim2.new(1, 0, 0, 0)
- Spacing.Size = UDim2.new(0, 11, 0, 45)
- Lib:ToScaleSize(Spacing)
- if type(ClickFunc) == "function" then
- Button.MouseButton1Click:Connect(ClickFunc)
- end
- return Button
- end;
- function Lib:MakeGUI(parent,name,Title)
- if typeof(_G.GUI) == "Instance" then
- _G.GUI:Destroy()
- elseif typeof(_G.GUI) == nil then
- print("Nil")
- end
- local ExploitGui = Instance.new("ScreenGui")
- ExploitGui.Name = name
- ExploitGui.Parent = parent
- ExploitGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- local Frame = Instance.new("Frame")
- local UICorner = Instance.new("UICorner")
- local TextLabel = Instance.new("TextLabel")
- TextLabel.Parent = ExploitGui
- TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 127)
- TextLabel.Position = UDim2.new(0.319838107, 0, 0.21801801, 0)
- TextLabel.Size = UDim2.new(0, 118, 0, 11)
- Lib:ToScaleSize(TextLabel)
- TextLabel.Visible = false
- TextLabel.Font = Enum.Font.RobotoCondensed
- TextLabel.Text = "Desc"
- TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
- TextLabel.TextScaled = true
- TextLabel.TextSize = 14.000
- TextLabel.TextWrapped = true
- TextLabel.ZIndex = 2
- Frame.Parent = ExploitGui
- Frame.BackgroundColor3 = Color3.fromRGB(61, 61, 61)
- Frame.Position = UDim2.new(0.262145758, 0, 0.162162155, 0)
- Frame.Size = UDim2.fromScale(0.514,0.541)
- local Catagories = Instance.new("Frame", Frame)
- Catagories.Name = "Catagories"
- Catagories.BackgroundColor3 = Color3.fromRGB(61, 61, 61)
- Catagories.BackgroundTransparency = 1.000
- Catagories.Position = UDim2.new(0.284700513, 0, 0, 0)
- Catagories.Size = UDim2.new(0, 417, 0, 313)
- Lib:ToScaleSize(Catagories)
- UICorner.Parent = Frame
- local title = Instance.new("TextLabel")
- title.Name = "Title"
- title.Parent = Frame
- title.BackgroundColor3 = Color3.fromRGB(61, 61, 61)
- title.Size = UDim2.fromScale(0.394,0.167)
- title.Font = Enum.Font.PatrickHand
- title.TextColor3 = Color3.fromRGB(170, 0, 0)
- title.TextScaled = true
- title.TextSize = 14.000
- title.TextWrapped = true
- title.Text = Title
- title.BackgroundTransparency = 1
- Instance.new("UICorner", title)
- _G.GUI = ExploitGui
- title.Size = UDim2.new(0.321, 0,0.167, 0)
- return ExploitGui
- end;
- function Lib:MakeSettings(parent)
- local SettingsFrame = Instance.new("Frame", parent)
- local SettingsButton = Instance.new("ImageButton", parent)
- local OpenSize = UDim2.fromScale(1,0.978)
- local CloseSize = UDim2.fromScale(1,0)
- local openimage = 'rbxassetid://5853926901'
- local closeimage = "rbxassetid://9405931578"
- Instance.new("UICorner").Parent = SettingsFrame
- local cell = Instance.new("UIGridLayout",SettingsFrame)
- cell.CellSize = UDim2.fromOffset(142,45)
- local function Animation()
- if SettingsFrame.Size == OpenSize then
- game.TweenService:Create(SettingsFrame, TweenInfo.new(0.5), {Size = CloseSize}):Play()
- wait(0.5)
- SettingsFrame.Visible = false
- SettingsButton.Image = closeimage
- elseif SettingsFrame.Size == CloseSize then
- game.TweenService:Create(SettingsFrame, TweenInfo.new(0.5), {Size = OpenSize}):Play()
- SettingsFrame.Visible = true
- SettingsButton.Image = openimage
- end
- end
- SettingsFrame.Visible = false
- SettingsFrame.ZIndex = 2
- SettingsFrame.Size = CloseSize
- SettingsFrame.Position = UDim2.fromScale(0,0.022)
- SettingsFrame.BackgroundColor3 = Color3.new(0,0,0)
- local UICorner = Instance.new("UICorner")
- SettingsButton.Name = "SettingsButton"
- SettingsButton.BackgroundColor3 = Color3.fromRGB(61, 61, 61)
- SettingsButton.Position = UDim2.new(0.835, 0,-0.108, 0)
- SettingsButton.Size = UDim2.new(0.089, 0,0.137, 0)
- SettingsButton.Image = "rbxassetid://9405931578"
- UICorner.Parent = SettingsButton
- SettingsButton.MouseButton1Click:Connect(function()
- Animation()
- end)
- local X = Instance.new("ImageButton", parent)
- X.Name = "X"
- X.BackgroundColor3 = Color3.fromRGB(61, 61, 61)
- X.Position = UDim2.new(0.924419165, 0, -0.108448282, 0)
- X.Size = UDim2.fromScale(0.089,0.137)
- X.Image = "rbxassetid://7104731055"
- X.ImageColor3 = Color3.fromRGB(255, 0, 0)
- Instance.new("UICorner").Parent = X
- X.MouseButton1Click:Connect(function()
- local gui = parent.Parent
- gui.Enabled = false
- end)
- return SettingsFrame
- end;
- function Lib:ConnectKeyBind(textbox, Key, func)
- local TextBox = textbox
- local KeyConnection = nil
- local UIS = game:GetService("UserInputService")
- local InputKey = nil
- if typeof(Key) == nil then
- InputKey = Enum.KeyCode["E"]
- elseif typeof(Key) == "string" then
- InputKey = Enum.KeyCode[Key]
- TextBox.Text = Key
- elseif typeof(Key) == "EnumItem" then
- InputKey = Key
- TextBox.Text = Key.Name
- else
- error("EnumItem, string, or nil expected ".."Got "..(typeof(Key)))
- end
- local editkeymode = false
- TextBox.Focused:Connect(function()
- KeyConnection = UIS.InputBegan:Connect(function(input)
- if input.KeyCode.Name == "Unknown" then else
- InputKey = input.KeyCode
- TextBox.Text = input.KeyCode.Name
- TextBox:ReleaseFocus()
- editkeymode = true
- end
- end)
- end)
- TextBox.FocusLost:Connect(function()
- KeyConnection:Disconnect()
- KeyConnection = nil
- print("Disconnect")
- wait(0.1)
- editkeymode = false
- end)
- if typeof(func)==nil then
- error("Function expected got "..(typeof(func)))
- end
- UIS.InputBegan:Connect(function(input)
- if not editkeymode then
- if input.KeyCode == InputKey then
- func()
- end
- end
- end)
- end;
- function Lib:MakeKeyBindFrame(parent, title,LayoutOrder)
- local KeyBind = Instance.new("Frame", parent)
- local UICorner = Instance.new("UICorner",KeyBind)
- local TextLabel = Instance.new("TextLabel",KeyBind)
- local Spacing = Instance.new("Frame",KeyBind)
- local TextBox = Instance.new("TextBox",KeyBind)
- local UICorner_2 = Instance.new("UICorner",TextBox)
- KeyBind.LayoutOrder = LayoutOrder
- KeyBind.Name = "KeyBind"
- KeyBind.BackgroundColor3 = Color3.fromRGB(27, 42, 53)
- KeyBind.BorderColor3 = Color3.fromRGB(27, 42, 53)
- KeyBind.Position = UDim2.new(0, 0, 0.0653879344, 0)
- KeyBind.Size = UDim2.new(0.340527564, 0, 0.143769965, 0)
- UICorner.Parent = KeyBind
- TextLabel.Parent = KeyBind
- TextLabel.BackgroundColor3 = Color3.fromRGB(27, 42, 53)
- TextLabel.BorderColor3 = Color3.fromRGB(27, 42, 53)
- TextLabel.Position = UDim2.new(0.0633802712, 0, 0.142351612, 0)
- TextLabel.Size = UDim2.new(0, 76, 0, 33)
- Lib:ToScaleSize(TextLabel)
- TextLabel.Font = Enum.Font.Ubuntu
- TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.TextScaled = true
- TextLabel.TextSize = 14.000
- TextLabel.TextWrapped = true
- TextLabel.Text = title
- Spacing.Name = "Spacing"
- Spacing.Parent = KeyBind
- Spacing.BackgroundColor3 = Color3.fromRGB(61, 61, 61)
- Spacing.BorderColor3 = Color3.fromRGB(61, 61, 61)
- Spacing.Position = UDim2.new(1.01408446, 0, 0, 0)
- Spacing.Size = UDim2.new(0, 14, 0, 45)
- Lib:ToScaleSize(Spacing)
- Spacing.BackgroundTransparency = 1
- TextBox.Parent = KeyBind
- TextBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextBox.Position = UDim2.new(0.676056385, 0, 0.142351612, 0)
- TextBox.Size = UDim2.new(0, 37, 0, 33)
- Lib:ToScaleSize(TextBox)
- Lib:ToScaleSize(TextBox)
- print(TextBox.Size)
- TextBox.Font = Enum.Font.SourceSans
- TextBox.Text = ""
- TextBox.TextColor3 = Color3.fromRGB(0, 0, 0)
- TextBox.TextScaled = true
- TextBox.TextSize = 14.000
- TextBox.TextWrapped = true
- UICorner_2.Parent = TextBox
- return TextBox
- end;
- function Lib:FindRemoteEvent(instance, Name)
- for i,v in pairs(instance:GetDescendants())do
- if v.Name == Name then
- return v
- end end
- end;
- function Lib:Tween(object, time, proptable, playnow)
- local ts = game.TweenService
- local tween = ts:Create(object,TweenInfo.new(time), proptable)
- tween:Play()
- wait(time)
- end;
- function Lib:SendNotif(title, text, delay)
- game.StarterGui:SetCore("SendNotification", {Title = title,Text = text,Duration = delay})
- end;
- return Lib;
Advertisement
Add Comment
Please, Sign In to add comment