SkeletalScripts

lib 4 egg hunt

Apr 9th, 2020
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.43 KB | None | 0 0
  1. local Library = {}
  2.  
  3. local ScreenGui = Instance.new("ScreenGui")
  4. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  5. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  6. ScreenGui.ResetOnSpawn = false
  7. function Library:Create()
  8. local Frame = Instance.new("Frame")
  9. local Top = Instance.new("Frame")
  10. local TextLabel = Instance.new("TextLabel")
  11. local UIGradient = Instance.new("UIGradient")
  12. local Minimize = Instance.new("TextButton")
  13. local TextLabel_2 = Instance.new("TextLabel")
  14. local ScrollingFrame = Instance.new("ScrollingFrame")
  15. local UIListLayout = Instance.new("UIListLayout")
  16.  
  17. Frame.Parent = ScreenGui
  18. Frame.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
  19. Frame.BorderColor3 = Color3.fromRGB(85, 255, 127)
  20. Frame.Position = UDim2.new(0.281763822, 0, 0.231098428, 0)
  21. Frame.Size = UDim2.new(0, 350, 0, 400)
  22. Frame.ClipsDescendants = true
  23. Frame.Active = true
  24. local dragger = {}; do
  25. local mouse = game:GetService("Players").LocalPlayer:GetMouse();
  26. local inputService = game:GetService('UserInputService');
  27. local heartbeat = game:GetService("RunService").Heartbeat;
  28. -- // credits to Ririchi / Inori for this cute drag function :)
  29. function dragger.new(frame)
  30. local s, event = pcall(function()
  31. return frame.MouseEnter
  32. end)
  33.  
  34. if s then
  35. frame.Active = true;
  36. event:connect(function()
  37. local input = frame.InputBegan:connect(function(key)
  38. if key.UserInputType == Enum.UserInputType.MouseButton1 then
  39. local objectPosition = Vector2.new(mouse.X - frame.AbsolutePosition.X, mouse.Y - frame.AbsolutePosition.Y);
  40. while heartbeat:wait() and inputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) do
  41. pcall(function()
  42. frame:TweenPosition(UDim2.new(0, mouse.X - objectPosition.X + (frame.Size.X.Offset * frame.AnchorPoint.X), 0, mouse.Y - objectPosition.Y + (frame.Size.Y.Offset * frame.AnchorPoint.Y)), 'Out', 'Linear', 0.1, true);
  43. end)
  44. end
  45. end
  46. end)
  47.  
  48. local leave;
  49. leave = frame.MouseLeave:connect(function()
  50. input:disconnect();
  51. leave:disconnect();
  52. end)
  53. end)
  54. end
  55. end
  56. end
  57. dragger.new(Frame)
  58. Top.Name = "Top"
  59. Top.Parent = Frame
  60. Top.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  61. Top.BorderSizePixel = 0
  62. Top.Size = UDim2.new(0, 350, 0, 50)
  63.  
  64. TextLabel.Parent = Top
  65. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  66. TextLabel.BackgroundTransparency = 1.000
  67. TextLabel.Size = UDim2.new(0, 300, 0, 30)
  68. TextLabel.Font = Enum.Font.GothamBold
  69. TextLabel.Text = "Egg Hunt Haxx"
  70. TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
  71. TextLabel.TextScaled = true
  72. TextLabel.TextSize = 14.000
  73. TextLabel.TextWrapped = true
  74.  
  75. UIGradient.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(85, 255, 127)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(45, 45, 45))}
  76. UIGradient.Rotation = 270
  77. UIGradient.Parent = Top
  78.  
  79. Minimize.Name = "Minimize"
  80. Minimize.Parent = Top
  81. Minimize.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  82. Minimize.BackgroundTransparency = 1.000
  83. Minimize.Position = UDim2.new(0.857142866, 0, 0, 0)
  84. Minimize.Size = UDim2.new(0, 50, 0, 50)
  85. Minimize.Font = Enum.Font.GothamSemibold
  86. Minimize.Text = "-"
  87. Minimize.TextColor3 = Color3.fromRGB(0, 0, 0)
  88. Minimize.TextScaled = true
  89. Minimize.TextSize = 14.000
  90. Minimize.TextWrapped = true
  91. Minimize.MouseButton1Click:Connect(function()
  92. if Minimize.Text == "-" then
  93. ScrollingFrame:TweenSize(UDim2.new(0,350,0,0),"In","Sine",0.75,true,nil)
  94. Frame:TweenSize(UDim2.new(0,350,0,50),"In","Sine",0.75,true,nil)
  95.  
  96. wait(0.75)
  97. Minimize.Text = "+"
  98. ScrollingFrame.Visible = false
  99. else
  100. ScrollingFrame:TweenSize(UDim2.new(0,350,0,350),"Out","Sine",0.75,true,nil)
  101. Frame:TweenSize(UDim2.new(0,350,0,400),"Out","Sine",0.75,true,nil)
  102. ScrollingFrame.Visible = true
  103. wait(0.75)
  104. Minimize.Text = "-"
  105. end
  106. end)
  107.  
  108. TextLabel_2.Parent = Top
  109. TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  110. TextLabel_2.BackgroundTransparency = 1.000
  111. TextLabel_2.Position = UDim2.new(0, 0, 0.600000024, 0)
  112. TextLabel_2.Size = UDim2.new(0, 300, 0, 20)
  113. TextLabel_2.Font = Enum.Font.GothamBlack
  114. TextLabel_2.Text = "By SkeletalScripts"
  115. TextLabel_2.TextColor3 = Color3.fromRGB(0, 0, 0)
  116. TextLabel_2.TextScaled = true
  117. TextLabel_2.TextSize = 14.000
  118. TextLabel_2.TextWrapped = true
  119.  
  120. ScrollingFrame.Parent = Frame
  121. ScrollingFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  122. ScrollingFrame.BackgroundTransparency = 1.000
  123. ScrollingFrame.BorderColor3 = Color3.fromRGB(85, 255, 127)
  124. ScrollingFrame.Position = UDim2.new(0, 0, 0.125, 0)
  125. ScrollingFrame.Size = UDim2.new(0, 350, 0, 350)
  126. ScrollingFrame.CanvasSize = UDim2.new(0, 0, 1, 0)
  127. ScrollingFrame.VerticalScrollBarPosition = Enum.VerticalScrollBarPosition.Left
  128.  
  129. UIListLayout.Parent = ScrollingFrame
  130. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  131. local cr = {}
  132.  
  133. function cr:Button(name,callback)
  134. callback = callback or function() end
  135. local TextButton = Instance.new("TextButton")
  136. local UIGradient_2 = Instance.new("UIGradient")
  137. local Sample = Instance.new("ImageLabel")
  138. TextButton.Parent = ScrollingFrame
  139. TextButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  140. TextButton.ClipsDescendants = true
  141. TextButton.Size = UDim2.new(1, 0, 0, 30)
  142. TextButton.Font = Enum.Font.GothamBold
  143. TextButton.Text = " "..name
  144. TextButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  145. TextButton.TextScaled = true
  146. TextButton.TextSize = 14.000
  147. TextButton.TextWrapped = true
  148. TextButton.TextXAlignment = Enum.TextXAlignment.Left
  149.  
  150. UIGradient_2.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(65, 65, 65)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(85, 255, 127))}
  151. UIGradient_2.Rotation = 90
  152. UIGradient_2.Parent = TextButton
  153.  
  154. Sample.Name = "Sample"
  155. Sample.Parent = TextButton
  156. Sample.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  157. Sample.BackgroundTransparency = 1.000
  158. Sample.ZIndex = 7
  159. Sample.Image = "http://www.roblox.com/asset/?id=4560909609"
  160. Sample.ImageTransparency = 0.600
  161.  
  162. local ms = game.Players.LocalPlayer:GetMouse()
  163. local btn = TextButton
  164. local sample = Sample
  165. btn.MouseButton1Click:Connect(function()
  166. local c = sample:Clone()
  167. c.Parent = btn
  168. local x, y = (ms.X - c.AbsolutePosition.X), (ms.Y - c.AbsolutePosition.Y)
  169. c.Position = UDim2.new(0, x, 0, y)
  170. local len, size = 0.35, nil
  171. if btn.AbsoluteSize.X >= btn.AbsoluteSize.Y then
  172. size = (btn.AbsoluteSize.X * 1.5)
  173. else
  174. size = (btn.AbsoluteSize.Y * 1.5)
  175. end
  176. c:TweenSizeAndPosition(UDim2.new(0, size, 0, size), UDim2.new(0.5, (-size / 2), 0.5, (-size / 2)), 'Out', 'Quad', len, true, nil)
  177. for i = 1, 10 do
  178. c.ImageTransparency = c.ImageTransparency + 0.05
  179. wait(len / 12)
  180. end
  181. c:Destroy()
  182. end)
  183.  
  184. TextButton.MouseButton1Click:Connect(callback)
  185.  
  186. ScrollingFrame.CanvasSize = ScrollingFrame.CanvasSize + UDim2.new(0,0,0,30)
  187. end
  188. return cr;
  189. end
  190. return Library
Advertisement
Add Comment
Please, Sign In to add comment