Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Tool = script.Parent
- local Cooldown = false
- local CDTime = 5
- local Damage = 40
- Tool.RemoteEvent.OnServerEvent:Connect(function(Player)
- if Cooldown then return end
- spawn(function()
- Cooldown = true
- wait(CDTime)
- Cooldown = false
- end)
- local FloorMaterial = Player.Character.Humanoid.FloorMaterial
- local animationTrack = Player.Character.Humanoid:LoadAnimation(Tool.Animation)
- local WalkSpeed = Player.Character.Humanoid.WalkSpeed -- added in after vid just changes down to 0
- Player.Character.Humanoid.WalkSpeed = 0
- animationTrack:Play()
- wait(.6)
- Player.Character.Humanoid.WalkSpeed = WalkSpeed
- Tool["Inital Impact"]:Play()
- Tool["Ground Shake"]:Play()
- for i = 1,15 do
- wait(.1)
- local int = math.random(6,12)
- local offset = Vector3.new(0,0,-8) * i
- local Boulder = Instance.new("Part",workspace)
- if FloorMaterial == Enum.Material.Grass then
- Boulder.BrickColor = BrickColor.new("Parsley green")
- else if FloorMaterial == Enum.Material.Slate then
- Boulder.BrickColor = BrickColor.new("Nougat")
- end
- end
- Boulder.CanCollide = true
- Boulder.CFrame = Player.Character.HumanoidRootPart.CFrame * CFrame.new(offset)
- Boulder.Orientation = Vector3.new(math.random(-150,300),math.random(-150,300),math.random(-150,300))
- Boulder.Name = "Boulder"
- Boulder.Anchored = true
- Boulder.Material = FloorMaterial
- Boulder.Shape = Enum.PartType.Block
- Boulder.Size = Vector3.new(int,int,int)
- game.Debris:AddItem(Boulder,3.8)
- Boulder.Touched:Connect(function(hit)
- if hit and hit.Parent:FindFirstChild("Humanoid") then
- if hit.Parent == Player.Character then return end
- hit.Parent.Humanoid:TakeDamage(2) -- this is constant tick damage dont change
- end
- end)
- end
- wait(1.5)
- Tool["Ground Shake"]:Stop()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement