Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Variable
- local player = game.Players.LocalPlayer
- -- Grab Egg & Teleport back
- function grab()
- for i,v in pairs(workspace.CollectionZones.Eggs:GetChildren()) do
- if v:FindFirstChild("Egg") then
- local old = player.Character.HumanoidRootPart.CFrame
- repeat
- player.Character.HumanoidRootPart.CFrame = v.Egg.CFrame
- wait()
- player.Remote:FireServer("PickEggObj", v)
- until v == nil or v.Parent == nil
- player.Character.HumanoidRootPart.CFrame = old
- return
- end
- end
- game.StarterGui:SetCore("SendNotification", {Title="No Eggs found";Duration=5;Text="";})
- wait(3)
- end
- -- Bad loop
- repeat
- grab()
- wait()
- until not _G.Loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement