derekiscool423

black sphere

Mar 26th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1.  
  2. player = game.Players.LocalPlayer
  3. char = player.Character
  4. torso = char.Torso
  5. mouse = player:GetMouse()
  6. down = false
  7. times = 100
  8. x = 10
  9. z = 0
  10. function grow(part)
  11. size = part.Size.X
  12. part:Resize(1, 1)
  13. part.mesh.Scale = part.mesh.Scale + Vector3.new(0, 1.5, 0)
  14. end
  15. m = Instance.new("Model", char)
  16. m.Name = "Black Sphere"
  17. orb = Instance.new("Part", m)
  18. orb.CanCollide = false
  19. orb.CFrame = torso.CFrame
  20. orb.Name = "Head"
  21. orb.Shape = "Ball"
  22. orb.BrickColor = BrickColor.new("Really black")
  23. orb.Material = "Neon"
  24. orb.Size = Vector3.new(1, 1, 1)
  25. orb.CanCollide = false
  26. hum = Instance.new("Humanoid", m)
  27. hum.MaxHealth = 0
  28. bp = Instance.new("BodyPosition", orb)
  29. bp.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  30. mouse.Button1Down:connect(function()
  31. down = true
  32. spike = Instance.new("Part", char)
  33. spike.Name = "Spike"
  34. spike.Size = Vector3.new(1, 1, 1)
  35. spike.BrickColor = BrickColor.new("Really black")
  36. spike.CanCollide = false
  37. spike.CFrame = orb.CFrame
  38. spike.Touched:connect(function(hit)
  39. if hit.Parent:FindFirstChildOfClass("Humanoid") ~= nil and hit.Parent ~= char then
  40. hit.Parent.Humanoid.Health = 0
  41. end
  42. end)
  43. mesh = Instance.new("SpecialMesh", spike)
  44. mesh.Name = "mesh"
  45. mesh.MeshId = "http://www.roblox.com/asset/?id=9257317"
  46. mesh.Scale = Vector3.new(5, 1, 5)
  47. weld = Instance.new("Weld", spike)
  48. weld.Part0 = spike
  49. weld.Part1 = orb
  50. weld.C1 = CFrame.new(0, 1, 0)
  51. while down == true do
  52. spike.CFrame = CFrame.new(spike.Position, mouse.Hit.p) * CFrame.Angles(4.7, 0, 0)
  53. grow(spike)
  54. wait()
  55. end
  56. end)
  57. mouse.Button1Up:connect(function()
  58. down = false
  59. char.Spike:Remove()
  60. end)
  61. function move(bp, torso)
  62. if down == false then
  63. bp.Position = Vector3.new(torso.CFrame.x, torso.CFrame.y, torso.CFrame.z) + Vector3.new(x, 4, z)
  64. end
  65. end
  66. while true do
  67. if down == false then
  68. for i = 1, times do
  69. x = x - 0.1
  70. z = z + 0.1
  71. move(bp, torso)
  72. wait()
  73. end
  74. for i = 1, times do
  75. x = x - 0.1
  76. z = z - 0.1
  77. move(bp, torso)
  78. wait()
  79. end
  80. for i = 1, times do
  81. x = x + 0.1
  82. z = z - 0.1
  83. move(bp, torso)
  84. wait()
  85. end
  86. for i = 1, times do
  87. x = x + 0.1
  88. z = z + 0.1
  89. move(bp, torso)
  90. wait()
  91. end
  92. wait()
  93. else
  94. wait()
  95. end
  96. end
Add Comment
Please, Sign In to add comment