Advertisement
Guest User

Punch Script Two

a guest
Feb 14th, 2020
388
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. game.Players.PlayerAdded:Connect(function(player)
  2. player.CharacterAdded:Connect(function(char)
  3. local sound = game.ServerStorage.Punch:Clone()
  4. sound.Parent = char:WaitForChild("Head")
  5. end)
  6. end)
  7.  
  8.  
  9. game.ReplicatedStorage.Punch.OnServerEvent:Connect(function(player, humanoid)
  10. if humanoid.Health >= 10 then
  11. humanoid.Health = humanoid.Health - 10
  12. elseif humanoid.Health < 10 then
  13. humanoid.Health = 0
  14. end
  15.  
  16. player.Character.Head.Punch:Play()
  17. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement