clubstar54

Steel Ball

Jul 2nd, 2016
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.23 KB | None | 0 0
  1. wait()
  2. local Player = script.Parent.Parent
  3. local Char = Player.Character
  4. local Torso = Char.Torso
  5. local rs,ls,rh,lh,root,neck = Torso["Right Shoulder"],Torso["Left Shoulder"],Torso["Right Hip"],Torso["Left Hip"],Char.HumanoidRootPart.RootJoint,Torso.Neck
  6. local Go = false
  7. local On = false
  8.  
  9. function fakeJoint(joint)
  10. local Part0 = joint.Part0
  11. joint.Part0 = nil
  12. local Joint = Instance.new("Motor6D",game.JointsService)
  13. Joint.Part0 = Part0
  14. Joint.Part1 = joint.Part1
  15. Joint.C0 = joint.C0
  16. Joint.C1 = joint.C1
  17. return Joint
  18. end
  19.  
  20. function Spin()
  21. local Part = Instance.new("Part")
  22. Part.BrickColor = BrickColor.new("Bright orange")
  23. Part.Transparency = 0.3
  24. Part.Material = "Neon"
  25. Part.CanCollide = false
  26. Part.TopSurface = "Smooth"
  27. Part.BottomSurface = "Smooth"
  28. local Mesh = Instance.new("SpecialMesh",Part)
  29. Mesh.MeshId = "http://www.roblox.com/asset/?id=3270017"
  30. Mesh.MeshType = "FileMesh"
  31. Mesh.Scale = Vector3.new(1,1,1)
  32. return Part
  33. end
  34.  
  35. local Tool = Instance.new("Tool",Char)
  36. Tool.Name = "Steel Ball"
  37. Tool.CanBeDropped = false
  38. Tool.RequiresHandle = false
  39.  
  40. Tool.Activated:connect(function()
  41. if Go then return end
  42. Go = true
  43. local RS = fakeJoint(rs)
  44. local LS = fakeJoint(ls)
  45. local Body = fakeJoint(root)
  46. local Neck = fakeJoint(neck)
  47. local Ball = Instance.new("Part",Torso)
  48. Ball.BrickColor = BrickColor.new("Lime green")
  49. Ball.Material = "Marble"
  50. Ball.CanCollide = false
  51. Ball.Size = Vector3.new(1,1,1)
  52. Ball.TopSurface = "Smooth"
  53. Ball.BottomSurface = "Smooth"
  54. local Mesh = Instance.new("SpecialMesh",Ball)
  55. Mesh.MeshType = "Sphere"
  56. local w = Instance.new("Weld",Ball)
  57. w.Part0 = Char["Right Arm"]
  58. w.Part1 = Ball
  59. w.C0 = CFrame.new(0,-1.4,0)
  60. spawn(function()
  61. Ball.Touched:connect(function(Hit)
  62. if On then
  63. if Hit.Parent:findFirstChild("Humanoid") ~= nil then
  64. local vHuman = Hit.Parent.Humanoid
  65. if vHuman.Parent ~= Char and vHuman.Parent:findFirstChild(Char.Name) == nil then
  66. vHuman:TakeDamage(40)
  67. vHuman.Sit = true
  68. Hit.Velocity = Char.HumanoidRootPart.CFrame.lookVector * 100
  69. local Tag = Instance.new("ObjectValue",vHuman.Parent)
  70. Tag.Name = Char.Name
  71. spawn(function()
  72. repeat wait() until not On
  73. Tag:Destroy()
  74. end)
  75. end
  76. end
  77. end
  78. end)
  79. end)
  80. for i = 1,6 do wait()
  81. RS.C0 = RS.C0:lerp(rs.C0*CFrame.Angles(math.rad(-20),0,math.rad(-30)),0.6)
  82. LS.C0 = LS.C0:lerp(ls.C0*CFrame.Angles(math.rad(-20),0,math.rad(-30)),0.6)
  83. Body.C0 = Body.C0:lerp(root.C0*CFrame.Angles(math.rad(5),0,math.rad(-40)),0.6)
  84. Neck.C0 = Neck.C0:lerp(neck.C0*CFrame.Angles(0,0,math.rad(40)),0.6)
  85. end
  86. On = true
  87. spawn(function()
  88. while On do wait(0.15)
  89. local Spin = Spin()
  90. Spin.CFrame = CFrame.new(0,500000,0)*CFrame.Angles(math.rad(45),0,0) -- This is gross, sorry.
  91. local Vel = Instance.new("BodyVelocity",Spin)
  92. Vel.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  93. Vel.velocity = Ball.Velocity
  94. Spin.Parent = Torso
  95. spawn(function()
  96. while Spin ~= nil do game:GetService("RunService").Heartbeat:wait(0)
  97. Vel.velocity = Ball.Velocity
  98. Spin.CFrame = CFrame.new(Ball.Position)
  99. end
  100. end)
  101. spawn(function()
  102. for i = 1,10 do wait()
  103. Spin.Mesh.Scale = Spin.Mesh.Scale + Vector3.new(0.25,0.25,0.25)
  104. Spin.Transparency = Spin.Transparency + 0.7/10
  105. end
  106. Spin:Destroy()
  107. end)
  108. end
  109. end)
  110. wait(2)
  111. for i = 1,6 do wait()
  112. RS.C0 = RS.C0:lerp(rs.C0*CFrame.Angles(0,math.rad(-60),math.rad(100)),0.6)
  113. LS.C0 = LS.C0:lerp(ls.C0*CFrame.Angles(0,0,math.rad(-30)),0.6)
  114. Body.C0 = Body.C0:lerp(root.C0*CFrame.Angles(math.rad(10),0,math.rad(60)),0.6)
  115. Neck.C0 = Neck.C0:lerp(neck.C0*CFrame.Angles(0,0,math.rad(-50)),0.6)
  116. end
  117. local C0 = w.C0
  118. for i = 1,18 do wait()
  119. w.C0 = w.C0:lerp(C0*CFrame.new(0,-50,0),0.125)
  120. end
  121. wait(0.1)
  122. for i = 1,25 do wait()
  123. w.C0 = w.C0:lerp(C0,0.225)
  124. end
  125. On = false
  126. for i = 1,6 do wait()
  127. RS.C0 = RS.C0:lerp(rs.C0,0.6)
  128. LS.C0 = LS.C0:lerp(ls.C0,0.6)
  129. Body.C0 = Body.C0:lerp(root.C0,0.6)
  130. Neck.C0 = Neck.C0:lerp(neck.C0,0.6)
  131. end
  132. Ball:Destroy()
  133. RS:Destroy()
  134. LS:Destroy()
  135. Body:Destroy()
  136. Neck:Destroy()
  137. rs.Part0 = Torso
  138. ls.Part0 = Torso
  139. root.Part0 = Char.HumanoidRootPart
  140. neck.Part0 = Torso
  141. wait(0.5)
  142. Go = false
  143. end)
Advertisement
Add Comment
Please, Sign In to add comment