Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local players = game:GetService('Players')
- local tweenService = game:GetService('TweenService')
- local runService = game:GetService('RunService')
- local coreGui = game:GetService('CoreGui')
- local Library = {}
- Library.Helix = {}
- for i,v in pairs(game.CoreGui:GetChildren()) do
- if v.Name == "Helix" then
- v:Destroy()
- end
- end
- function Library:new(options)
- Library.Helix["1"] = Instance.new("ScreenGui", runService:IsStudio() and players.LocalPlayer:WaitForChild("PlayerGui") or coreGui);
- Library.Helix["1"]["Name"] = [[Helix]];
- -- StarterGui.Helix.MainFrame
- Library.Helix["2"] = Instance.new("Frame", Library.Helix["1"]);
- Library.Helix["2"]["BackgroundColor3"] = Color3.fromRGB(23, 23, 23);
- Library.Helix["2"]["Size"] = UDim2.new(0, 615, 0, 548);
- Library.Helix["2"]["BorderColor3"] = Color3.fromRGB(23, 23, 23);
- Library.Helix["2"]["Position"] = UDim2.new(0.017452090978622437, 0, 0.19860787689685822, 0);
- Library.Helix["2"]["Name"] = [[MainFrame]];
- -- StarterGui.Helix.MainFrame.UIStroke
- Library.Helix["3"] = Instance.new("UIStroke", Library.Helix["2"]);
- Library.Helix["3"]["Color"] = Color3.fromRGB(29, 29, 29);
- Library.Helix["3"]["Thickness"] = 2;
- -- StarterGui.Helix.MainFrame.TweenLoading
- Library.Helix["4"] = Instance.new("LocalScript", Library.Helix["2"]);
- Library.Helix["4"]["Name"] = [[TweenLoading]];
- -- StarterGui.Helix.MainFrame.UICorner
- Library.Helix["5"] = Instance.new("UICorner", Library.Helix["2"]);
- Library.Helix["5"]["CornerRadius"] = UDim.new(0, 5);
- -- StarterGui.Helix.MainFrame.Smooth GUI Dragging
- Library.Helix["6"] = Instance.new("LocalScript", Library.Helix["2"]);
- Library.Helix["6"]["Name"] = [[Smooth GUI Dragging]];
- -- StarterGui.Helix.MainFrame.Smooth GUI Dragging.Icon
- Library.Helix["7"] = Instance.new("ImageLabel", Library.Helix["6"]);
- Library.Helix["7"]["Image"] = [[rbxassetid://7072977617]];
- Library.Helix["7"]["Name"] = [[Icon]];
- Library.Helix["7"]["BackgroundTransparency"] = 1;
- -- StarterGui.Helix.MainFrame.Smooth GUI Dragging.Icon.UIAspectRatioConstraint
- Library.Helix["8"] = Instance.new("UIAspectRatioConstraint", Library.Helix["7"]);
- -- StarterGui.Helix.MainFrame.left
- Library.Helix["9"] = Instance.new("Frame", Library.Helix["2"]);
- Library.Helix["9"]["BorderSizePixel"] = 0;
- Library.Helix["9"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255);
- Library.Helix["9"]["AnchorPoint"] = Vector2.new(0, 0.5);
- Library.Helix["9"]["BackgroundTransparency"] = 1;
- Library.Helix["9"]["Size"] = UDim2.new(0, 152, 1, 0);
- Library.Helix["9"]["Position"] = UDim2.new(0, 0, 0.5, 0);
- Library.Helix["9"]["Name"] = [[left]];
- -- StarterGui.Helix.MainFrame.left.container
- Library.Helix["a"] = Instance.new("ScrollingFrame", Library.Helix["9"]);
- Library.Helix["a"]["Active"] = true;
- Library.Helix["a"]["ScrollingDirection"] = Enum.ScrollingDirection.X;
- Library.Helix["a"]["BorderSizePixel"] = 0;
- Library.Helix["a"]["CanvasSize"] = UDim2.new(0, 0, 0, 0);
- Library.Helix["a"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255);
- Library.Helix["a"]["AnchorPoint"] = Vector2.new(0.5, 1);
- Library.Helix["a"]["BackgroundTransparency"] = 1;
- Library.Helix["a"]["Size"] = UDim2.new(1, -16, 1, -82);
- Library.Helix["a"]["ScrollBarImageColor3"] = Color3.fromRGB(0, 0, 0);
- Library.Helix["a"]["ScrollBarThickness"] = 0;
- Library.Helix["a"]["Position"] = UDim2.new(0.5, 0, 1, -8);
- Library.Helix["a"]["Name"] = [[container]];
- -- StarterGui.Helix.MainFrame.left.container.list
- Library.Helix["b"] = Instance.new("UIListLayout", Library.Helix["a"]);
- Library.Helix["b"]["Name"] = [[list]];
- Library.Helix["b"]["Padding"] = UDim.new(0, 4);
- Library.Helix["b"]["SortOrder"] = Enum.SortOrder.LayoutOrder;
- -- StarterGui.Helix.MainFrame.left.container.TextButton
- Library.Helix["c"] = Instance.new("TextButton", Library.Helix["a"]);
- Library.Helix["c"]["TextSize"] = 14;
- Library.Helix["c"]["BackgroundColor3"] = Color3.fromRGB(3, 86, 255);
- Library.Helix["c"]["TextColor3"] = Color3.fromRGB(255, 255, 255);
- Library.Helix["c"]["Size"] = UDim2.new(0, 133, 0, 30);
- Library.Helix["c"]["Font"] = Enum.Font.SourceSans;
- -- StarterGui.Helix.MainFrame.left.container.TextButton.UICorner
- Library.Helix["d"] = Instance.new("UICorner", Library.Helix["c"]);
- Library.Helix["d"]["CornerRadius"] = UDim.new(0, 5);
- -- StarterGui.Helix.MainFrame.left.container.TextButton
- Library.Helix["e"] = Instance.new("TextButton", Library.Helix["a"]);
- Library.Helix["e"]["TextSize"] = 14;
- Library.Helix["e"]["BackgroundColor3"] = Color3.fromRGB(23, 23, 23);
- Library.Helix["e"]["TextColor3"] = Color3.fromRGB(255, 255, 255);
- Library.Helix["e"]["Size"] = UDim2.new(0, 133, 0, 30);
- Library.Helix["e"]["Font"] = Enum.Font.SourceSans;
- -- StarterGui.Helix.MainFrame.left.container.TextButton.UICorner
- Library.Helix["f"] = Instance.new("UICorner", Library.Helix["e"]);
- Library.Helix["f"]["CornerRadius"] = UDim.new(0, 5);
- -- StarterGui.Helix.MainFrame.left.container.TextButton
- Library.Helix["10"] = Instance.new("TextButton", Library.Helix["a"]);
- Library.Helix["10"]["TextSize"] = 14;
- Library.Helix["10"]["BackgroundColor3"] = Color3.fromRGB(23, 23, 23);
- Library.Helix["10"]["TextColor3"] = Color3.fromRGB(255, 255, 255);
- Library.Helix["10"]["Size"] = UDim2.new(0, 133, 0, 30);
- Library.Helix["10"]["Font"] = Enum.Font.SourceSans;
- -- StarterGui.Helix.MainFrame.left.container.TextButton.UICorner
- Library.Helix["11"] = Instance.new("UICorner", Library.Helix["10"]);
- Library.Helix["11"]["CornerRadius"] = UDim.new(0, 5);
- -- StarterGui.Helix.MainFrame.left.game
- Library.Helix["12"] = Instance.new("TextLabel", Library.Helix["9"]);
- Library.Helix["12"]["TextWrapped"] = true;
- Library.Helix["12"]["RichText"] = true;
- Library.Helix["12"]["TextXAlignment"] = Enum.TextXAlignment.Left;
- Library.Helix["12"]["TextYAlignment"] = Enum.TextYAlignment.Top;
- Library.Helix["12"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255);
- Library.Helix["12"]["TextSize"] = 15;
- Library.Helix["12"]["TextColor3"] = Color3.fromRGB(3, 86, 255);
- Library.Helix["12"]["Size"] = UDim2.new(1, -12, 0, 26);
- Library.Helix["12"]["Text"] = options['Name'] or 'Game';
- Library.Helix["12"]["Name"] = [[game]];
- Library.Helix["12"]["Font"] = Enum.Font.GothamBold;
- Library.Helix["12"]["BackgroundTransparency"] = 1;
- Library.Helix["12"]["Position"] = UDim2.new(0, 12, 0, 36);
- -- StarterGui.Helix.MainFrame.left.title
- Library.Helix["13"] = Instance.new("TextLabel", Library.Helix["9"]);
- Library.Helix["13"]["TextWrapped"] = true;
- Library.Helix["13"]["TextXAlignment"] = Enum.TextXAlignment.Left;
- Library.Helix["13"]["TextYAlignment"] = Enum.TextYAlignment.Bottom;
- Library.Helix["13"]["TextScaled"] = true;
- Library.Helix["13"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255);
- Library.Helix["13"]["TextSize"] = 20;
- Library.Helix["13"]["TextColor3"] = Color3.fromRGB(255, 255, 255);
- Library.Helix["13"]["Size"] = UDim2.new(1, -12, 0, 26);
- Library.Helix["13"]["Text"] = options['title'] or 'Helix';
- Library.Helix["13"]["Name"] = [[title]];
- Library.Helix["13"]["Font"] = Enum.Font.GothamBlack;
- Library.Helix["13"]["BackgroundTransparency"] = 1;
- Library.Helix["13"]["Position"] = UDim2.new(0, 12, 0, 10);
- -- StarterGui.Helix.MainFrame.Close
- Library.Helix["14"] = Instance.new("ImageButton", Library.Helix["2"]);
- Library.Helix["14"]["BackgroundColor3"] = Color3.fromRGB(21, 21, 21);
- Library.Helix["14"]["Image"] = [[rbxassetid://10145570075]];
- Library.Helix["14"]["Size"] = UDim2.new(0, 20, 0, 20);
- Library.Helix["14"]["Name"] = [[Close]];
- Library.Helix["14"]["BorderColor3"] = Color3.fromRGB(21, 21, 21);
- Library.Helix["14"]["Position"] = UDim2.new(0.9559392929077148, 0, 0.017299270257353783, 0);
- Library.Helix["14"]["BackgroundTransparency"] = 1;
- -- StarterGui.Helix.MainFrame.Close.UICorner
- Library.Helix["15"] = Instance.new("UICorner", Library.Helix["14"]);
- -- StarterGui.Helix.MainFrame.Close.LocalScript
- Library.Helix["16"] = Instance.new("LocalScript", Library.Helix["14"]);
- -- StarterGui.Helix.MainFrame.separator
- Library.Helix["17"] = Instance.new("Frame", Library.Helix["2"]);
- Library.Helix["17"]["BorderSizePixel"] = 0;
- Library.Helix["17"]["BackgroundColor3"] = Color3.fromRGB(29, 29, 29);
- Library.Helix["17"]["AnchorPoint"] = Vector2.new(0, 0.5);
- Library.Helix["17"]["Size"] = UDim2.new(0, 1, 1, 0);
- Library.Helix["17"]["BorderColor3"] = Color3.fromRGB(29, 29, 29);
- Library.Helix["17"]["Position"] = UDim2.new(0, 152, 0.5, 0);
- Library.Helix["17"]["Name"] = [[separator]];
- -- StarterGui.Helix.MainFrame.separator
- Library.Helix["18"] = Instance.new("Frame", Library.Helix["2"]);
- Library.Helix["18"]["BorderSizePixel"] = 0;
- Library.Helix["18"]["BackgroundColor3"] = Color3.fromRGB(29, 29, 29);
- Library.Helix["18"]["AnchorPoint"] = Vector2.new(0, 0.5);
- Library.Helix["18"]["Size"] = UDim2.new(0, 152, 0, 1);
- Library.Helix["18"]["BorderColor3"] = Color3.fromRGB(29, 29, 29);
- Library.Helix["18"]["Position"] = UDim2.new(0, 0, 0, 65);
- Library.Helix["18"]["Name"] = [[separator]];
- task.spawn(function()
- local script = Library.Helix["4"];
- local TweenService = game:GetService("TweenService")
- local GlobalTweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.In)
- local function Tween(GuiObject, Dictionary)
- local TweenBase = TweenService:Create(GuiObject, GlobalTweenInfo, Dictionary)
- TweenBase:Play()
- return TweenBase
- end
- local gui = script.Parent
- gui.Position = UDim2.new(-0.395, 0, 0.171, 0)
- task.wait(0.5)
- Tween(gui, {Position = UDim2.new(0.3, 0, 0.188, 0)})
- end)
- task.spawn(function()
- local script = Library.Helix["6"];
- local UserInputService = game:GetService("UserInputService")
- local runService = (game:GetService("RunService"));
- local gui = script.Parent
- local dragging
- local dragInput
- local dragStart
- local startPos
- local function Lerp(a, b, m)
- return a + (b - a) * m
- end;
- local lastMousePos
- local lastGoalPos
- local DRAG_SPEED = (4); -- // The speed of the UI darg.
- local function Update(dt)
- if not (startPos) then return end;
- if not (dragging) and (lastGoalPos) then
- gui.Position = UDim2.new(startPos.X.Scale, Lerp(gui.Position.X.Offset, lastGoalPos.X.Offset, dt * DRAG_SPEED), startPos.Y.Scale, Lerp(gui.Position.Y.Offset, lastGoalPos.Y.Offset, dt * DRAG_SPEED))
- return
- end;
- local delta = (lastMousePos - UserInputService:GetMouseLocation())
- local xGoal = (startPos.X.Offset - delta.X);
- local yGoal = (startPos.Y.Offset - delta.Y);
- lastGoalPos = UDim2.new(startPos.X.Scale, xGoal, startPos.Y.Scale, yGoal)
- gui.Position = UDim2.new(startPos.X.Scale, Lerp(gui.Position.X.Offset, xGoal, dt * DRAG_SPEED), startPos.Y.Scale, Lerp(gui.Position.Y.Offset, yGoal, dt * DRAG_SPEED))
- 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
- lastMousePos = UserInputService:GetMouseLocation()
- 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)
- runService.Heartbeat:Connect(Update)
- end)
- function Library:Close()
- task.spawn(function()
- local script = Library.Helix["16"];
- local closebtn = script.Parent
- local ui = closebtn.Parent
- closebtn.MouseButton1Click:Connect(function()
- ui:Destroy()
- end)
- end)
- end
- end
- return Library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement