Advertisement
SlyHades66

Roblox 2017 Egghunt Gui

Mar 24th, 2017
408
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.82 KB | None | 0 0
  1. --Scapters 2017 Egghunt gui! (I've made one every year since I joined ROBLOX not gonna stop now, bone apple the teeth.)
  2. local Highlight = {"Admin", "Fab"} --Add the name of eggs you want to be highlighted red here. (Make it easier to standout in the list.)
  3.  
  4. local Gui = Instance.new("ScreenGui")
  5. Gui.Name = "ScaptersEgghuntGui"
  6. Gui.Parent = game.CoreGui
  7.  
  8. local Open = true
  9. local Button = Instance.new("ImageButton")
  10. Button.Name = "Open"
  11. Button.BackgroundTransparency = 1
  12. Button.Size = UDim2.new(0, 50, 0, 50)
  13. Button.Image = "rbxassetid://627627476"
  14. Button.Position = UDim2.new(0, 0, 0.9, 0)
  15. Button.Parent = Gui
  16.  
  17. local Frame = Instance.new("ScrollingFrame")
  18. Frame.Name = "Holder"
  19. Frame.BackgroundColor3 = Color3.new(87/255, 87/255, 87/255)
  20. Frame.Size = UDim2.new(0, 200, 0, 400)
  21. Frame.Position = UDim2.new(0, 0, 0, 200)
  22. Frame.CanvasSize = UDim2.new(0, 0, 0, 0)
  23. Frame.ScrollBarThickness = 8
  24. Frame.Parent = Gui
  25.  
  26. Button.MouseButton1Down:connect(function()
  27.     if Open then
  28.         Open = false
  29.         Frame:TweenPosition(UDim2.new(0, -250, 0, 200), "Out", "Quint", 0.3, true)
  30.     else
  31.         Open = true
  32.         Frame:TweenPosition(UDim2.new(0, 0, 0, 200), "Out", "Quint", 0.3, true)
  33.     end
  34. end)
  35.  
  36. local Constraint = Instance.new("UIListLayout")
  37. Constraint.Name = "List"
  38. Constraint.Padding = UDim.new(0, 5)
  39. Constraint.Parent = Frame
  40.  
  41. local Template = Instance.new("TextButton")
  42. Template.Size = UDim2.new(1, 0, 0, 50)
  43. Template.BackgroundTransparency = 1
  44. Template.Font = "Cartoon"
  45. Template.TextScaled = true
  46. Template.TextColor3 = Color3.new(255/255, 255/255, 255/255)
  47.  
  48. local Obj = Instance.new("ObjectValue")
  49. Obj.Name = "Egg"
  50. Obj.Parent = Template
  51.  
  52. game.Workspace.Eggs.DescendantRemoving:connect(function(egg)
  53.     for _,v in pairs(Frame:GetChildren()) do
  54.         if v:IsA("TextButton") then
  55.             if v.Egg.Value == egg then
  56.                 v:Destroy()
  57.             end
  58.         end
  59.     end
  60. end)
  61.  
  62. game.Workspace.Eggs.DescendantAdded:connect(function(v)
  63.     local Egg = Template:Clone()
  64.     for _,c in pairs(Highlight) do
  65.         if string.find(v.Name, c) then
  66.             Egg.TextColor3 = Color3.new(255/255, 0/255, 0/255)
  67.         end
  68.     end
  69.     Egg.MouseButton1Down:connect(function()
  70.         game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = Egg.Egg.Value.CFrame
  71.     end)
  72.     Egg.Text = v.Name
  73.     Egg.Name = v.Name
  74.     Egg.Egg.Value = v
  75.     Egg.Parent = Frame
  76.     Frame.CanvasSize = UDim2.new(0, 0, 0, #Frame:GetChildren()*51)
  77. end)
  78.  
  79. for _,v in pairs(game.Workspace.Eggs:GetChildren()) do
  80.     local Egg = Template:Clone()
  81.     for _,c in pairs(Highlight) do
  82.         if string.find(v.Name, c) then
  83.             Egg.TextColor3 = Color3.new(255/255, 0/255, 0/255)
  84.         end
  85.     end
  86.     Egg.MouseButton1Down:connect(function()
  87.         game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = Egg.Egg.Value.CFrame
  88.     end)
  89.     Egg.Text = v.Name
  90.     Egg.Name = v.Name
  91.     Egg.Egg.Value = v
  92.     Egg.Parent = Frame
  93.     Frame.CanvasSize = UDim2.new(0, 0, 0, #Frame:GetChildren()*51)
  94. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement