Advertisement
MegumuSenpai

Dragon Adventures | Egg TP

Feb 9th, 2020
40,111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. -- Variable
  2. local player = game.Players.LocalPlayer
  3.  
  4. -- Grab Egg & Teleport back
  5. function grab()
  6. for i,v in pairs(workspace.CollectionZones.Eggs:GetChildren()) do
  7. if v:FindFirstChild("Egg") then
  8. local old = player.Character.HumanoidRootPart.CFrame
  9. repeat
  10. player.Character.HumanoidRootPart.CFrame = v.Egg.CFrame
  11. wait()
  12. player.Remote:FireServer("PickEggObj", v)
  13. until v == nil or v.Parent == nil
  14. player.Character.HumanoidRootPart.CFrame = old
  15. return
  16. end
  17. end
  18. game.StarterGui:SetCore("SendNotification", {Title="No Eggs found";Duration=5;Text="";})
  19. wait(3)
  20. end
  21.  
  22. -- Bad loop
  23. repeat
  24. grab()
  25. wait()
  26. until not _G.Loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement