Advertisement
Guest User

Untitled

a guest
May 26th, 2019
2,410
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. local Tool = script.Parent
  2. local Cooldown = false
  3. local CDTime = 5
  4. local Damage = 40
  5.  
  6. Tool.RemoteEvent.OnServerEvent:Connect(function(Player)
  7. if Cooldown then return end
  8.  
  9. spawn(function()
  10. Cooldown = true
  11. wait(CDTime)
  12. Cooldown = false
  13. end)
  14.  
  15. local FloorMaterial = Player.Character.Humanoid.FloorMaterial
  16. local animationTrack = Player.Character.Humanoid:LoadAnimation(Tool.Animation)
  17. local WalkSpeed = Player.Character.Humanoid.WalkSpeed -- added in after vid just changes down to 0
  18. Player.Character.Humanoid.WalkSpeed = 0
  19. animationTrack:Play()
  20. wait(.6)
  21. Player.Character.Humanoid.WalkSpeed = WalkSpeed
  22.  
  23. Tool["Inital Impact"]:Play()
  24. Tool["Ground Shake"]:Play()
  25.  
  26. for i = 1,15 do
  27. wait(.1)
  28.  
  29. local int = math.random(6,12)
  30. local offset = Vector3.new(0,0,-8) * i
  31.  
  32. local Boulder = Instance.new("Part",workspace)
  33.  
  34. if FloorMaterial == Enum.Material.Grass then
  35. Boulder.BrickColor = BrickColor.new("Parsley green")
  36. else if FloorMaterial == Enum.Material.Slate then
  37. Boulder.BrickColor = BrickColor.new("Nougat")
  38. end
  39. end
  40.  
  41. Boulder.CanCollide = true
  42. Boulder.CFrame = Player.Character.HumanoidRootPart.CFrame * CFrame.new(offset)
  43. Boulder.Orientation = Vector3.new(math.random(-150,300),math.random(-150,300),math.random(-150,300))
  44. Boulder.Name = "Boulder"
  45. Boulder.Anchored = true
  46. Boulder.Material = FloorMaterial
  47. Boulder.Shape = Enum.PartType.Block
  48. Boulder.Size = Vector3.new(int,int,int)
  49. game.Debris:AddItem(Boulder,3.8)
  50.  
  51. Boulder.Touched:Connect(function(hit)
  52. if hit and hit.Parent:FindFirstChild("Humanoid") then
  53. if hit.Parent == Player.Character then return end
  54. hit.Parent.Humanoid:TakeDamage(2) -- this is constant tick damage dont change
  55. end
  56. end)
  57.  
  58.  
  59.  
  60.  
  61. end
  62.  
  63. wait(1.5)
  64. Tool["Ground Shake"]:Stop()
  65.  
  66.  
  67.  
  68.  
  69.  
  70. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement