Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Scapters 2017 Egghunt gui! (I've made one every year since I joined ROBLOX not gonna stop now, bone apple the teeth.)
- local Highlight = {"Admin", "Fab"} --Add the name of eggs you want to be highlighted red here. (Make it easier to standout in the list.)
- local Gui = Instance.new("ScreenGui")
- Gui.Name = "ScaptersEgghuntGui"
- Gui.Parent = game.CoreGui
- local Open = true
- local Button = Instance.new("ImageButton")
- Button.Name = "Open"
- Button.BackgroundTransparency = 1
- Button.Size = UDim2.new(0, 50, 0, 50)
- Button.Image = "rbxassetid://627627476"
- Button.Position = UDim2.new(0, 0, 0.9, 0)
- Button.Parent = Gui
- local Frame = Instance.new("ScrollingFrame")
- Frame.Name = "Holder"
- Frame.BackgroundColor3 = Color3.new(87/255, 87/255, 87/255)
- Frame.Size = UDim2.new(0, 200, 0, 400)
- Frame.Position = UDim2.new(0, 0, 0, 200)
- Frame.CanvasSize = UDim2.new(0, 0, 0, 0)
- Frame.ScrollBarThickness = 8
- Frame.Parent = Gui
- Button.MouseButton1Down:connect(function()
- if Open then
- Open = false
- Frame:TweenPosition(UDim2.new(0, -250, 0, 200), "Out", "Quint", 0.3, true)
- else
- Open = true
- Frame:TweenPosition(UDim2.new(0, 0, 0, 200), "Out", "Quint", 0.3, true)
- end
- end)
- local Constraint = Instance.new("UIListLayout")
- Constraint.Name = "List"
- Constraint.Padding = UDim.new(0, 5)
- Constraint.Parent = Frame
- local Template = Instance.new("TextButton")
- Template.Size = UDim2.new(1, 0, 0, 50)
- Template.BackgroundTransparency = 1
- Template.Font = "Cartoon"
- Template.TextScaled = true
- Template.TextColor3 = Color3.new(255/255, 255/255, 255/255)
- local Obj = Instance.new("ObjectValue")
- Obj.Name = "Egg"
- Obj.Parent = Template
- game.Workspace.Eggs.DescendantRemoving:connect(function(egg)
- for _,v in pairs(Frame:GetChildren()) do
- if v:IsA("TextButton") then
- if v.Egg.Value == egg then
- v:Destroy()
- end
- end
- end
- end)
- game.Workspace.Eggs.DescendantAdded:connect(function(v)
- local Egg = Template:Clone()
- for _,c in pairs(Highlight) do
- if string.find(v.Name, c) then
- Egg.TextColor3 = Color3.new(255/255, 0/255, 0/255)
- end
- end
- Egg.MouseButton1Down:connect(function()
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = Egg.Egg.Value.CFrame
- end)
- Egg.Text = v.Name
- Egg.Name = v.Name
- Egg.Egg.Value = v
- Egg.Parent = Frame
- Frame.CanvasSize = UDim2.new(0, 0, 0, #Frame:GetChildren()*51)
- end)
- for _,v in pairs(game.Workspace.Eggs:GetChildren()) do
- local Egg = Template:Clone()
- for _,c in pairs(Highlight) do
- if string.find(v.Name, c) then
- Egg.TextColor3 = Color3.new(255/255, 0/255, 0/255)
- end
- end
- Egg.MouseButton1Down:connect(function()
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = Egg.Egg.Value.CFrame
- end)
- Egg.Text = v.Name
- Egg.Name = v.Name
- Egg.Egg.Value = v
- Egg.Parent = Frame
- Frame.CanvasSize = UDim2.new(0, 0, 0, #Frame:GetChildren()*51)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement