Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -----------
- local script:
- local Tool = script.Parent
- local Cooldown = false
- local Continue = false
- local CDTime = 15 -- Cooldown
- local Length = 10 -- How long the rasenshuriken lasts
- local Damage = 35 -- Damage
- Tool.RemoteEvent.OnServerEvent:Connect(function(Player, Mouse)
- if Cooldown then return end
- spawn(function()
- Cooldown = true
- wait(CDTime)
- Cooldown = false
- end)
- Tool.Sound:Play()
- Continue = true
- spawn(function()
- wait(Length)
- Continue = false
- end)
- local DarkImpulse = game.ReplicatedStorage["ImpulseParticle"]:Clone()
- DarkImpulse.Parent = workspace
- local Weld = Instance.new("Weld",DarkImpulse)
- Weld.Part0 = DarkImpulse
- Weld.Part1 = Player.Character.HumanoidRootPart
- Weld.C0 = CFrame.new(0,-3,0)
- game.Debris:AddItem(DarkImpulse,Length)
- local tweenService = game:GetService("TweenService")
- local goal = {Size = 10}
- local tweenInfo = TweenInfo.new(5)
- local tween = tweenService:Create(DarkImpulse, tweenInfo, goal)
- tween:Play()
- local animationTrack = Player.Character.Humanoid:LoadAnimation(Tool.Animation)
- animationTrack:Play()
- spawn(function()
- wait(Length)
- animationTrack:Stop()
- Tool.Sound:Stop()
- end)
- spawn(function()
- for i = 1,350 do
- wait(.001)
- Weld.C1 = CFrame.fromEulerAnglesXYZ(0,i,0)
- end
- end)
- Tool.Thrown.OnServerEvent:Connect(function(plr, Mouse)
- if Continue == false then return end
- DarkImpulse:Destroy()
- animationTrack:Stop()
- Tool.Sound:Stop()
- Tool.Throw:Play()
- local Thrown = game.ReplicatedStorage.DarkImpulse:Clone()
- Thrown.Parent = workspace
- game.Debris:AddItem(Thrown,6)
- local pos = plr.Character.Head.Position + CFrame.new(plr.Character.Head.Position,Mouse.p).lookVector * 1
- Thrown.CFrame = CFrame.new(pos,Mouse.p)
- Thrown:SetNetworkOwner(plr)
- local BodyVelocity = Instance.new("BodyVelocity",Thrown)
- BodyVelocity.Velocity = Mouse.lookVector * 140
- BodyVelocity.MaxForce = Vector3.new(1e8,1e8,1e8)
- -- Hits a part
- Thrown.Touched:Connect(function(hit)
- if hit and not hit.Parent:FindFirstChild("Humanoid") and hit.CanCollide == true then
- Tool.Explosion:Play()
- local Shockwave = game.ReplicatedStorage.Shockwave:Clone()
- Shockwave.CFrame = Thrown.CFrame
- Thrown:Destroy()
- game.Debris:AddItem(Shockwave,7)
- Shockwave.Parent = workspace
- -- Growth
- spawn(function()
- for i = 1,50 do
- wait(.0001)
- Shockwave.Size = Shockwave.Size + Vector3.new(1.1,1.1,1.1)
- end
- end)
- wait(1)
- end
- end)
- -- Hits a player
- Thrown.Touched:Connect(function(hit)
- if hit.Parent == Player.Character then return end
- if hit and hit.Parent:FindFirstChild("Humanoid") then
- local EnemyHum = hit.Parent:FindFirstChild("Humanoid")
- EnemyHum:TakeDamage(Damage)
- DarkImpulse:Destroy()
- Tool.Explosion:Play()
- Tool.Explosion:Play()
- local Shockwave = game.ReplicatedStorage.Shockwave:Clone()
- Shockwave.CFrame = Thrown.CFrame
- Thrown:Destroy()
- game.Debris:AddItem(Shockwave,7)
- Shockwave.Parent = workspace
- -- Growth
- spawn(function()
- for i = 1,50 do
- wait(.0001)
- Shockwave.Size = Shockwave.Size + Vector3.new(1.1,1.1,1.1)
- end
- end)
- wait(1)
- end
- end)
- end)
- end)
- ----------------
- Script:
- local Tool = script.Parent
- local Mouse = game.Players.LocalPlayer:GetMouse()
- local Cooldown = false
- local Activated = false
- local CDTime = 15
- Tool.Activated:Connect(function()
- if Activated == true then return end
- if Cooldown then return end
- spawn(function()
- Cooldown = true
- wait(CDTime)
- Cooldown = false
- end)
- Tool.RemoteEvent:FireServer()
- Activated = true
- end)
- Tool.Activated:Connect(function()
- if Activated == true then
- Tool.Thrown:FireServer(Mouse.Hit)
- Activated = false
- end
- end)
- ----------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement