Advertisement
SlyHades66

Egghunt

Mar 19th, 2016
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.54 KB | None | 0 0
  1. local s = Instance.new("ScreenGui", game.CoreGui)
  2. local f = Instance.new("Frame", s)
  3. f.BackgroundTransparency = 1
  4. f.Position = UDim2.new(0.2,0,0.1,0)
  5. button = Instance.new("TextButton", f)
  6. button.Name = "1"
  7. button.Text = "Teleport Eggs To Player"
  8. button.BackgroundTransparency = 1
  9. button.TextColor3 = Color3.new(255,255,255)
  10. button.Font = "SourceSansBold"
  11. button.FontSize = "Size24"
  12. button.Size = UDim2.new(0,200,0,20)
  13. button.Position = button.Position-UDim2.new(0,55,0,0)
  14.  
  15. button.MouseButton1Down:connect(function()
  16. function g(o)
  17. for i,v in pairs(o:children())do
  18. if v.ClassName == "Part" then
  19. v.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
  20. end
  21. g(v)
  22. end
  23. end
  24. pcall(g,game.Workspace.Eggs)
  25. end)
  26.  
  27. local e = 2
  28. local previousvalue = 1
  29. for i,v in pairs(game.Workspace.Eggs:GetChildren()) do
  30. if f:FindFirstChild('1') then
  31. local q = Instance.new("TextButton", f)
  32. q.Size = UDim2.new(0,200,0,20)
  33. q.BackgroundTransparency = 1
  34. q.TextColor3 = Color3.new(255,255,255)
  35. q.Name = e
  36. q.Text = v.Name
  37. q.Font = "SourceSansBold"
  38. q.FontSize = "Size24"
  39. q.Position = f[previousvalue].Position+UDim2.new(0,0,0,28)
  40. previousvalue = e
  41. e = e+1
  42. end
  43. end
  44.  
  45. game.Workspace.Eggs.ChildAdded:connect(function(player)
  46. local q = Instance.new("TextButton", f)
  47. q.Size = UDim2.new(0,200,0,20)
  48. q.BackgroundTransparency = 1
  49. q.TextColor3 = Color3.new(255,255,255)
  50. q.Name = e
  51. q.Text = player.Name
  52. q.Font = "SourceSansBold"
  53. q.FontSize = "Size24"
  54. q.Position = f[previousvalue].Position+UDim2.new(0,0,0,28)
  55. previousvalue = e
  56. e = e+1
  57. end)
  58.  
  59. game.Workspace.Eggs.ChildRemoved:connect(function(removed)
  60. for i,v in pairs(f:GetChildren()) do
  61. if v.Name ~= "1" then
  62. v:Destroy()
  63. end
  64. end
  65. wait(0.03)
  66.  
  67. local e = 2
  68. local previousvalue = 1
  69. for i,v in pairs(game.Workspace.Eggs:GetChildren()) do
  70. if f:FindFirstChild('1') then
  71. local q = Instance.new("TextButton", f)
  72. q.Size = UDim2.new(0,200,0,20)
  73. q.BackgroundTransparency = 1
  74. q.TextColor3 = Color3.new(255,255,255)
  75. q.Name = e
  76. q.Text = v.Name
  77. q.Font = "SourceSansBold"
  78. q.FontSize = "Size24"
  79. q.Position = f[previousvalue].Position+UDim2.new(0,0,0,28)
  80. previousvalue = e
  81. e = e+1
  82. end
  83. end
  84. end)
  85.  
  86. for i,v in pairs(f:GetChildren()) do
  87. if v.Name ~= "1" then
  88. v.MouseButton1Down:connect(function()
  89. function g(o)
  90. for i,c in pairs(o:children())do
  91. if c.Name == v.Text or c.Parent.Name == v.Text or c.Parent.Parent.Name == v.Text or c.Parent.Parent.Parent.Name == v.Text then
  92. if c.ClassName == "Part" then
  93. wait(0.3)
  94. if c.Name == v.Text or c.Parent.Name == v.Text or c.Parent.Parent.Name == v.Text or c.Parent.Parent.Parent.Name == v.Text then
  95. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = c.CFrame
  96. end
  97. end
  98. end
  99. g(c)
  100. end
  101. end
  102. pcall(g,game.Workspace.Eggs)
  103. end)
  104. end
  105. end
  106.  
  107. --Collectibles
  108. wait(3)
  109.  
  110. local s = Instance.new("ScreenGui", game.CoreGui)
  111. local f = Instance.new("Frame", s)
  112. f.BackgroundTransparency = 1
  113. f.Position = UDim2.new(0.8,0,0.1,0)
  114. button = Instance.new("TextButton", f)
  115. button.Name = "1"
  116. button.Text = "Teleport Collectibles To Player"
  117. button.BackgroundTransparency = 1
  118. button.TextColor3 = Color3.new(255,255,255)
  119. button.Font = "SourceSansBold"
  120. button.FontSize = "Size24"
  121. button.Size = UDim2.new(0,200,0,20)
  122. button.Position = button.Position-UDim2.new(0,55,0,0)
  123.  
  124. button.MouseButton1Down:connect(function()
  125. function g(o)
  126. for i,v in pairs(o:children())do
  127. if v.ClassName == "Part" then
  128. v.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
  129. end
  130. g(v)
  131. end
  132. end
  133. pcall(g,game.Workspace.CollectibleItems)
  134. end)
  135.  
  136. local e = 2
  137. local previousvalue = 1
  138. for i,v in pairs(game.Workspace.CollectibleItems:GetChildren()) do
  139. if f:FindFirstChild('1') then
  140. local q = Instance.new("TextButton", f)
  141. q.Size = UDim2.new(0,200,0,20)
  142. q.BackgroundTransparency = 1
  143. q.TextColor3 = Color3.new(255,255,255)
  144. q.Name = e
  145. q.Text = v.Name
  146. q.Font = "SourceSansBold"
  147. q.FontSize = "Size24"
  148. q.Position = f[previousvalue].Position+UDim2.new(0,0,0,28)
  149. previousvalue = e
  150. e = e+1
  151. end
  152. end
  153.  
  154. game.Workspace.CollectibleItems.ChildAdded:connect(function(player)
  155. local q = Instance.new("TextButton", f)
  156. q.Size = UDim2.new(0,200,0,20)
  157. q.BackgroundTransparency = 1
  158. q.TextColor3 = Color3.new(255,255,255)
  159. q.Name = e
  160. q.Text = player.Name
  161. q.Font = "SourceSansBold"
  162. q.FontSize = "Size24"
  163. q.Position = f[previousvalue].Position+UDim2.new(0,0,0,28)
  164. previousvalue = e
  165. e = e+1
  166. end)
  167.  
  168. game.Workspace.CollectibleItems.ChildRemoved:connect(function(removed)
  169. for i,v in pairs(f:GetChildren()) do
  170. if v.Name ~= "1" then
  171. v:Destroy()
  172. end
  173. end
  174. wait(0.03)
  175.  
  176. local e = 2
  177. local previousvalue = 1
  178. for i,v in pairs(game.Workspace.CollectibleItems:GetChildren()) do
  179. if f:FindFirstChild('1') then
  180. local q = Instance.new("TextButton", f)
  181. q.Size = UDim2.new(0,200,0,20)
  182. q.BackgroundTransparency = 1
  183. q.TextColor3 = Color3.new(255,255,255)
  184. q.Name = e
  185. q.Text = v.Name
  186. q.Font = "SourceSansBold"
  187. q.FontSize = "Size24"
  188. q.Position = f[previousvalue].Position+UDim2.new(0,0,0,28)
  189. previousvalue = e
  190. e = e+1
  191. end
  192. end
  193. end)
  194.  
  195. for i,v in pairs(f:GetChildren()) do
  196. if v.Name ~= "1" then
  197. v.MouseButton1Down:connect(function()
  198. function g(o)
  199. for i,c in pairs(o:children())do
  200. if c.Name == v.Text or c.Parent.Name == v.Text or c.Parent.Parent.Name == v.Text or c.Parent.Parent.Parent.Name == v.Text then
  201. if c.ClassName == "Part" then
  202. wait(0.3)
  203. if c.Name == v.Text or c.Parent.Name == v.Text or c.Parent.Parent.Name == v.Text or c.Parent.Parent.Parent.Name == v.Text then
  204. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = c.CFrame
  205. end
  206. end
  207. end
  208. g(c)
  209. end
  210. end
  211. pcall(g,game.Workspace.CollectibleItems)
  212. end)
  213. end
  214. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement