Walterin0

Untitled

Nov 20th, 2018
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. -- Wait for your character to respawn
  2. -- Note that it rarely doesn't glitch your character (which is a good thing) and read thread before using this
  3. local targetname = "NottheDragonborn"
  4.  
  5. local LocalPlayer = game:GetService("Players").LocalPlayer
  6. local ran1 = false
  7. local ran2 = false
  8. local equipped = false
  9. local savepos = LocalPlayer.Character.HumanoidRootPart.CFrame
  10. local target = game:GetService("Players")[targetname]
  11. if #LocalPlayer.Backpack:GetChildren() < 2 then
  12. repeat
  13. for _, tool in pairs(LocalPlayer.Backpack:GetChildren()) do
  14. if tool:IsA("Tool") then
  15. tool.Parent = LocalPlayer
  16. end
  17. end
  18. LocalPlayer.Character:ClearAllChildren()
  19. local char = Instance.new("Model", workspace)
  20. char.Name = "character"
  21. Instance.new("Part", char).Name = "Torso";
  22. Instance.new("Part", char).Name = "Head";
  23. Instance.new("Humanoid", char).Name = "Humanoid";
  24. LocalPlayer.Character = char
  25. repeat wait() until LocalPlayer.Character
  26. until #LocalPlayer:GetChildren() - 4 >= 2
  27. for _, char in pairs(workspace:GetChildren()) do
  28. if char.Name == "character" and char:IsA("Model") then
  29. char:Destroy()
  30. end
  31. end
  32. repeat wait() until LocalPlayer.Character.HumanoidRootPart ~= nil
  33. for _, tool in pairs(LocalPlayer:GetChildren()) do
  34. if tool:IsA("Tool") then
  35. tool.Parent = LocalPlayer.Backpack
  36. end
  37. end
  38. LocalPlayer.Character.HumanoidRootPart.CFrame = savepos
  39. end
  40. LocalPlayer.Backpack:FindFirstChildOfClass("Tool").Parent = LocalPlayer.Character
  41. LocalPlayer.Backpack:FindFirstChildOfClass("Tool").Parent = LocalPlayer.Character
  42. local tool = LocalPlayer.Character:FindFirstChildOfClass("Tool")
  43. tool.Parent = workspace
  44. local attacher = LocalPlayer.Character:FindFirstChildOfClass("Tool")
  45. attacher.Parent = workspace
  46. LocalPlayer.Character.Humanoid:EquipTool(tool)
  47. repeat wait() until LocalPlayer.Character:FindFirstChildOfClass("Tool") ~= nil
  48. LocalPlayer.Character.Humanoid:UnequipTools()
  49. attacher.AncestryChanged:connect(function()
  50. if ran1 == false then
  51. ran1 = true
  52. equipped = true
  53. end
  54. end)
  55. repeat
  56. target.Character.HumanoidRootPart.CFrame = CFrame.new(LocalPlayer.Character.HumanoidRootPart.Position + LocalPlayer.Character.HumanoidRootPart.CFrame.lookVector * 2 + LocalPlayer.Character.HumanoidRootPart.CFrame.rightVector * 2)
  57. wait()
  58. until equipped == true
  59. LocalPlayer.CharacterAdded:connect(function(character)
  60. if ran2 == false then
  61. ran2 = true
  62. character:WaitForChild("HumanoidRootPart")
  63. character.HumanoidRootPart.CFrame = savepos
  64. end
  65. end)
  66. tool.GripPos = Vector3.new(0, -math.huge, 0)
  67. LocalPlayer.Character.Humanoid:EquipTool(tool)
Advertisement
Add Comment
Please, Sign In to add comment