Guest User

s

a guest
Jan 17th, 2020
876
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local player = game.Players.LocalPlayer
  2. local function waitForAlive()
  3. repeat
  4. wait()
  5. until
  6. player.Character
  7. and player.Character:FindFirstChild("Humanoid")
  8. and player.Character.Humanoid.Health > 0
  9. return player.Character
  10. end
  11. game.Workspace.Maps.DescendantAdded:Connect(function(v)
  12. if v:IsA("BasePart") and (v.Name == "StartMap" or v.Name == "StartPart" or (v.Name == "Water" and (v.Parent.Name == "EndMap" or v.Parent.Name == "Ocean"))) then
  13. waitForAlive():MoveTo(v.Position)
  14. elseif v:IsA("BasePart") and (v.Name == "EndPortal") then
  15. wait(1)
  16. while true do
  17. waitForAlive().PrimaryPart.CFrame = v.CFrame
  18. wait(80.5)
  19. end
  20. end
  21. end)
  22. for _,v in pairs(workspace.Maps:GetDescendants()) do
  23. if v:IsA("BasePart") and (v.Name == "StartMap" or v.Name == "StartPart") then
  24. waitForAlive().PrimaryPart.Parent:MoveTo(v.Position)
  25. end
  26. end
RAW Paste Data