Advertisement
HowToRoblox

KickScript

Nov 12th, 2019
6,535
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. local CanAttack = true
  2.  
  3. script.Parent.Activated:Connect(function()
  4.    
  5.     if CanAttack == true then
  6.        
  7.         CanAttack = false
  8.        
  9.         local Swing = script.Parent.Parent.Humanoid:LoadAnimation(script.Swing)
  10.        
  11.         Swing:Play()
  12.        
  13.         script.Parent.Front.Touched:Connect(function(touch)
  14.             local player = touch.Parent
  15.             if game:GetService("Players"):GetPlayerFromCharacter(player) then
  16.                 game.Players:GetPlayerFromCharacter(player):Kick("You have been struck by the hammer!")
  17.             end
  18.         end)
  19.         wait(1)
  20.     CanAttack = true
  21.     end
  22. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement