Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game.Players.PlayerAdded:Connect(function(player)
- player.CharacterAdded:Connect(function(char)
- local sound = game.ServerStorage.Punch:Clone()
- sound.Parent = char:WaitForChild("Head")
- end)
- end)
- game.ReplicatedStorage.Punch.OnServerEvent:Connect(function(player, humanoid)
- if humanoid.Health >= 10 then
- humanoid.Health = humanoid.Health - 10
- elseif humanoid.Health < 10 then
- humanoid.Health = 0
- end
- player.Character.Head.Punch:Play()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement