Advertisement
zomio15

flying defese

Sep 16th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. Owners = script.Name
  2. Player = game.Players:findFirstChild(Owners)
  3. if Player.Character:findFirstChild(script.Name.."'s Defender") then
  4. Player.Character[script.Name.."'s Defender"]:remove()
  5. end
  6. local above = 5
  7. local come = true
  8. local M = Instance.new("Model")
  9. local H = Instance.new("Humanoid")
  10. M.Parent = Player.Character
  11. H.Parent = M
  12. H.MaxHealth = 0
  13. H.Health = 0
  14. M.Name = script.Name.."'s Defender"
  15. local p = Instance.new("Part")
  16. local bodyposxyz = Instance.new("BodyPosition")
  17. local bodygyroxyz = Instance.new("BodyGyro")
  18. bodyposxyz.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  19. p.BrickColor = BrickColor.new("White")
  20. f=Instance.new("SpecialMesh")
  21. f.Parent=p
  22. f.MeshId = "http://www.roblox.com/asset/?id=2806162"
  23. f.MeshType = "FileMesh"
  24. f.Scale = Vector3.new(0.5,0.5,0.5)
  25. f.TextureId = "http://www.roblox.com/asset/?id=34795697"
  26. p.Name = "Head"
  27. p.Parent = M
  28. p.Shape = "Ball"
  29. p.formFactor = "Symmetric"
  30. p.Size = Vector3.new(0.5, 0.5, 0.5)
  31. p.TopSurface = 0
  32. p.Locked = true
  33. bodyposxyz.Parent = p
  34.  
  35. while true do wait()
  36. pcall(function()
  37.  
  38. M.Parent = Player.Character
  39.  
  40. if (come == true) then
  41. bodyposxyz.position = (Player.Character.Torso.CFrame * CFrame.new(5, above, -2.5)).p + Vector3.new(0, 0, 0)
  42. end
  43. end)
  44.  
  45. if Player.Character:findFirstChild(script.Name.."'s Defender") then
  46. if not Player.Character[script.Name.."'s Defender"]:findFirstChild("Head") then
  47.  
  48. local M = Player.Character:findFirstChild(script.Name.."'s Defender")
  49. local H = Player.Character[script.Name.."'s Defender"]:findFirstChild("Humanoid")
  50. H.MaxHealth = 0
  51. H.Health = 0
  52. local p = Instance.new("Part")
  53. local bodyposxyz = Instance.new("BodyPosition")
  54. local bodygyroxyz = Instance.new("BodyGyro")
  55. bodyposxyz.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  56. p.BrickColor = BrickColor.new("White")
  57. f=Instance.new("SpecialMesh")
  58. f.Parent=p
  59. f.MeshId = "http://www.roblox.com/asset/?id=2806162"
  60. f.MeshType = "FileMesh"
  61. f.Scale = Vector3.new(0.5,0.5,0.5)
  62. f.TextureId = "http://www.roblox.com/asset/?id=34795697"
  63. p.Name = "Head"
  64. p.Parent = M
  65. p.Shape = "Ball"
  66. p.formFactor = "Symmetric"
  67. p.Size = Vector3.new(0.5, 0.5, 0.5)
  68. p.TopSurface = 0
  69. p.Locked = true
  70. bodyposxyz.Parent = p
  71. end
  72. end
  73. end
  74.  
  75. Game.JointsService.DescendantAdded:connect()
  76. Workspace.DescendantAdded:connect()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement