Advertisement
DankGreenMoney

publictest

Sep 20th, 2022 (edited)
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.63 KB | None | 0 0
  1. local players = game:GetService('Players')
  2. local tweenService = game:GetService('TweenService')
  3. local runService = game:GetService('RunService')
  4. local coreGui = game:GetService('CoreGui')
  5.  
  6. local Library = {}
  7. Library.Helix = {}
  8.  
  9. for i,v in pairs(game.CoreGui:GetChildren()) do
  10. if v.Name == "Helix" then
  11. v:Destroy()
  12. end
  13. end
  14.  
  15. function Library:new(options)
  16. Library.Helix["1"] = Instance.new("ScreenGui", runService:IsStudio() and players.LocalPlayer:WaitForChild("PlayerGui") or coreGui);
  17. Library.Helix["1"]["Name"] = [[Helix]];
  18.  
  19. -- StarterGui.Helix.MainFrame
  20. Library.Helix["2"] = Instance.new("Frame", Library.Helix["1"]);
  21. Library.Helix["2"]["BackgroundColor3"] = Color3.fromRGB(23, 23, 23);
  22. Library.Helix["2"]["Size"] = UDim2.new(0, 615, 0, 548);
  23. Library.Helix["2"]["BorderColor3"] = Color3.fromRGB(23, 23, 23);
  24. Library.Helix["2"]["Position"] = UDim2.new(0.017452090978622437, 0, 0.19860787689685822, 0);
  25. Library.Helix["2"]["Name"] = [[MainFrame]];
  26.  
  27. -- StarterGui.Helix.MainFrame.UIStroke
  28. Library.Helix["3"] = Instance.new("UIStroke", Library.Helix["2"]);
  29. Library.Helix["3"]["Color"] = Color3.fromRGB(29, 29, 29);
  30. Library.Helix["3"]["Thickness"] = 2;
  31.  
  32. -- StarterGui.Helix.MainFrame.TweenLoading
  33. Library.Helix["4"] = Instance.new("LocalScript", Library.Helix["2"]);
  34. Library.Helix["4"]["Name"] = [[TweenLoading]];
  35.  
  36. -- StarterGui.Helix.MainFrame.UICorner
  37. Library.Helix["5"] = Instance.new("UICorner", Library.Helix["2"]);
  38. Library.Helix["5"]["CornerRadius"] = UDim.new(0, 5);
  39.  
  40. -- StarterGui.Helix.MainFrame.Smooth GUI Dragging
  41. Library.Helix["6"] = Instance.new("LocalScript", Library.Helix["2"]);
  42. Library.Helix["6"]["Name"] = [[Smooth GUI Dragging]];
  43.  
  44. -- StarterGui.Helix.MainFrame.Smooth GUI Dragging.Icon
  45. Library.Helix["7"] = Instance.new("ImageLabel", Library.Helix["6"]);
  46. Library.Helix["7"]["Image"] = [[rbxassetid://7072977617]];
  47. Library.Helix["7"]["Name"] = [[Icon]];
  48. Library.Helix["7"]["BackgroundTransparency"] = 1;
  49.  
  50. -- StarterGui.Helix.MainFrame.Smooth GUI Dragging.Icon.UIAspectRatioConstraint
  51. Library.Helix["8"] = Instance.new("UIAspectRatioConstraint", Library.Helix["7"]);
  52.  
  53.  
  54. -- StarterGui.Helix.MainFrame.left
  55. Library.Helix["9"] = Instance.new("Frame", Library.Helix["2"]);
  56. Library.Helix["9"]["BorderSizePixel"] = 0;
  57. Library.Helix["9"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255);
  58. Library.Helix["9"]["AnchorPoint"] = Vector2.new(0, 0.5);
  59. Library.Helix["9"]["BackgroundTransparency"] = 1;
  60. Library.Helix["9"]["Size"] = UDim2.new(0, 152, 1, 0);
  61. Library.Helix["9"]["Position"] = UDim2.new(0, 0, 0.5, 0);
  62. Library.Helix["9"]["Name"] = [[left]];
  63.  
  64. -- StarterGui.Helix.MainFrame.left.container
  65. Library.Helix["a"] = Instance.new("ScrollingFrame", Library.Helix["9"]);
  66. Library.Helix["a"]["Active"] = true;
  67. Library.Helix["a"]["ScrollingDirection"] = Enum.ScrollingDirection.X;
  68. Library.Helix["a"]["BorderSizePixel"] = 0;
  69. Library.Helix["a"]["CanvasSize"] = UDim2.new(0, 0, 0, 0);
  70. Library.Helix["a"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255);
  71. Library.Helix["a"]["AnchorPoint"] = Vector2.new(0.5, 1);
  72. Library.Helix["a"]["BackgroundTransparency"] = 1;
  73. Library.Helix["a"]["Size"] = UDim2.new(1, -16, 1, -82);
  74. Library.Helix["a"]["ScrollBarImageColor3"] = Color3.fromRGB(0, 0, 0);
  75. Library.Helix["a"]["ScrollBarThickness"] = 0;
  76. Library.Helix["a"]["Position"] = UDim2.new(0.5, 0, 1, -8);
  77. Library.Helix["a"]["Name"] = [[container]];
  78.  
  79. -- StarterGui.Helix.MainFrame.left.container.list
  80. Library.Helix["b"] = Instance.new("UIListLayout", Library.Helix["a"]);
  81. Library.Helix["b"]["Name"] = [[list]];
  82. Library.Helix["b"]["Padding"] = UDim.new(0, 4);
  83. Library.Helix["b"]["SortOrder"] = Enum.SortOrder.LayoutOrder;
  84.  
  85. -- StarterGui.Helix.MainFrame.left.container.TextButton
  86. Library.Helix["c"] = Instance.new("TextButton", Library.Helix["a"]);
  87. Library.Helix["c"]["TextSize"] = 14;
  88. Library.Helix["c"]["BackgroundColor3"] = Color3.fromRGB(3, 86, 255);
  89. Library.Helix["c"]["TextColor3"] = Color3.fromRGB(255, 255, 255);
  90. Library.Helix["c"]["Size"] = UDim2.new(0, 133, 0, 30);
  91. Library.Helix["c"]["Font"] = Enum.Font.SourceSans;
  92.  
  93. -- StarterGui.Helix.MainFrame.left.container.TextButton.UICorner
  94. Library.Helix["d"] = Instance.new("UICorner", Library.Helix["c"]);
  95. Library.Helix["d"]["CornerRadius"] = UDim.new(0, 5);
  96.  
  97. -- StarterGui.Helix.MainFrame.left.container.TextButton
  98. Library.Helix["e"] = Instance.new("TextButton", Library.Helix["a"]);
  99. Library.Helix["e"]["TextSize"] = 14;
  100. Library.Helix["e"]["BackgroundColor3"] = Color3.fromRGB(23, 23, 23);
  101. Library.Helix["e"]["TextColor3"] = Color3.fromRGB(255, 255, 255);
  102. Library.Helix["e"]["Size"] = UDim2.new(0, 133, 0, 30);
  103. Library.Helix["e"]["Font"] = Enum.Font.SourceSans;
  104.  
  105. -- StarterGui.Helix.MainFrame.left.container.TextButton.UICorner
  106. Library.Helix["f"] = Instance.new("UICorner", Library.Helix["e"]);
  107. Library.Helix["f"]["CornerRadius"] = UDim.new(0, 5);
  108.  
  109. -- StarterGui.Helix.MainFrame.left.container.TextButton
  110. Library.Helix["10"] = Instance.new("TextButton", Library.Helix["a"]);
  111. Library.Helix["10"]["TextSize"] = 14;
  112. Library.Helix["10"]["BackgroundColor3"] = Color3.fromRGB(23, 23, 23);
  113. Library.Helix["10"]["TextColor3"] = Color3.fromRGB(255, 255, 255);
  114. Library.Helix["10"]["Size"] = UDim2.new(0, 133, 0, 30);
  115. Library.Helix["10"]["Font"] = Enum.Font.SourceSans;
  116.  
  117. -- StarterGui.Helix.MainFrame.left.container.TextButton.UICorner
  118. Library.Helix["11"] = Instance.new("UICorner", Library.Helix["10"]);
  119. Library.Helix["11"]["CornerRadius"] = UDim.new(0, 5);
  120.  
  121. -- StarterGui.Helix.MainFrame.left.game
  122. Library.Helix["12"] = Instance.new("TextLabel", Library.Helix["9"]);
  123. Library.Helix["12"]["TextWrapped"] = true;
  124. Library.Helix["12"]["RichText"] = true;
  125. Library.Helix["12"]["TextXAlignment"] = Enum.TextXAlignment.Left;
  126. Library.Helix["12"]["TextYAlignment"] = Enum.TextYAlignment.Top;
  127. Library.Helix["12"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255);
  128. Library.Helix["12"]["TextSize"] = 15;
  129. Library.Helix["12"]["TextColor3"] = Color3.fromRGB(3, 86, 255);
  130. Library.Helix["12"]["Size"] = UDim2.new(1, -12, 0, 26);
  131. Library.Helix["12"]["Text"] = options['Name'] or 'Game';
  132. Library.Helix["12"]["Name"] = [[game]];
  133. Library.Helix["12"]["Font"] = Enum.Font.GothamBold;
  134. Library.Helix["12"]["BackgroundTransparency"] = 1;
  135. Library.Helix["12"]["Position"] = UDim2.new(0, 12, 0, 36);
  136.  
  137. -- StarterGui.Helix.MainFrame.left.title
  138. Library.Helix["13"] = Instance.new("TextLabel", Library.Helix["9"]);
  139. Library.Helix["13"]["TextWrapped"] = true;
  140. Library.Helix["13"]["TextXAlignment"] = Enum.TextXAlignment.Left;
  141. Library.Helix["13"]["TextYAlignment"] = Enum.TextYAlignment.Bottom;
  142. Library.Helix["13"]["TextScaled"] = true;
  143. Library.Helix["13"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255);
  144. Library.Helix["13"]["TextSize"] = 20;
  145. Library.Helix["13"]["TextColor3"] = Color3.fromRGB(255, 255, 255);
  146. Library.Helix["13"]["Size"] = UDim2.new(1, -12, 0, 26);
  147. Library.Helix["13"]["Text"] = options['title'] or 'Helix';
  148. Library.Helix["13"]["Name"] = [[title]];
  149. Library.Helix["13"]["Font"] = Enum.Font.GothamBlack;
  150. Library.Helix["13"]["BackgroundTransparency"] = 1;
  151. Library.Helix["13"]["Position"] = UDim2.new(0, 12, 0, 10);
  152.  
  153. -- StarterGui.Helix.MainFrame.Close
  154. Library.Helix["14"] = Instance.new("ImageButton", Library.Helix["2"]);
  155. Library.Helix["14"]["BackgroundColor3"] = Color3.fromRGB(21, 21, 21);
  156. Library.Helix["14"]["Image"] = [[rbxassetid://10145570075]];
  157. Library.Helix["14"]["Size"] = UDim2.new(0, 20, 0, 20);
  158. Library.Helix["14"]["Name"] = [[Close]];
  159. Library.Helix["14"]["BorderColor3"] = Color3.fromRGB(21, 21, 21);
  160. Library.Helix["14"]["Position"] = UDim2.new(0.9559392929077148, 0, 0.017299270257353783, 0);
  161. Library.Helix["14"]["BackgroundTransparency"] = 1;
  162.  
  163. -- StarterGui.Helix.MainFrame.Close.UICorner
  164. Library.Helix["15"] = Instance.new("UICorner", Library.Helix["14"]);
  165.  
  166.  
  167. -- StarterGui.Helix.MainFrame.Close.LocalScript
  168. Library.Helix["16"] = Instance.new("LocalScript", Library.Helix["14"]);
  169.  
  170.  
  171. -- StarterGui.Helix.MainFrame.separator
  172. Library.Helix["17"] = Instance.new("Frame", Library.Helix["2"]);
  173. Library.Helix["17"]["BorderSizePixel"] = 0;
  174. Library.Helix["17"]["BackgroundColor3"] = Color3.fromRGB(29, 29, 29);
  175. Library.Helix["17"]["AnchorPoint"] = Vector2.new(0, 0.5);
  176. Library.Helix["17"]["Size"] = UDim2.new(0, 1, 1, 0);
  177. Library.Helix["17"]["BorderColor3"] = Color3.fromRGB(29, 29, 29);
  178. Library.Helix["17"]["Position"] = UDim2.new(0, 152, 0.5, 0);
  179. Library.Helix["17"]["Name"] = [[separator]];
  180.  
  181. -- StarterGui.Helix.MainFrame.separator
  182. Library.Helix["18"] = Instance.new("Frame", Library.Helix["2"]);
  183. Library.Helix["18"]["BorderSizePixel"] = 0;
  184. Library.Helix["18"]["BackgroundColor3"] = Color3.fromRGB(29, 29, 29);
  185. Library.Helix["18"]["AnchorPoint"] = Vector2.new(0, 0.5);
  186. Library.Helix["18"]["Size"] = UDim2.new(0, 152, 0, 1);
  187. Library.Helix["18"]["BorderColor3"] = Color3.fromRGB(29, 29, 29);
  188. Library.Helix["18"]["Position"] = UDim2.new(0, 0, 0, 65);
  189. Library.Helix["18"]["Name"] = [[separator]];
  190.  
  191. task.spawn(function()
  192. local script = Library.Helix["4"];
  193. local TweenService = game:GetService("TweenService")
  194. local GlobalTweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.In)
  195. local function Tween(GuiObject, Dictionary)
  196. local TweenBase = TweenService:Create(GuiObject, GlobalTweenInfo, Dictionary)
  197. TweenBase:Play()
  198. return TweenBase
  199. end
  200. local gui = script.Parent
  201. gui.Position = UDim2.new(-0.395, 0, 0.171, 0)
  202. task.wait(0.5)
  203. Tween(gui, {Position = UDim2.new(0.3, 0, 0.188, 0)})
  204. end)
  205.  
  206. task.spawn(function()
  207. local script = Library.Helix["6"];
  208. local UserInputService = game:GetService("UserInputService")
  209. local runService = (game:GetService("RunService"));
  210. local gui = script.Parent
  211. local dragging
  212. local dragInput
  213. local dragStart
  214. local startPos
  215. local function Lerp(a, b, m)
  216. return a + (b - a) * m
  217. end;
  218. local lastMousePos
  219. local lastGoalPos
  220. local DRAG_SPEED = (4); -- // The speed of the UI darg.
  221. local function Update(dt)
  222. if not (startPos) then return end;
  223. if not (dragging) and (lastGoalPos) then
  224. 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))
  225. return
  226. end;
  227. local delta = (lastMousePos - UserInputService:GetMouseLocation())
  228. local xGoal = (startPos.X.Offset - delta.X);
  229. local yGoal = (startPos.Y.Offset - delta.Y);
  230. lastGoalPos = UDim2.new(startPos.X.Scale, xGoal, startPos.Y.Scale, yGoal)
  231. 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))
  232. end;
  233. gui.InputBegan:Connect(function(input)
  234. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  235. dragging = true
  236. dragStart = input.Position
  237. startPos = gui.Position
  238. lastMousePos = UserInputService:GetMouseLocation()
  239.  
  240. input.Changed:Connect(function()
  241. if input.UserInputState == Enum.UserInputState.End then
  242. dragging = false
  243. end
  244. end)
  245. end
  246. end)
  247. gui.InputChanged:Connect(function(input)
  248. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  249. dragInput = input
  250. end
  251. end)
  252. runService.Heartbeat:Connect(Update)
  253. end)
  254.  
  255. function Library:Close()
  256. task.spawn(function()
  257. local script = Library.Helix["16"];
  258. local closebtn = script.Parent
  259. local ui = closebtn.Parent
  260.  
  261. closebtn.MouseButton1Click:Connect(function()
  262. ui:Destroy()
  263. end)
  264. end)
  265. end
  266. end
  267.  
  268. return Library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement