Advertisement
Leezyy

Untitled

Jul 24th, 2019
6,113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.69 KB | None | 0 0
  1. -----------
  2. local script:
  3.  
  4. local Tool = script.Parent
  5. local Cooldown = false
  6. local Continue = false
  7. local CDTime = 15 -- Cooldown
  8. local Length = 10 -- How long the rasenshuriken lasts
  9. local Damage = 35 -- Damage
  10.  
  11. Tool.RemoteEvent.OnServerEvent:Connect(function(Player, Mouse)
  12. if Cooldown then return end
  13.  
  14. spawn(function()
  15. Cooldown = true
  16. wait(CDTime)
  17. Cooldown = false
  18. end)
  19.  
  20. Tool.Sound:Play()
  21. Continue = true
  22.  
  23. spawn(function()
  24. wait(Length)
  25. Continue = false
  26. end)
  27.  
  28. local DarkImpulse = game.ReplicatedStorage["ImpulseParticle"]:Clone()
  29. DarkImpulse.Parent = workspace
  30. local Weld = Instance.new("Weld",DarkImpulse)
  31. Weld.Part0 = DarkImpulse
  32. Weld.Part1 = Player.Character.HumanoidRootPart
  33. Weld.C0 = CFrame.new(0,-3,0)
  34. game.Debris:AddItem(DarkImpulse,Length)
  35.  
  36. local tweenService = game:GetService("TweenService")
  37.  
  38. local goal = {Size = 10}
  39.  
  40. local tweenInfo = TweenInfo.new(5)
  41.  
  42. local tween = tweenService:Create(DarkImpulse, tweenInfo, goal)
  43.  
  44. tween:Play()
  45.  
  46. local animationTrack = Player.Character.Humanoid:LoadAnimation(Tool.Animation)
  47. animationTrack:Play()
  48.  
  49. spawn(function()
  50. wait(Length)
  51. animationTrack:Stop()
  52. Tool.Sound:Stop()
  53. end)
  54.  
  55. spawn(function()
  56. for i = 1,350 do
  57. wait(.001)
  58. Weld.C1 = CFrame.fromEulerAnglesXYZ(0,i,0)
  59. end
  60. end)
  61.  
  62.  
  63. Tool.Thrown.OnServerEvent:Connect(function(plr, Mouse)
  64. if Continue == false then return end
  65.  
  66. DarkImpulse:Destroy()
  67. animationTrack:Stop()
  68. Tool.Sound:Stop()
  69. Tool.Throw:Play()
  70. local Thrown = game.ReplicatedStorage.DarkImpulse:Clone()
  71. Thrown.Parent = workspace
  72. game.Debris:AddItem(Thrown,6)
  73. local pos = plr.Character.Head.Position + CFrame.new(plr.Character.Head.Position,Mouse.p).lookVector * 1
  74. Thrown.CFrame = CFrame.new(pos,Mouse.p)
  75. Thrown:SetNetworkOwner(plr)
  76. local BodyVelocity = Instance.new("BodyVelocity",Thrown)
  77. BodyVelocity.Velocity = Mouse.lookVector * 140
  78. BodyVelocity.MaxForce = Vector3.new(1e8,1e8,1e8)
  79.  
  80. -- Hits a part
  81. Thrown.Touched:Connect(function(hit)
  82. if hit and not hit.Parent:FindFirstChild("Humanoid") and hit.CanCollide == true then
  83. Tool.Explosion:Play()
  84. local Shockwave = game.ReplicatedStorage.Shockwave:Clone()
  85. Shockwave.CFrame = Thrown.CFrame
  86. Thrown:Destroy()
  87. game.Debris:AddItem(Shockwave,7)
  88. Shockwave.Parent = workspace
  89.  
  90.  
  91.  
  92. -- Growth
  93. spawn(function()
  94. for i = 1,50 do
  95. wait(.0001)
  96. Shockwave.Size = Shockwave.Size + Vector3.new(1.1,1.1,1.1)
  97. end
  98. end)
  99.  
  100. wait(1)
  101.  
  102. end
  103. end)
  104.  
  105.  
  106. -- Hits a player
  107. Thrown.Touched:Connect(function(hit)
  108. if hit.Parent == Player.Character then return end
  109. if hit and hit.Parent:FindFirstChild("Humanoid") then
  110. local EnemyHum = hit.Parent:FindFirstChild("Humanoid")
  111. EnemyHum:TakeDamage(Damage)
  112. DarkImpulse:Destroy()
  113. Tool.Explosion:Play()
  114. Tool.Explosion:Play()
  115. local Shockwave = game.ReplicatedStorage.Shockwave:Clone()
  116. Shockwave.CFrame = Thrown.CFrame
  117. Thrown:Destroy()
  118. game.Debris:AddItem(Shockwave,7)
  119. Shockwave.Parent = workspace
  120.  
  121.  
  122. -- Growth
  123. spawn(function()
  124. for i = 1,50 do
  125. wait(.0001)
  126. Shockwave.Size = Shockwave.Size + Vector3.new(1.1,1.1,1.1)
  127. end
  128. end)
  129.  
  130. wait(1)
  131.  
  132. end
  133. end)
  134.  
  135. end)
  136. end)
  137. ----------------
  138. Script:
  139. local Tool = script.Parent
  140. local Mouse = game.Players.LocalPlayer:GetMouse()
  141. local Cooldown = false
  142. local Activated = false
  143. local CDTime = 15
  144.  
  145. Tool.Activated:Connect(function()
  146. if Activated == true then return end
  147. if Cooldown then return end
  148.  
  149. spawn(function()
  150. Cooldown = true
  151. wait(CDTime)
  152. Cooldown = false
  153. end)
  154.  
  155. Tool.RemoteEvent:FireServer()
  156. Activated = true
  157. end)
  158.  
  159. Tool.Activated:Connect(function()
  160. if Activated == true then
  161. Tool.Thrown:FireServer(Mouse.Hit)
  162. Activated = false
  163. end
  164. end)
  165. ----------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement